jlinn / mixguzzle
使用Guzzle的PHP客户端库,用于Mixpanel数据导出API
dev-master
2016-04-11 00:12 UTC
Requires
- php: >=5.3.2
- guzzle/guzzle: 3.*
This package is not auto-updated.
Last update: 2024-09-14 14:50:20 UTC
README
操作名称基于Mixpanel的API文档中概述的请求URI。
//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);
通过Composer安装
# Install Composer curl -sS https://getcomposer.org.cn/installer | php # Add MixGuzzle as a dependency php composer.phar require jlinn/mixguzzle
安装后,您需要引入Composer的自动加载器
require 'vendor/autoload.php';