fruitcakestudio/knvb-dataservice-api
最新稳定版本:v0.2.2
Composer 安装命令:
composer require fruitcakestudio/knvb-dataservice-api
包简介
KNVB Dataservice API
README 文档
README
Use Composer to install this package ("fruitcakestudio/knvb-dataservice-api": "0.2.x@dev",) and require the autoloader.
You can use the HttpClient to make requests to the API directly or use the API object to get more abstracted results.
All objects have public properties, matching the key/value from the API directly.
See the documentation on http://api.knvbdataservice.nl/v2/
Simple example:
require_once __DIR__ .'/../vendor/autoload.php'; use KNVB\Dataservice\Api; // Create a new API instance $api = new Api($pathname, $key); // Initialize the club $club = $api->getClub(); echo $club->getName(); echo $club->getBanner()->getOutput('leaderboard'); $matches = $club->getMatches(); $competitions = $club->getCompetitions(); foreach($club->getTeams() as $team){ echo $team->getName(); $results = $team->getResults(); $schedule = $team->getSchedule(); foreach($team->getCompetitions() as $competition){ echo $competition->getName(); $results = $competition->getResults(); $schedule = $competition->getSchedule(); $ranking = $competition->getRanking(); } }
统计信息
- 总下载量: 315
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-11-09