sportsit/api-client
Composer 安装命令:
composer require sportsit/api-client
包简介
PHP library for interacting with the DASH Platform API
README 文档
README
Dash - API Client Library
Additional documentation to follow.
Installing Dash API Client
With Composer
The recommended way to install Dash API Client is through Composer.
# Install Composer curl -sS https://getcomposer.org/installer | php
Next, run the Composer command to install the latest stable version of Dash API Client:
php composer.phar require sportsit/api-client
After installing, you need to require Composer's autoloader:
require 'vendor/autoload.php';
You can then later update Dash API Client using composer:
composer.phar update
Usage
Creation of a client can be done as shown below:
$config = new \Dash\Configuration($clientID, $clientSecret, $companyCode); $client = new \Dash\Client($config);
The client is a simple wrapper around the Guzzle HTTP library and as such any Guzzle methods can be accessed on the client as well.
$response = $client->get($uri, $options);
Making calls to the Dash API requires that you have a valid access token so make sure you authenticate with the API before making any other calls. Once you have an access token, it will automatically be added to all subsequent calls.
$response = $client->authenticate()->get($uri, $options);
统计信息
- 总下载量: 43
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-05-13