jlis / quickmetrics-php
A unofficial PHP client for Quickmetrics (quickmetrics.io)
Installs: 4 190
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.6.0
- guzzlehttp/guzzle: ^6.3
- psr/log: ^1.1
- symfony/options-resolver: ^3.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- phpunit/phpunit: ^5.7
This package is auto-updated.
Last update: 2024-12-16 00:43:33 UTC
README
A unofficial PHP client for Quickmetrics (quickmetrics.io)
Install
To install the client you will need to be using Composer in your project. To install it please see the docs.
Install the client using
composer require jlis/quickmetrics-php
Usage
// create the client $client = new \Jlis\Quickmetrics\Client('quickmetrics api key'); // collect the event $client->event('event.name', 1.0, 'dimension'); // send the event to Quickmetrics.io $client->flush();
You can also initialize the client with other options:
$client = new \Jlis\Quickmetrics\Client('your api key', [ 'url' => 'https://someotherurl.tld', 'max_batch_size' => 10, 'timeout' => 5, 'connect_timeout' => 2, ]);
There are the following options:
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Dependencies are managed through composer:
$ composer install
Tests can then be run via phpunit:
$ vendor/bin/phpunit
Thanks
Big thanks to Billomat which let my develop this library during my work time.
License
The MIT License (MIT). Please see License File for more information.