robert430404/mrp-php-sdk
Composer 安装命令:
composer require robert430404/mrp-php-sdk
包简介
This is a php SDK for the My Race Pass API
README 文档
README
This package gives you a fluent interface to interact with the My Race Pass API V2. All endpoint's are supported and all of the request parameters are fully implemented. We return PHP Objects from the API for use inside of your application.
We are composer compatible, and are on packagist. We are open to pull requests and issues here on Github and would appreciate as much help as possible.
In order to install our package via Composer, please use the following command.
composer require robert430404/mrp-php-sdk
Or add this line to your composer.json
"require": {
"robert430404/mrp-php-sdk": "1.0.0"
}
Information About The MRP API V2
We have complete compatibility with The MRP API. The SDK will follow the same requirements that the API documentation describes for each endpoint.
Some Basic Documentation
More In Depth Documentation Can Be Found Here ** It is currently under development **
The SDK's API Documentation Can Be Found Here ** Fully shows everything thats part of the SDK from traits to interfaces **
Using the package in a standalone application is very simple. Instantiate an instance of the object and pass in your API key via the constructor. From there simply call methods from the object to create your call and get your data returned to you.
<?php use mrpsdk\endpoints\points\PointsEndpoint; class YourClass { /** * @var PointsEndpoint */ protected $pointsEndpoint; /** * YourClass constructor. */ public function __construct() { $apiKey = 'XXXXXXX-XXXX-XXXXXX-XXXXXXXXXX'; $this->pointsEndpoint = new PointsEndpoint($apiKey); } /** * Returns Data From The MRP API In Object Form From JSON * * @return mixed */ public function returnData() { $data = $this->pointsEndpoint // Your Object ->setScheduleId(1000) // Builds URL ->setClassId(1000) // Builds URL ->getRequest(); // Sends Request And Returns Data return $data; } }
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-09-06