jlis/quickmetrics-php

A unofficial PHP client for Quickmetrics (quickmetrics.io)

v1.0.0 2019-11-15 13:09 UTC

This package is auto-updated.

Last update: 2024-12-16 00:43:33 UTC


README

Build Status StyleCI

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.