kevintweber / gauges
PHP wrapper for the gaug.es API.
Installs: 1 025
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: ^7.0
- guzzlehttp/guzzle: ^6.0
- psr/log: ^1.0
Requires (Dev)
- monolog/monolog: ^1.0
- phpunit/phpunit: ^6.0
This package is not auto-updated.
Last update: 2020-01-25 01:08:47 UTC
README
[Gauges] (http://get.gaug.es/) is a real-time website analytics service. This small library is designed to make consuming the [Gauges API] (http://get.gaug.es/documentation/) simple using PHP.
Installation
The recommended way to install this library is using [Composer] (http://getcomposer.org).
$ composer require kevintweber/gauges
Usage
Consuming the Gauges API with this library is super simple:
use Kevintweber\Gauges\Factory; // Create the request object. $request = Factory::createRequest($your_gauges_api_token); // Optionally, set a PSR-3 logger. $request->setLogger($logger); // Make an API call. $response = $request->gaugeDetail($gauge_id); // The response is a Psr7 response. $content = (string) $response->getContent(); $data = json_decode($content, true);
This library utilizes the Guzzle 6 library to make the API requests. To understand what else you can do with the response object, please refer to the [Guzzle documentation] (http://guzzle.readthedocs.org/en/latest/).
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email kevintweber@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.