jlinn/mixguzzle

A PHP client library for Mixpanel's data export API using Guzzle

dev-master 2016-04-11 00:12 UTC

This package is not auto-updated.

Last update: 2024-03-16 12:28:01 UTC


README

Operations are named based on their request URIs as outlined in Mixpanel's API documentation.

//example client instantiation and API call
$client = MixGuzzle\MixGuzzleClient::factory(array(
    'api_key' => 'your_api_key',
    'api_secret' => 'your_api_secret'
));
$command = $client->getCommand('events', array(
    'event' => array('Homepage Visit'),
    'type' => 'unique',
    'unit' => 'day',
    'interval' => 10
));
$response = $client->execute($command);

Installing via Composer:

# Install Composer
curl -sS https://getcomposer.org/installer | php

# Add MixGuzzle as a dependency
php composer.phar require jlinn/mixguzzle

After installing, you need to require Composer's autoloader:

require 'vendor/autoload.php';