alanly / traktor
PHP的Trakt.tv API客户端库,兼容PSR-4和Composer。
v0.1.0
2014-06-26 23:53 UTC
Requires
- php: >=5.4
- guzzlehttp/guzzle: 4.1.*
Requires (Dev)
- mockery/mockery: 0.9.*
- phpunit/phpunit: 4.1.*
This package is not auto-updated.
Last update: 2024-09-24 02:47:03 UTC
README
Traktor是一个简单的PHP客户端,用于Trakt.tv API服务,允许您将Trakt上的数据干净地集成到您的应用程序中。
目前,它只支持非开发者基于GET的API方法。它使用GuzzleHttp库,并需要使用PHP 5.4或更高版本。
它的目标是简单易用
$traktor = new Traktor\Client; $traktor->setApiKey('foobar'); $summary = $traktor->get('movie.summary', ['the-social-network-2010']); echo $summary->imdb_id; // "tt1285016" echo $summary->tagline; // "You don't get to 500 million friends without making a few enemies"
$traktor = new Traktor\Client; $traktor->setApiKey('foobar'); $summary = $traktor->get('show.episode.summary', ['silicon-valley', 1, 3]); echo $summary->show->title; // "Silicon Valley" echo $summary->episode->season; // 1 echo $summary->episode->number; // 3 echo $summary->episode->title; // "Articles of Incorporation"