2017 © Pedro Peláez
 

library tvdb

PHPTVDB is a PHP library for accessing TV show information such as episodes, actors, showtimes and descriptions.

image

moinax/tvdb

PHPTVDB is a PHP library for accessing TV show information such as episodes, actors, showtimes and descriptions.

  • Tuesday, October 25, 2016
  • by Moinax
  • Repository
  • 9 Watchers
  • 70 Stars
  • 57,354 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 35 Forks
  • 2 Open issues
  • 11 Versions
  • 5 % Grown

The README.md

TvDb

Deprecated This library was implemented to work with the TVDB API V1., (*1)

It is now deprecated so I suggest you to find another library that implements the new API like https://github.com/adrenth/thetvdb2, (*2)

Join the chat at https://gitter.im/Moinax/TvDb, (*3)

Based on the well known php library phptvdb (available on http://code.google.com/p/phptvdb/), this version has been completely refactored to offer more features from the tvdb api (available on http://www.thetvdb.com/wiki/index.php/Programmers_API) by using PHP 5.3 namespaces, very useful to import in a bigger project like Symfony 2 for example., (*4)

What does it do:

The Client implements almost all api functions from thetvdb excepted the download in ZIP format, (*5)

Usage:

use Moinax\TvDb\Client;
$apiKey = 'YOURAPIKEY';

$tvdb = new Client("http://thetvdb.com", $apiKey);
$tvdb->getSerie(75710);

Cache usage:

To save bandwidth, reduce latency, or both of two, you can use a Http Client with caching features. The HTTP client use the If-Modified-Since header to fetch full content only if resource was modified. This saves bandwidth. The HTTP client also use a time to live parameter to completly avoid making request if resource was fresh enough. This reduce latency., (*6)

<?php
use Moinax\TvDb\Http\Cache\FilesystemCache;
use Moinax\TvDb\Http\CacheClient;
use Moinax\TvDb\Client;

$ttl = 600; # how long things should get cached, in seconds.
$apiKey = 'YOURAPIKEY';

$cache = new FilesystemCache(__DIR__ . '/cache');
$httpClient = new CacheClient($cache, $ttl);

$tvdb = new Client("http://thetvdb.com", $apiKey);
$tvdb->setHttpClient($httpClient);

$tvdb->getSerie(75710); //This request will fetch the resource online.
$tvdb->getSerie(75710); //Cache content is fresh enough. We don't make any request.
sleep(600);
$tvdb->getSerie(75710); //The content is not fresh enough. We make a request with
                        //the If-Modified-Since header. The server respond 304 Not
                        //modified, so we load content from the cache.

Examples:

Use the index.php to test the Api Rename the settings.php.dist in settings.php if you wan to test and enter your own API key provided by http://thetvdb.com, (*7)

Status:

This version is quite stable and used in production on http://nextepisode.tv, (*8)

The Versions

25/10 2016

dev-master

9999999-dev http://moinax.github.io/TvDb/

PHPTVDB is a PHP library for accessing TV show information such as episodes, actors, showtimes and descriptions.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Avatar Moinax

api

25/10 2016

v1.0.6

1.0.6.0 http://moinax.github.io/TvDb/

PHPTVDB is a PHP library for accessing TV show information such as episodes, actors, showtimes and descriptions.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Avatar Moinax

api

01/04 2016

1.0.5.x-dev

1.0.5.9999999-dev http://moinax.github.io/TvDb/

PHPTVDB is a PHP library for accessing TV show information such as episodes, actors, showtimes and descriptions.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Avatar Moinax

api

01/04 2016

1.0.6.x-dev

1.0.6.9999999-dev http://moinax.github.io/TvDb/

PHPTVDB is a PHP library for accessing TV show information such as episodes, actors, showtimes and descriptions.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Avatar Moinax

api

01/04 2016

v1.0.5

1.0.5.0 http://moinax.github.io/TvDb/

PHPTVDB is a PHP library for accessing TV show information such as episodes, actors, showtimes and descriptions.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Avatar Moinax

api

08/03 2016

v1.0.4

1.0.4.0 http://moinax.github.io/TvDb/

PHPTVDB is a PHP library for accessing TV show information such as episodes, actors, showtimes and descriptions.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Avatar Moinax

api

03/02 2016

v1.0.3

1.0.3.0 http://moinax.github.io/TvDb/

PHPTVDB is a PHP library for accessing TV show information such as episodes, actors, showtimes and descriptions.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Avatar Moinax

api

21/12 2015

v1.0.2

1.0.2.0 http://moinax.github.io/TvDb/

PHPTVDB is a PHP library for accessing TV show information such as episodes, actors, showtimes and descriptions.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Avatar Moinax

api

22/11 2014

v1.0.1

1.0.1.0 http://moinax.github.io/TvDb/

PHPTVDB is a PHP library for accessing TV show information such as episodes, actors, showtimes and descriptions.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Avatar Moinax

api

25/10 2014

v1.0.0

1.0.0.0 http://moinax.github.io/TvDb/

PHPTVDB is a PHP library for accessing TV show information such as episodes, actors, showtimes and descriptions.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Avatar Moinax

api

25/10 2014

1.0.0

1.0.0.0 http://moinax.github.io/TvDb/

PHPTVDB is a PHP library for accessing TV show information such as episodes, actors, showtimes and descriptions.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Avatar Moinax

api