gist / analytics
Connect to the Gist Analytics API
Installs: 3 804
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=7.3 | >8
- guzzlehttp/guzzle: 7.*
Requires (Dev)
- phpunit/phpunit: 9.*
This package is auto-updated.
Last update: 2024-04-13 03:58:18 UTC
README
The client class interacts with the Gist Analytics Platform to get and set data
Installation
Install using composer
composer require gist/analytics
Usage
Sign up for Gist Analytics at https://analytics.gist-apps.com/register
Register your application, and make note of the Access token generated. This token will only be displayed once, so make sure to save the record of it.
use Gist\Analytics; $client = new Analytics\Client([ 'api_key' => 'Your API key' ]); // Insert a new record $event = $client->insert($name, $value, $meta = []); // Query for existing records. $event = $client->query($name, $startDate, $endDate, $query = [], $meta = [], $format = "default");
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.