grummfy / stathat-read
Library that helps reading stats from stathat
0.2.0
2017-09-08 13:37 UTC
Requires
- php: >=7.1.0
Requires (Dev)
- atoum/atoum: ^3.1
- atoum/reports-extension: dev-master
- atoum/stubs: ^2.5
- guzzlehttp/guzzle: ^6.3
Suggests
- guzzlehttp/guzzle: To get the default adapter to request the stats.
This package is auto-updated.
Last update: 2024-11-28 19:53:56 UTC
README
Stathat is SaaS stat tracking tool. This small library is here to help read stats from it with PHP.
Usage
use Grummfy\StatHat; use Grummfy\Stathat\HTTPAdapter\GuzzleAdapter; use GuzzleHttp\Client; $stathatToken = 'ABC123'; // get it from https://www.stathat.com/access $adapter = new GuzzleAdapter($client); $stathat = new Grummfy\StatHat($adapter, $stathatToken); var_dump($stathat->listAllStats());
Install
composer require grummfy/stathat-read
composer require guzzlehttp/guzzle
By default, this library came with an implementation of the AdapterInterface made for Guzzle. If, for any reason, you don't want to use guzzle, just implements a new AdapterInterface.
Test
vendor/bin/atoum