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.
Install this package using Composer:
composer require adrenth/tvrage
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
<?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)
Please contribute to make this package even better.

