Flurry Analytics Reporting API PHP Client
Flurry Analytics Reporting API PHP Client to query the new Flurry Analytics API. Flurry introduced its new Reporting API before shut down the old one on the 6th of March 2017. For a detailed description review the Flurry documentation here.
Get & use the flurry-reporting php package.
Install flurry-reporting
using composer:
composer require relatedbits/flurry-reporting
$token = 'YOUR_API_ACCESS_TOKEN';
$flurry = new Flurry($token);
-
Query Metrics API data
$params = [ 'dimensions' => 'country', 'table' => 'App Usage Data', 'timeGrain' => 'day', 'metrics' => 'sessions,activeDevices,newDevices', 'dateTime' => '2017-03-13/2017-03-14', 'filters' => 'country|name-in["United States"]', 'format' => 'csv' ];
$data = $flurry->get('Metrics', $params);
-
Query Dimensions API data
$params = [ 'dimension' => 'country' ];
$data = $flurry->get('Dimensions', $params);
If required parameters for the API are not provided it will throw LogicException. In case of invalid parameter values are provided InvalidArgumentException will be thrown if there is no default value defined in the library. Invalid parameter names are simply omitted.
- Marcell Ferenc - Initial work - marcell-ferenc
This project is licensed under the MIT License - see the LICENSE.md file for details.
- Inspired by MyLittleParis/Flurry, a client for the old Flurry Reporting API.