adrenth/tvrage
最新稳定版本:0.1.2
Composer 安装命令:
composer require adrenth/tvrage
包简介
API Client for tvrage.com
README 文档
README
This is an API client for the tvrage.com website. It's using the XML feeds that are publicly available. For more info visit http://services.tvrage.com/info.php?page=main.
Installation
Install this package using Composer:
composer require adrenth/tvrage
Caching
Since the tvrage.com XML feeds are usually very slow I advise you to use caching. This package requires a Doctrine Cache instance.
To disable caching just provide a VoidCache or ArrayCache instance.
For more information about Doctrine Cache visit https://github.com/doctrine/cache
Usage
<?php
require '../vendor/autoload.php';
$cache = new \Doctrine\Common\Cache\FilesystemCache('path/to/temp');
$client = new Adrenth\Tvrage\Client($cache);
// Search TV-serie Top Gear
$response = $client->search('top gear'); // ShowsResponse
// Perform a full search on Ray Donovan
$response = $client->fullSearch('ray donovan'); // ShowsResponse
// Get (full) show info by passing the tvrageid (Buffy the Vampire Slayer)
$response = $client->showInfo(2930); // ShowResponse
$response = $client->fullShowInfo(2930); // ShowResponse
// Get Episode list of Buffy the Vampire Slayer
$response = $client->episodeList(2930); // SeasonsResponse
// Get Episode infor of Buffy the Vampire Slayer (season 2, episode 4)
$response = $client->episodeInfo(2930, 2, 4); // EpisodeResponse
SeasonsResponse; contains 0 or moreSeasoninstances (episodeList)EpisodeResponse; contains 0 or 1Episodeinstance (episodeInfo)ShowResponse; contains 0 or 1Showinstance (showInfo)ShowsResponse; contains 0 or moreShowinstances (search, fullSearch)
Contributing
Please contribute to make this package even better.
统计信息
- 总下载量: 85
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-08-29