danabrey/sleeper-api
Composer 安装命令:
composer require danabrey/sleeper-api
包简介
PHP library for interacting with the sleeper.app fantasy football API
README 文档
README
PHP library for interacting with the read-only Sleeper fantasy football API.
Installation
composer require danabrey/sleeper-api
Usage
Create an instance of the client
$client = new DanAbrey\SleeperApi\SleeperApiClient();
No API key is required for the Sleeper API, as it is read-only and they do not track requests in this way.
$client->league('xxxxx') where xxxxx is the league ID, for basic league info
$client->rosters('xxxxx') where xxxxx is the league ID, for all rosters
$client->users('xxxxx') where xxxxx is the league ID, for all users in a league
All methods return either a single instance or an array of plain PHP objects that represent the data returned. e.g. SleeperRoster
Note
It is your responsibility to abide by the terms of the Sleeper API.
Running tests
./vendor/bin/phpunit
统计信息
- 总下载量: 963
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-06-30