定制 adrenth/tvrage 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

adrenth/tvrage

最新稳定版本:0.1.2

Composer 安装命令:

composer require adrenth/tvrage

包简介

API Client for tvrage.com

README 文档

README

Build Status Latest Stable Version Total Downloads Latest Unstable Version License SensioLabsInsight HHVM Status

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 more Season instances (episodeList)
  • EpisodeResponse; contains 0 or 1 Episode instance (episodeInfo)
  • ShowResponse; contains 0 or 1 Show instance (showInfo)
  • ShowsResponse; contains 0 or more Show instances (search, fullSearch)

Contributing

Please contribute to make this package even better.

统计信息

  • 总下载量: 85
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-29