Skip to content

marcell-ferenc/flurry-reporting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Getting Started

Get & use the flurry-reporting php package.

Install

Install flurry-reporting using composer:

composer require relatedbits/flurry-reporting

Usage

$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);
    

Exceptions

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.

Author

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

About

Flurry Analytics Reporting API PHP Client

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages