From ad9408b3044decd6fba056326631db3eb788d4bd Mon Sep 17 00:00:00 2001 From: Michael Roterman Date: Wed, 29 Jan 2014 23:06:44 +0100 Subject: [PATCH] Adding unit tests --- examples/people/model/get.php | 21 --- lib/Tmdb/Factory/CompanyFactory.php | 9 +- lib/Tmdb/Factory/ConfigurationFactory.php | 2 +- lib/Tmdb/Factory/People/CastFactory.php | 2 + lib/Tmdb/Factory/People/CrewFactory.php | 2 + .../Factory/{People => }/PeopleFactory.php | 4 +- lib/Tmdb/Factory/TvEpisodeFactory.php | 2 +- lib/Tmdb/Factory/TvSeasonFactory.php | 2 +- lib/Tmdb/Helper/ImageHelper.php | 1 + lib/Tmdb/Model/Configuration.php | 6 +- lib/Tmdb/Repository/ChangesRepository.php | 2 +- lib/Tmdb/Repository/PeopleRepository.php | 2 +- .../Tests/Factory/CollectionFactoryTest.php | 62 +++++++++ .../Tmdb/Tests/Factory/CompanyFactoryTest.php | 54 +++++++- .../Factory/ConfigurationFactoryTest.php | 62 +++++++++ test/Tmdb/Tests/Factory/PeopleFactoryTest.php | 46 +++++++ .../Tests/Factory/TvEpisodeFactoryTest.php | 70 ++++++++++ test/Tmdb/Tests/Factory/TvFactoryTest.php | 69 ++++++++++ .../Tests/Factory/TvSeasonFactoryTest.php | 76 +++++++++++ test/Tmdb/Tests/Helper/ImageHelperTest.php | 129 ++++++++++++++++++ test/Tmdb/Tests/Resources/collection/get.json | 1 + .../Tests/Resources/configuration/get.json | 1 + test/Tmdb/Tests/Resources/person/get.json | 1 + test/Tmdb/Tests/Resources/tv/all.json | 1 + test/Tmdb/Tests/Resources/tv/season/all.json | 1 + .../Resources/tv/season/episode/all.json | 1 + 26 files changed, 586 insertions(+), 43 deletions(-) delete mode 100644 examples/people/model/get.php rename lib/Tmdb/Factory/{People => }/PeopleFactory.php (96%) create mode 100644 test/Tmdb/Tests/Factory/CollectionFactoryTest.php create mode 100644 test/Tmdb/Tests/Factory/ConfigurationFactoryTest.php create mode 100644 test/Tmdb/Tests/Factory/PeopleFactoryTest.php create mode 100644 test/Tmdb/Tests/Factory/TvEpisodeFactoryTest.php create mode 100644 test/Tmdb/Tests/Factory/TvFactoryTest.php create mode 100644 test/Tmdb/Tests/Factory/TvSeasonFactoryTest.php create mode 100644 test/Tmdb/Tests/Helper/ImageHelperTest.php create mode 100644 test/Tmdb/Tests/Resources/collection/get.json create mode 100644 test/Tmdb/Tests/Resources/configuration/get.json create mode 100644 test/Tmdb/Tests/Resources/person/get.json create mode 100644 test/Tmdb/Tests/Resources/tv/all.json create mode 100644 test/Tmdb/Tests/Resources/tv/season/all.json create mode 100644 test/Tmdb/Tests/Resources/tv/season/episode/all.json diff --git a/examples/people/model/get.php b/examples/people/model/get.php deleted file mode 100644 index 2daf6501..00000000 --- a/examples/people/model/get.php +++ /dev/null @@ -1,21 +0,0 @@ - - * @copyright (c) 2013, Michael Roterman - * @version 0.0.1 - */ -require_once('../../../vendor/autoload.php'); -require_once('../../../apikey.php'); - -$token = new \Tmdb\ApiToken(TMDB_API_KEY); -$client = new \Tmdb\Client($token); - -$peopleRepository = \Tmdb\Repository\PeopleRepository($client); - -var_dump($person); diff --git a/lib/Tmdb/Factory/CompanyFactory.php b/lib/Tmdb/Factory/CompanyFactory.php index 439b7ddc..213d180f 100644 --- a/lib/Tmdb/Factory/CompanyFactory.php +++ b/lib/Tmdb/Factory/CompanyFactory.php @@ -12,7 +12,6 @@ */ namespace Tmdb\Factory; -use Tmdb\Model\Common\GenericCollection; use Tmdb\Model\Company; class CompanyFactory extends AbstractFactory @@ -30,12 +29,6 @@ public function create(array $data = array()) */ public function createCollection(array $data = array()) { - $collection = new GenericCollection(); - - foreach($data as $item) { - $collection->add(null, $this->create($item)); - } - - return $collection; + return array(); } } diff --git a/lib/Tmdb/Factory/ConfigurationFactory.php b/lib/Tmdb/Factory/ConfigurationFactory.php index def7c7d6..68ce7750 100644 --- a/lib/Tmdb/Factory/ConfigurationFactory.php +++ b/lib/Tmdb/Factory/ConfigurationFactory.php @@ -31,6 +31,6 @@ public function create(array $data = array()) */ public function createCollection(array $data = array()) { - return null; + return array(); } } diff --git a/lib/Tmdb/Factory/People/CastFactory.php b/lib/Tmdb/Factory/People/CastFactory.php index d3972ab5..c9a38e78 100644 --- a/lib/Tmdb/Factory/People/CastFactory.php +++ b/lib/Tmdb/Factory/People/CastFactory.php @@ -12,6 +12,8 @@ */ namespace Tmdb\Factory\People; +use Tmdb\Factory\PeopleFactory; + use Tmdb\Model\Collection\People\Cast; class CastFactory extends PeopleFactory diff --git a/lib/Tmdb/Factory/People/CrewFactory.php b/lib/Tmdb/Factory/People/CrewFactory.php index 83b1391c..f1878b32 100644 --- a/lib/Tmdb/Factory/People/CrewFactory.php +++ b/lib/Tmdb/Factory/People/CrewFactory.php @@ -12,6 +12,8 @@ */ namespace Tmdb\Factory\People; +use Tmdb\Factory\PeopleFactory; + use Tmdb\Model\Collection\People\Crew; class CrewFactory extends PeopleFactory diff --git a/lib/Tmdb/Factory/People/PeopleFactory.php b/lib/Tmdb/Factory/PeopleFactory.php similarity index 96% rename from lib/Tmdb/Factory/People/PeopleFactory.php rename to lib/Tmdb/Factory/PeopleFactory.php index 1ffb5059..d1fcde1a 100644 --- a/lib/Tmdb/Factory/People/PeopleFactory.php +++ b/lib/Tmdb/Factory/PeopleFactory.php @@ -10,10 +10,8 @@ * @copyright (c) 2013, Michael Roterman * @version 0.0.1 */ -namespace Tmdb\Factory\People; +namespace Tmdb\Factory; -use Tmdb\Factory\AbstractFactory; -use Tmdb\Factory\ImageFactory; use Tmdb\Model\Common\GenericCollection; use Tmdb\Model\Person\CastMember; use Tmdb\Model\Person\CrewMember; diff --git a/lib/Tmdb/Factory/TvEpisodeFactory.php b/lib/Tmdb/Factory/TvEpisodeFactory.php index 5a419b44..647d4a3d 100644 --- a/lib/Tmdb/Factory/TvEpisodeFactory.php +++ b/lib/Tmdb/Factory/TvEpisodeFactory.php @@ -82,7 +82,7 @@ public function create(array $data = array()) /** Images */ if (array_key_exists('images', $data)) { - $tvEpisode->setImages($this->getImageFactory()->createCollectionFromTv($data['images'])); + $tvEpisode->setImages($this->getImageFactory()->createCollectionFromTvEpisode($data['images'])); } return $this->hydrate($tvEpisode, $data); diff --git a/lib/Tmdb/Factory/TvSeasonFactory.php b/lib/Tmdb/Factory/TvSeasonFactory.php index ca69cb32..37f79159 100644 --- a/lib/Tmdb/Factory/TvSeasonFactory.php +++ b/lib/Tmdb/Factory/TvSeasonFactory.php @@ -82,7 +82,7 @@ public function create(array $data = array()) /** Images */ if (array_key_exists('images', $data)) { - $tvSeason->setImages($this->getImageFactory()->createCollectionFromTv($data['images'])); + $tvSeason->setImages($this->getImageFactory()->createCollectionFromTvSeason($data['images'])); } /** Episodes */ diff --git a/lib/Tmdb/Helper/ImageHelper.php b/lib/Tmdb/Helper/ImageHelper.php index d2051830..0a93cfd2 100644 --- a/lib/Tmdb/Helper/ImageHelper.php +++ b/lib/Tmdb/Helper/ImageHelper.php @@ -62,6 +62,7 @@ public function getHtml(Image $image, $size = 'original', $width = null, $height } $aspectRatio = $image->getAspectRatio(); + if (null !== $width && null == $height && $aspectRatio !== null) { $height = round($width / $aspectRatio); } diff --git a/lib/Tmdb/Model/Configuration.php b/lib/Tmdb/Model/Configuration.php index 0e360c42..421a7a0a 100644 --- a/lib/Tmdb/Model/Configuration.php +++ b/lib/Tmdb/Model/Configuration.php @@ -12,17 +12,15 @@ */ namespace Tmdb\Model; -use Tmdb\Model\Common\GenericCollection; - class Configuration extends AbstractModel { /** - * @var Collection + * @var array */ private $images; /** - * @var Collection + * @var array */ private $change_keys; diff --git a/lib/Tmdb/Repository/ChangesRepository.php b/lib/Tmdb/Repository/ChangesRepository.php index 1577c72b..a1d039f1 100644 --- a/lib/Tmdb/Repository/ChangesRepository.php +++ b/lib/Tmdb/Repository/ChangesRepository.php @@ -14,7 +14,7 @@ use Tmdb\Exception\NotImplementedException; use Tmdb\Factory\MovieFactory; -use Tmdb\Factory\People\PeopleFactory; +use Tmdb\Factory\PeopleFactory; use Tmdb\Model\Collection\People; use Tmdb\Model\Query\ChangesQuery; diff --git a/lib/Tmdb/Repository/PeopleRepository.php b/lib/Tmdb/Repository/PeopleRepository.php index 0d84b931..e43af8e7 100644 --- a/lib/Tmdb/Repository/PeopleRepository.php +++ b/lib/Tmdb/Repository/PeopleRepository.php @@ -13,7 +13,7 @@ namespace Tmdb\Repository; use Tmdb\Api\People; -use Tmdb\Factory\People\PeopleFactory; +use Tmdb\Factory\PeopleFactory; use Tmdb\Model\Person; use Tmdb\Model\Person\QueryParameter\AppendToResponse; diff --git a/test/Tmdb/Tests/Factory/CollectionFactoryTest.php b/test/Tmdb/Tests/Factory/CollectionFactoryTest.php new file mode 100644 index 00000000..3cbcf576 --- /dev/null +++ b/test/Tmdb/Tests/Factory/CollectionFactoryTest.php @@ -0,0 +1,62 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Tests\Factory; + +use Tmdb\Factory\CollectionFactory; +use Tmdb\Model\Collection; + +class CollectionFactoryTest extends TestCase +{ + /** + * @test + */ + public function shouldConstructCollection() + { + /** + * @var CollectionFactory $factory + */ + $factory = $this->getFactory(); + $data = $this->loadByFile('collection/get.json'); + + /** + * @var Collection $collection + */ + $collection = $factory->create($data); + + $this->assertInstanceOf('Tmdb\Model\Collection', $collection); + } + + /** + * @test + */ + public function shouldBeAbleToSetFactories() + { + /** + * @var CollectionFactory $factory + */ + $factory = $this->getFactory(); + + $class = new \stdClass(); + + $factory->setMovieFactory($class); + $factory->setImageFactory($class); + + $this->assertInstanceOf('stdClass', $factory->getMovieFactory()); + $this->assertInstanceOf('stdClass', $factory->getImageFactory()); + } + + protected function getFactoryClass() + { + return 'Tmdb\Factory\CollectionFactory'; + } +} \ No newline at end of file diff --git a/test/Tmdb/Tests/Factory/CompanyFactoryTest.php b/test/Tmdb/Tests/Factory/CompanyFactoryTest.php index 1aaccb67..ddb4e976 100644 --- a/test/Tmdb/Tests/Factory/CompanyFactoryTest.php +++ b/test/Tmdb/Tests/Factory/CompanyFactoryTest.php @@ -12,19 +12,34 @@ */ namespace Tmdb\Tests\Factory; +use Tmdb\Factory\CompanyFactory; +use Tmdb\Model\Company; + class CompanyFactoryTest extends TestCase { const COMPANY_ID = 1; + private $data; + + public function setUp() + { + $this->data = $this->loadByFile('company/get.json'); + } + /** * @test */ public function shouldConstructCompany() { + /** + * @var CompanyFactory $factory + */ $factory = $this->getFactory(); - $data = $this->loadByFile('company/get.json'); - $company = $factory->create($data); + /** + * @var Company $company + */ + $company = $factory->create($this->data); $this->assertInstanceOf('Tmdb\Model\Company', $company); $this->assertInstanceOf('Tmdb\Model\Image\LogoImage', $company->getLogo()); @@ -38,6 +53,41 @@ public function shouldConstructCompany() $this->assertEquals(null, $company->getParentCompany()); } + /** + * @test + */ + public function shouldMatchExpectations() + { + /** + * @var CompanyFactory $factory + */ + $factory = $this->getFactory(); + + /** + * @var Company $company + */ + $company = $factory->create($this->data); + + $this->assertEquals(null, $company->getDescription()); + $this->assertEquals('San Francisco, California', $company->getHeadquarters()); + $this->assertEquals('http://www.lucasfilm.com', $company->getHomepage()); + $this->assertEquals(1, $company->getId()); + $this->assertEquals('/8rUnVMVZjlmQsJ45UGotD0Uznxj.png', $company->getLogoPath()); + $this->assertEquals('Lucasfilm', $company->getName()); + $this->assertEquals(null, $company->getParentCompany()); + } + + /** + * @test + */ + public function callingCollectionReturnsEmptyArray() + { + $factory = $this->getFactory(); + $collection = $factory->createCollection(array()); + + $this->assertEquals(array(), $collection); + } + protected function getFactoryClass() { return 'Tmdb\Factory\CompanyFactory'; diff --git a/test/Tmdb/Tests/Factory/ConfigurationFactoryTest.php b/test/Tmdb/Tests/Factory/ConfigurationFactoryTest.php new file mode 100644 index 00000000..47bb4291 --- /dev/null +++ b/test/Tmdb/Tests/Factory/ConfigurationFactoryTest.php @@ -0,0 +1,62 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Tests\Factory; + +use Tmdb\Factory\ConfigurationFactory; +use Tmdb\Model\Configuration; + +class ConfigurationFactoryTest extends TestCase +{ + /** + * @test + */ + public function shouldConstructConfiguration() + { + /** + * @var ConfigurationFactory $factory + */ + $factory = $this->getFactory(); + $data = $this->loadByFile('configuration/get.json'); + + /** + * @var Configuration $configuration + */ + $configuration = $factory->create($data); + + $this->assertInstanceOf('Tmdb\Model\Configuration', $configuration); + + $images = $configuration->getImages(); + $changeKeys = $configuration->getChangeKeys(); + + $this->assertEquals(true, !empty($images)); + $this->assertEquals(true, !empty($changeKeys)); + } + + /** + * @test + */ + public function callingCollectionReturnsEmptyArray() + { + /** + * @var ConfigurationFactory $factory + */ + $factory = $this->getFactory(); + + $this->assertEquals(array(), $factory->createCollection(array())); + } + + protected function getFactoryClass() + { + return 'Tmdb\Factory\ConfigurationFactory'; + } +} \ No newline at end of file diff --git a/test/Tmdb/Tests/Factory/PeopleFactoryTest.php b/test/Tmdb/Tests/Factory/PeopleFactoryTest.php new file mode 100644 index 00000000..c7927197 --- /dev/null +++ b/test/Tmdb/Tests/Factory/PeopleFactoryTest.php @@ -0,0 +1,46 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Tests\Factory; + +use Tmdb\Factory\PeopleFactory; +use Tmdb\Model\Person; + +class PeopleFactoryTest extends TestCase +{ + /** + * @test + */ + public function shouldConstructPerson() + { + /** + * @var PeopleFactory $factory + */ + $factory = $this->getFactory(); + $data = $this->loadByFile('person/get.json'); + + /** + * @var Person $person + */ + $person = $factory->create($data); + + $this->assertInstanceOf('Tmdb\Model\Person', $person); + + $this->assertInstanceOf('Tmdb\Model\Collection\Images', $person->getImages()); + $this->assertInstanceOf('Tmdb\Model\Image\ProfileImage', $person->getProfile()); + } + + protected function getFactoryClass() + { + return 'Tmdb\Factory\PeopleFactory'; + } +} \ No newline at end of file diff --git a/test/Tmdb/Tests/Factory/TvEpisodeFactoryTest.php b/test/Tmdb/Tests/Factory/TvEpisodeFactoryTest.php new file mode 100644 index 00000000..df86d15e --- /dev/null +++ b/test/Tmdb/Tests/Factory/TvEpisodeFactoryTest.php @@ -0,0 +1,70 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Tests\Factory; + +use Tmdb\Factory\TvEpisodeFactory; +use Tmdb\Model\Tv\Episode; + +class TvEpisodeFactoryTest extends TestCase +{ + /** + * @test + */ + public function shouldConstructTvEpisode() + { + /** + * @var TvEpisodeFactory $factory + */ + $factory = $this->getFactory(); + $data = $this->loadByFile('tv/season/episode/all.json'); + + /** + * @var Episode $episode + */ + $episode = $factory->create($data); + + $this->assertInstanceOf('Tmdb\Model\Tv\Episode', $episode); + + $this->assertInstanceOf('\DateTime', $episode->getAirDate()); + + $this->assertInstanceOf('Tmdb\Model\Collection\Credits', $episode->getCredits()); + $this->assertInstanceOf('Tmdb\Model\Tv\ExternalIds', $episode->getExternalIds()); + $this->assertInstanceOf('Tmdb\Model\Collection\Images', $episode->getImages()); + } + + /** + * @test + */ + public function shouldBeAbleToSetFactories() + { + /** + * @var TvEpisodeFactory $factory + */ + $factory = $this->getFactory(); + + $class = new \stdClass(); + + $factory->setCastFactory($class); + $factory->setCrewFactory($class); + $factory->setImageFactory($class); + + $this->assertInstanceOf('stdClass', $factory->getCastFactory()); + $this->assertInstanceOf('stdClass', $factory->getCrewFactory()); + $this->assertInstanceOf('stdClass', $factory->getImageFactory()); + } + + protected function getFactoryClass() + { + return 'Tmdb\Factory\TvEpisodeFactory'; + } +} \ No newline at end of file diff --git a/test/Tmdb/Tests/Factory/TvFactoryTest.php b/test/Tmdb/Tests/Factory/TvFactoryTest.php new file mode 100644 index 00000000..4215f0a6 --- /dev/null +++ b/test/Tmdb/Tests/Factory/TvFactoryTest.php @@ -0,0 +1,69 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Tests\Factory; + +use Tmdb\Factory\TvFactory; +use Tmdb\Model\Tv; + +class TvFactoryTest extends TestCase +{ + const TV_ID = 3572; + + /** + * @test + */ + public function shouldConstructTv() + { + /** + * @var TvFactory $factory + */ + $factory = $this->getFactory(); + $data = $this->loadByFile('tv/all.json'); + + /** + * @var Tv $tv + */ + $tv = $factory->create($data); + + $this->assertInstanceOf('Tmdb\Model\Tv', $tv); + + $this->assertInstanceOf('\DateTime', $tv->getLastAirDate()); + } + + /** + * @test + */ + public function shouldBeAbleToSetFactories() + { + $factory = new TvFactory(); + + $class = new \stdClass(); + + $factory->setCastFactory($class); + $factory->setCrewFactory($class); + $factory->setGenreFactory($class); + $factory->setImageFactory($class); + $factory->setTvSeasonFactory($class); + + $this->assertInstanceOf('stdClass', $factory->getCastFactory()); + $this->assertInstanceOf('stdClass', $factory->getCrewFactory()); + $this->assertInstanceOf('stdClass', $factory->getGenreFactory()); + $this->assertInstanceOf('stdClass', $factory->getImageFactory()); + $this->assertInstanceOf('stdClass', $factory->getTvSeasonFactory()); + } + + protected function getFactoryClass() + { + return 'Tmdb\Factory\TvFactory'; + } +} \ No newline at end of file diff --git a/test/Tmdb/Tests/Factory/TvSeasonFactoryTest.php b/test/Tmdb/Tests/Factory/TvSeasonFactoryTest.php new file mode 100644 index 00000000..ae67d299 --- /dev/null +++ b/test/Tmdb/Tests/Factory/TvSeasonFactoryTest.php @@ -0,0 +1,76 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Tests\Factory; + +use Tmdb\Factory\TvSeasonFactory; +use Tmdb\Model\Tv\Season; + +class TvSeasonFactoryTest extends TestCase +{ + const TV_ID = 3572; + + /** + * @test + */ + public function shouldConstructTv() + { + /** + * @var TvSeasonFactory $factory + */ + $factory = $this->getFactory(); + $data = $this->loadByFile('tv/season/all.json'); + + /** + * @var Season $season + */ + $season = $factory->create($data); + + $this->assertInstanceOf('Tmdb\Model\Tv\Season', $season); + + $this->assertInstanceOf('\DateTime', $season->getAirDate()); + + $this->assertInstanceOf('Tmdb\Model\Collection\Credits', $season->getCredits()); + $this->assertInstanceOf('Tmdb\Model\Collection\Credits', $season->getCredits()); + $this->assertInstanceOf('Tmdb\Model\Tv\ExternalIds', $season->getExternalIds()); + $this->assertInstanceOf('Tmdb\Model\Collection\Images', $season->getImages()); + $this->assertInstanceOf('Tmdb\Model\Common\GenericCollection', $season->getEpisodes()); + } + + /** + * @test + */ + public function shouldBeAbleToSetFactories() + { + /** + * @var TvSeasonFactory $factory + */ + $factory = $this->getFactory(); + + $class = new \stdClass(); + + $factory->setCastFactory($class); + $factory->setCrewFactory($class); + $factory->setImageFactory($class); + $factory->setTvEpisodeFactory($class); + + $this->assertInstanceOf('stdClass', $factory->getCastFactory()); + $this->assertInstanceOf('stdClass', $factory->getCrewFactory()); + $this->assertInstanceOf('stdClass', $factory->getImageFactory()); + $this->assertInstanceOf('stdClass', $factory->getTvEpisodeFactory()); + } + + protected function getFactoryClass() + { + return 'Tmdb\Factory\TvSeasonFactory'; + } +} \ No newline at end of file diff --git a/test/Tmdb/Tests/Helper/ImageHelperTest.php b/test/Tmdb/Tests/Helper/ImageHelperTest.php new file mode 100644 index 00000000..69a29b3c --- /dev/null +++ b/test/Tmdb/Tests/Helper/ImageHelperTest.php @@ -0,0 +1,129 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ + +use Tmdb\Tests\TestCase as Base; + +class ImageHelperTest extends Base +{ + /** + * @var \Tmdb\Helper\ImageHelper + */ + private $helper; + + public function setUp() + { + $factory = new \Tmdb\Factory\ConfigurationFactory(); + + $data = $this->loadByFile('configuration/get.json'); + $configuration = $factory->create($data); + + $this->helper = new \Tmdb\Helper\ImageHelper($configuration); + } + + /** + * @test + */ + public function shouldContainImageConfiguration() + { + $config = $this->helper->getImageConfiguration(); + + $this->assertEquals(true, !empty($config)); + } + + /** + * @test + */ + public function shouldConstructImageUrl() + { + $image = new \Tmdb\Model\Image(); + + $image->setFilePath('/test-image.jpg'); + + $this->assertEquals( + 'http://image.tmdb.org/t/p/original/test-image.jpg', + $this->helper->getUrl($image) + ); + + $this->assertEquals( + 'http://image.tmdb.org/t/p/w45/test-image.jpg', + $this->helper->getUrl($image, 'w45') + ); + } + + /** + * @test + */ + public function shouldConstructImageElement() + { + $image = new \Tmdb\Model\Image(); + + $image->setFilePath('/1NfhdnQAEqcBRCulEhOFSkRrrLv.jpg'); + $image->setWidth(100); + $image->setHeight(75); + + $this->assertEquals( + '', + $this->helper->getHtml($image, 'w45', 90, 70) + ); + } + + /** + * @test + */ + public function shouldReadImageDimensions() + { + $image = new \Tmdb\Model\Image(); + + $image->setFilePath('/1NfhdnQAEqcBRCulEhOFSkRrrLv.jpg'); + $image->setWidth(100); + $image->setHeight(75); + + $this->assertEquals( + '', + $this->helper->getHtml($image, 'w45') + ); + } + + /** + * @test + */ + public function shouldCalculateDimensions() + { + $image = new \Tmdb\Model\Image(); + + $image->setFilePath('/1NfhdnQAEqcBRCulEhOFSkRrrLv.jpg'); + $image->setWidth(100); + $image->setHeight(75); + $image->setAspectRatio(1.25); + + $this->assertEquals( + '', + $this->helper->getHtml($image, 'w45', null, 50) + ); + + $this->assertEquals( + '', + $this->helper->getHtml($image, 'w45', 63) + ); + } + + /** + * @test + */ + public function shouldBeEmptyIfFilePathIsNotGiven() + { + $image = new \Tmdb\Model\Image(); + + $this->assertEquals('', $this->helper->getHtml($image)); + } +} diff --git a/test/Tmdb/Tests/Resources/collection/get.json b/test/Tmdb/Tests/Resources/collection/get.json new file mode 100644 index 00000000..ae3a551a --- /dev/null +++ b/test/Tmdb/Tests/Resources/collection/get.json @@ -0,0 +1 @@ +{"id":10,"name":"Star Wars Collection","overview":"An epic space opera theatrical film series created by George Lucas.\r The first film in the franchise was originally released on May 25, 1977, by 20th Century Fox, and became a worldwide pop culture phenomenon, followed by two sequels, released at three-year intervals. Sixteen years after the release of the trilogy's final film, the first in a new prequel trilogy of films was released, again released at three-year intervals, with the final film released on May 19, 2005.","poster_path":"\/ghd5zOQnDaDW1mxO7R5fXXpZMu.jpg","backdrop_path":"\/qCECROwx3TRUEgoZv2Mz2D723QC.jpg","parts":[{"title":"Star Wars: Episode IV - A New Hope","id":11,"release_date":"1977-05-25","poster_path":"\/tvSlBzAdRE29bZe5yYWrJ2ds137.jpg","backdrop_path":"\/4iJfYYoQzZcONB9hNzg0J0wWyPH.jpg"},{"title":"Star Wars: Episode V - The Empire Strikes Back","id":1891,"release_date":"1980-05-21","poster_path":"\/6u1fYtxG5eqjhtCPDx04pJphQRW.jpg","backdrop_path":"\/AkE7LQs2hPMG5tpWYcum847Knre.jpg"},{"title":"Star Wars: Episode VI - Return of the Jedi","id":1892,"release_date":"1983-05-25","poster_path":"\/jx5p0aHlbPXqe3AH9G15NvmWaqQ.jpg","backdrop_path":"\/bvJOpyHYWACDusvQvXxKEHFNjce.jpg"},{"title":"Star Wars: Episode I - The Phantom Menace","id":1893,"release_date":"1999-05-19","poster_path":"\/n8V09dDc02KsSN6Q4hC2BX6hN8X.jpg","backdrop_path":"\/rtG5TRrQXf11jlO9WqcYTq46jKa.jpg"},{"title":"Star Wars: Episode II - Attack of the Clones","id":1894,"release_date":"2002-05-16","poster_path":"\/2vcNFtrZXNwIcBgH5e2xXCmVR8t.jpg","backdrop_path":"\/560F7BPaxRy8BsOfVU6cW4ivM46.jpg"},{"title":"Star Wars: Episode III - Revenge of the Sith","id":1895,"release_date":"2005-05-19","poster_path":"\/tgr5Pdy7ehZYBqBkN2K7Q02xgOb.jpg","backdrop_path":"\/wUYTfFbfPiZC6Lcyt1nonr69ZmK.jpg"},{"title":"Star Wars: Episode VII","id":140607,"release_date":"2015-12-18","poster_path":"\/t3aXDG1ktf6cRJ6iK4epQKxh6Ey.jpg","backdrop_path":null},{"title":"Star Wars: Episode VIII","id":181808,"release_date":"2017-01-01","poster_path":null,"backdrop_path":null},{"title":"Star Wars: Episode IX","id":181812,"release_date":"2019-12-31","poster_path":null,"backdrop_path":null}],"images":{"backdrops":[{"aspect_ratio":1.78,"file_path":"\/qCECROwx3TRUEgoZv2Mz2D723QC.jpg","height":720,"iso_639_1":"xx","vote_average":"5.38461538461539","vote_count":2,"width":1280},{"aspect_ratio":1.78,"file_path":"\/trf3Hi3tPOJARsCBoVMDBlpjPC4.jpg","height":1080,"iso_639_1":"en","vote_average":"5.31746031746032","vote_count":3,"width":1920},{"aspect_ratio":1.78,"file_path":"\/d8duYyyC9J5T825Hg7grmaabfxQ.jpg","height":1080,"iso_639_1":null,"vote_average":"5.31512605042017","vote_count":5,"width":1920},{"aspect_ratio":1.78,"file_path":"\/sGxcMvC6mfCzEir0c1tldsPhZEF.jpg","height":1080,"iso_639_1":"xx","vote_average":5.3125,"vote_count":1,"width":1920},{"aspect_ratio":1.78,"file_path":"\/n9NcXAZIurCo9RHvMahOCT244rF.jpg","height":1080,"iso_639_1":"en","vote_average":5.3125,"vote_count":1,"width":1920},{"aspect_ratio":1.78,"file_path":"\/rgjAb1oUCzJk1U2WhtQt7gGu84U.jpg","height":1080,"iso_639_1":null,"vote_average":"5.29330572808834","vote_count":6,"width":1920},{"aspect_ratio":1.78,"file_path":"\/noKFlPn2GjuUounuxtmPnkRlZpa.jpg","height":1080,"iso_639_1":"en","vote_average":"5.25230987917555","vote_count":4,"width":1920},{"aspect_ratio":1.78,"file_path":"\/3XwvVWP33yWOqwVlJCSZWC1Uy58.jpg","height":720,"iso_639_1":null,"vote_average":"5.24509803921569","vote_count":5,"width":1280},{"aspect_ratio":1.78,"file_path":"\/h3JDR9iruHqwGC4Dm8UbYkY9paK.jpg","height":1080,"iso_639_1":"en","vote_average":"5.23809523809524","vote_count":2,"width":1920},{"aspect_ratio":1.78,"file_path":"\/8JLnshhK3pRzIup79skBpDGeGTC.jpg","height":1080,"iso_639_1":null,"vote_average":"5.21677327647477","vote_count":4,"width":1920},{"aspect_ratio":1.78,"file_path":"\/oGf9FeB8coLGYVp3SMHjAR809Lv.jpg","height":1080,"iso_639_1":"en","vote_average":"5.07275132275132","vote_count":9,"width":1920},{"aspect_ratio":1.78,"file_path":"\/qVPChlozQ1BP3svfHjiAdNneMGA.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920}],"posters":[{"aspect_ratio":0.67,"file_path":"\/ghd5zOQnDaDW1mxO7R5fXXpZMu.jpg","height":1500,"iso_639_1":"en","vote_average":"5.56190476190476","vote_count":12,"width":1000},{"aspect_ratio":0.67,"file_path":"\/mEpQbsUSekbQRdffXMeQWjeHb34.jpg","height":1500,"iso_639_1":"en","vote_average":"5.52795031055901","vote_count":6,"width":1000},{"aspect_ratio":0.67,"file_path":"\/gq5Wi7i4SF3lo4HHkJasDV95xI9.jpg","height":1500,"iso_639_1":"en","vote_average":"5.50034506556246","vote_count":6,"width":1000},{"aspect_ratio":0.67,"file_path":"\/y6oGacKFP025f0PVwG94X60jjQS.jpg","height":1500,"iso_639_1":"en","vote_average":"5.45988258317025","vote_count":10,"width":1000},{"aspect_ratio":0.67,"file_path":"\/aLDdG5e3c2qNMcWzlxAnW15okOr.jpg","height":1500,"iso_639_1":"en","vote_average":"5.33759772565743","vote_count":4,"width":1000},{"aspect_ratio":0.7,"file_path":"\/4B4OwAiu0xhOLI0p1AWBifG3qPE.jpg","height":1426,"iso_639_1":"fr","vote_average":5.3125,"vote_count":1,"width":1000},{"aspect_ratio":0.68,"file_path":"\/jVTIJ33eGKja0SfI40ntASPBmnw.jpg","height":1240,"iso_639_1":"fr","vote_average":"5.28860028860029","vote_count":3,"width":844},{"aspect_ratio":0.67,"file_path":"\/7TOaabZ4TFqtn8cD1Jw1G7ycgSs.jpg","height":1500,"iso_639_1":"it","vote_average":"5.26785714285714","vote_count":1,"width":1000},{"aspect_ratio":0.71,"file_path":"\/me843ySolO7vwJqQcJ6OUbcRM3H.jpg","height":1437,"iso_639_1":"ru","vote_average":"5.24542124542125","vote_count":2,"width":1027},{"aspect_ratio":0.67,"file_path":"\/ilNSTtnUMe2ddDlP13d8jD0aEMN.jpg","height":1500,"iso_639_1":"en","vote_average":"5.24542124542125","vote_count":2,"width":1000},{"aspect_ratio":0.67,"file_path":"\/klv4rvIxnyJcZAI3DFvW5gHTSpM.jpg","height":1500,"iso_639_1":"en","vote_average":"5.17687074829932","vote_count":7,"width":1000},{"aspect_ratio":0.7,"file_path":"\/ui6EhLps52ZzINfrpJUj3VbO8k1.jpg","height":2185,"iso_639_1":"en","vote_average":"5.17216117216117","vote_count":2,"width":1528},{"aspect_ratio":0.67,"file_path":"\/5UH606AITCZt5Q0l6ovLyD3zsif.jpg","height":1500,"iso_639_1":"hu","vote_average":"5.17113095238095","vote_count":1,"width":1000},{"aspect_ratio":0.65,"file_path":"\/9nW1f6FqC87aNaRcNGL4J2exLkY.jpg","height":2301,"iso_639_1":"en","vote_average":"5.16369047619048","vote_count":1,"width":1500},{"aspect_ratio":0.75,"file_path":"\/mWAfAZVaw9mOOFEpaPwJHRENPza.jpg","height":1200,"iso_639_1":"fr","vote_average":"5.06122448979592","vote_count":7,"width":900},{"aspect_ratio":0.67,"file_path":"\/ssxXzbpxQtaa20qcl3Z2vHEKwmm.jpg","height":1500,"iso_639_1":"en","vote_average":"5.05772005772006","vote_count":3,"width":1000},{"aspect_ratio":0.7,"file_path":"\/fdmSovGcTO4qeYH4llwqDsYi5cB.jpg","height":713,"iso_639_1":"en","vote_average":"5.03105590062112","vote_count":6,"width":500}]}} \ No newline at end of file diff --git a/test/Tmdb/Tests/Resources/configuration/get.json b/test/Tmdb/Tests/Resources/configuration/get.json new file mode 100644 index 00000000..0deeaeea --- /dev/null +++ b/test/Tmdb/Tests/Resources/configuration/get.json @@ -0,0 +1 @@ +{"images":{"base_url":"http:\/\/image.tmdb.org\/t\/p\/","secure_base_url":"https:\/\/image.tmdb.org\/t\/p\/","backdrop_sizes":["w300","w780","w1280","original"],"logo_sizes":["w45","w92","w154","w185","w300","w500","original"],"poster_sizes":["w92","w154","w185","w342","w500","original"],"profile_sizes":["w45","w185","h632","original"],"still_sizes":["w92","w185","w300","original"]},"change_keys":["adult","also_known_as","alternative_titles","biography","birthday","budget","cast","character_names","crew","deathday","general","genres","homepage","images","imdb_id","name","original_title","overview","plot_keywords","production_companies","production_countries","releases","revenue","runtime","spoken_languages","status","tagline","title","trailers","translations"]} \ No newline at end of file diff --git a/test/Tmdb/Tests/Resources/person/get.json b/test/Tmdb/Tests/Resources/person/get.json new file mode 100644 index 00000000..2938fd27 --- /dev/null +++ b/test/Tmdb/Tests/Resources/person/get.json @@ -0,0 +1 @@ +{"adult":false,"also_known_as":[],"biography":"From Wikipedia, the free encyclopedia.\n\nGary Sinise ( born March 17, 1955) is an American actor, film director and musician. During his career, Sinise has won various awards including an Emmy and a Golden Globe Award and was nominated for an Academy Award. In 1992, Sinise directed, and played the role of George Milton in the successful film adaptation Of Mice and Men. Sinise was nominated for the Academy Award for Best Supporting Actor in 1994 for his role as Lt. Dan Taylor in Forrest Gump. He won a Golden Globe Award for his role in Truman, as Harry S. Truman. In 1996, he played a corrupt police officer in the dramatic hit Ransom, Detective Jimmy Shaker. In 1998, Sinise was awarded an Emmy Award for the television film George Wallace, a portrayal of the late George C. Wallace. Since 2004, Sinise has starred in CBS's CSI: NY as Detective Mac Taylor.\n\nDescription above from the Wikipedia article Gary Sinise, licensed under CC-BY-SA, full list of contributors on Wikipedia.","birthday":"1955-03-17","deathday":"","homepage":"","id":33,"imdb_id":"nm0000641","name":"Gary Sinise","place_of_birth":"Blue Island, Illinois, USA","popularity":"2.26771296623734","profile_path":"\/h9YwlLHANaQzaTVkVwxnxLbvCY4.jpg","images":{"profiles":[{"file_path":"\/h9YwlLHANaQzaTVkVwxnxLbvCY4.jpg","width":300,"height":450,"iso_639_1":null,"aspect_ratio":0.67},{"file_path":"\/6p8c35Emww9Qr6sujUswpAml1CN.jpg","width":723,"height":1024,"iso_639_1":null,"aspect_ratio":0.71},{"file_path":"\/aa2DOJZWvTcYSvoEKJzwfulv3sc.jpg","width":540,"height":720,"iso_639_1":null,"aspect_ratio":0.75},{"file_path":"\/kGPIU5D306CSkmH0npWuuVcQjrX.jpg","width":300,"height":450,"iso_639_1":null,"aspect_ratio":0.67}]},"changes":{"changes":[]},"combined_credits":{"cast":[{"id":497,"title":"The Green Mile","character":"Lawyer Burt Hammersmith","original_title":"The Green Mile","poster_path":"\/3yJUlOtVa09CYJocwBU8eAryja0.jpg","release_date":"1999-12-05","adult":false,"media_type":"movie"},{"id":568,"title":"Apollo 13","character":"Ken Mattingly","original_title":"Apollo 13","poster_path":"\/7ksHQG9qbEyPBBTAe8NfJVAipmJ.jpg","release_date":"1995-06-30","adult":false,"media_type":"movie"},{"id":2067,"title":"Mission to Mars","character":"Jim McConnell","original_title":"Mission to Mars","poster_path":"\/eco5chujn3Mt7HnuMTUIuobPMoX.jpg","release_date":"2000-03-06","adult":false,"media_type":"movie"},{"id":2155,"title":"Reindeer Games","character":"Gabriel Mercer","original_title":"Reindeer Games","poster_path":"\/rK1P7za5gHvCqjrOVcsUTSlaSNq.jpg","release_date":"2000-02-25","adult":false,"media_type":"movie"},{"id":3595,"title":"Ransom","character":"Det. Jimmy Shaker","original_title":"Ransom","poster_path":"\/96pdw2qcx4g25vZLywNi4XRQVqm.jpg","release_date":"1996-11-08","adult":false,"media_type":"movie"},{"id":8744,"title":"Albino Alligator","character":"Milo","original_title":"Albino Alligator","poster_path":"\/jyDSlbq3FO5JIw8RuaQJl5bwMvI.jpg","release_date":"1996-09-09","adult":false,"media_type":"movie"},{"id":9609,"title":"Of Mice and Men","character":"George Milton","original_title":"Of Mice and Men","poster_path":"\/jBRcO6XrNZdWpQOVzkVpN7eJO4Q.jpg","release_date":"1992-10-02","adult":false,"media_type":"movie"},{"id":13519,"title":"The Stand","character":"Stu Redman","original_title":"The Stand","poster_path":"\/A3C9Ko4EZy1N1bzxBNlebnv5Fbr.jpg","release_date":"1994-05-08","adult":false,"media_type":"movie"},{"id":16901,"title":"Truman","character":"Harry S. Truman","original_title":"Truman","poster_path":"\/rg5YOvECqqArdZggjRmDBdjbSTh.jpg","release_date":"1995-09-09","adult":false,"media_type":"movie"},{"id":23908,"title":"A Midnight Clear","character":"Vance 'Mother' Wilkins","original_title":"A Midnight Clear","poster_path":"\/pwjzFhrzHmMTw3po5TCTkvFl9I9.jpg","release_date":"1992-04-24","adult":false,"media_type":"movie"},{"id":31018,"title":"Path to War","character":"","original_title":"Path to War","poster_path":"\/9M6zaDxlo0wTVQqo3Ighg9Y1pmY.jpg","release_date":"2002-01-01","adult":false,"media_type":"movie"},{"id":36809,"title":"When We Left Earth","character":"Narrator","original_title":"When We Left Earth","poster_path":"\/mmq0OwF5YYXLI3KNUWP3OI0C519.jpg","release_date":"2008-06-08","adult":false,"media_type":"movie"},{"id":38749,"title":"Jack the Bear","character":"Norman Strick","original_title":"Jack the Bear","poster_path":"\/pw5R5SXEJwfbAOBNPIQQotSWJOW.jpg","release_date":"1993-04-02","adult":false,"media_type":"movie"},{"id":39302,"title":"The Witness","character":"Young Soldier","original_title":"The Witness","poster_path":null,"release_date":"1992-01-01","adult":false,"media_type":"movie"},{"id":30946,"title":"All the Rage","character":"Morgan","original_title":"All the Rage","poster_path":"\/843mxrcWYqfk4CltGsqqmxfWbNm.jpg","release_date":"2000-03-04","adult":false,"media_type":"movie"},{"id":55210,"title":"Fallen Angel","character":"Terry McQuinn","original_title":"Fallen Angel","poster_path":"\/8M1hF3CKnemApy5AQNof2wlAnvD.jpg","release_date":"2003-03-11","adult":false,"media_type":"movie"},{"id":61445,"title":"George Wallace","character":"George C. Wallace","original_title":"George Wallace","poster_path":"\/edhs7A0EYrEEzvT1rajWtNC5bH0.jpg","release_date":"1997-08-24","adult":false,"media_type":"movie"},{"id":69314,"title":"Chicago Cubs: The Heart and Soul of Chicago","character":"Narrator","original_title":"Chicago Cubs: The Heart and Soul of Chicago","poster_path":"\/sKJyuMPn5Te8wGuYlj7Yl1en1FB.jpg","release_date":"2011-05-17","adult":false,"media_type":"movie"},{"id":47115,"title":"A Gentleman's Game","character":"Foster Pearse","original_title":"A Gentleman's Game","poster_path":"\/nxNPiTMzNKbw701DS3R9erwlv0F.jpg","release_date":"2002-01-01","adult":false,"media_type":"movie"},{"id":4965,"title":"Impostor","character":"Spencer Olham","original_title":"Impostor","poster_path":"\/7puyy9kdDIXKMRrS018ZqaoG2mr.jpg","release_date":"2001-12-03","adult":false,"media_type":"movie"},{"id":8688,"title":"Snake Eyes","character":"Commander Kevin Dunne","original_title":"Snake Eyes","poster_path":"\/lCKdTf0Cy3R3kBuw2xmWmbxX6pZ.jpg","release_date":"1998-08-07","adult":false,"media_type":"movie"},{"id":13,"title":"Forrest Gump","character":"Lt. Dan Taylor","original_title":"Forrest Gump","poster_path":"\/z4ROnCrL77ZMzT0MsNXY5j25wS2.jpg","release_date":"1994-06-22","adult":false,"media_type":"movie"},{"id":7484,"title":"Open Season","character":"Shaw (voice)","original_title":"Open Season","poster_path":"\/9TY3wQPNhZ60Mng0JetKEOfXqxU.jpg","release_date":"2006-09-29","adult":false,"media_type":"movie"},{"id":12634,"title":"The Big Bounce","character":"Ray Ritchie","original_title":"The Big Bounce","poster_path":"\/yTKph1RyCpJg0tWTuZuI0zLa9dD.jpg","release_date":"2004-01-29","adult":false,"media_type":"movie"},{"id":10922,"title":"The Human Stain","character":"Nathan Zuckerman","original_title":"The Human Stain","poster_path":"\/nfT5YqVhgblLn9rCiBkBl1JXPoy.jpg","release_date":"2003-10-31","adult":false,"media_type":"movie"},{"id":15727,"title":"My Name is Bill W.","character":"Ebby","original_title":"My Name is Bill W.","poster_path":"\/9BDAsNUL6yPH2pJkSDP6R5EObkN.jpg","release_date":"1989-04-30","adult":false,"media_type":"movie"},{"id":81404,"title":"A Game of Honor","character":"Narrator","original_title":"A Game of Honor","poster_path":null,"release_date":"2011-12-21","adult":false,"media_type":"movie"},{"id":95136,"title":"Bruno","character":"Dino Battaglia","original_title":"Bruno","poster_path":"\/pkvkpL2cqhCh0cR5Lae8BlCsQPK.jpg","release_date":"2000-12-01","adult":false,"media_type":"movie"},{"id":96521,"title":"That Championship Season","character":"Tom Daley","original_title":"That Championship Season","poster_path":"\/mJoU1X0qYWn2Zup972LF67z8H8e.jpg","release_date":"1999-06-06","adult":false,"media_type":"movie"},{"id":133776,"title":"Into The Fire","character":"Self","original_title":"Into The Fire","poster_path":"\/d2fwULDYWkynesGWZQy6ACCkswf.jpg","release_date":"2006-10-13","adult":false,"media_type":"movie"},{"id":141498,"title":"Lost Moon: The Triumph of Apollo 13","character":"Himself","original_title":"Lost Moon: The Triumph of Apollo 13","poster_path":null,"release_date":"1996-01-01","adult":false,"media_type":"movie"},{"id":12106,"title":"The Quick and the Dead","character":"Marshall","original_title":"The Quick and the Dead","poster_path":"\/dGw34L86JBo0KgNJuRq82LqOERe.jpg","release_date":"1995-02-09","adult":false,"media_type":"movie"},{"id":237353,"title":"Through the Eyes of Forrest Gump","character":"Himself","original_title":"Through the Eyes of Forrest Gump","poster_path":"\/4ntON0D2USxVoO7A7nAx5936TbO.jpg","release_date":"1994-10-01","adult":false,"media_type":"movie"},{"id":250195,"title":"True West","character":"Austin","original_title":"True West","poster_path":"\/fU4JWbRLPjpMQ03Qp2ZWrsaDfMx.jpg","release_date":"1984-02-01","adult":false,"media_type":"movie"},{"id":251146,"title":"The Grapes of Wrath","character":"","original_title":"The Grapes of Wrath","poster_path":null,"release_date":"1991-01-01","adult":false,"media_type":"movie"},{"character":"","credit_id":"52570e1e760ee3776a096611","episode_count":2,"first_air_date":"2002-09-23","id":1620,"name":"CSI: Miami","original_name":"CSI: Miami","poster_path":"\/9brFwnnRmnHykxcrvn7ez79dXb6.jpg","media_type":"tv"},{"character":"","credit_id":"52572881760ee3776a297b85","episode_count":2,"first_air_date":"1997-08-11","id":2221,"name":"The View","original_name":"The View","poster_path":"\/2O8PmwGTUudEwKhqw9Wz4WECgNX.jpg","media_type":"tv"},{"character":"Mac Taylor","credit_id":"5257396d760ee3668d01d282","episode_count":137,"first_air_date":"2004-09-22","id":2458,"name":"CSI: NY","original_name":"CSI: NY","poster_path":"\/rtvezj8Z2NVE9fu83YOU1HimwYP.jpg","media_type":"tv"},{"character":"","credit_id":"52578be7760ee36aaa68686f","episode_count":20,"first_air_date":"2008-06-08","id":7398,"name":"When We Left Earth: The NASA Missions","original_name":"When We Left Earth: The NASA Missions","poster_path":"\/nhvJsJQiONyKIxbWDIKyA7NRmii.jpg","media_type":"tv"},{"character":"Stu Redman","credit_id":"525794db760ee36aaa70e90b","episode_count":5,"first_air_date":"1994-05-08","id":9045,"name":"The Stand","original_name":"The Stand","poster_path":"\/pPPrWmRFMnkTouVQuoIrKFZ5fUr.jpg","media_type":"tv"},{"character":"George C. Wallace","credit_id":"525858a2760ee346610d5668","episode_count":0,"first_air_date":null,"id":18898,"name":"George Wallace","original_name":"George Wallace","poster_path":null,"media_type":"tv"},{"character":"","credit_id":"5258a2df760ee3466166b393","episode_count":11,"first_air_date":"2009-11-15","id":32236,"name":"WWII in HD","original_name":"WWII in HD","poster_path":"\/zifQ8lnZVGc2cNMmA4HsyxXzBGp.jpg","media_type":"tv"},{"character":"","credit_id":"5258dbc9760ee34661752c40","episode_count":1,"first_air_date":"2004-01-26","id":34887,"name":"Dennis Miller","original_name":"Dennis Miller","poster_path":null,"media_type":"tv"},{"character":"","credit_id":"5253460d19c29579400c5562","episode_count":1,"first_air_date":"1994-06-01","id":217,"name":"Inside the Actors Studio","original_name":"Inside the Actors Studio","poster_path":"\/lH56Wic4WkXAzaRCnhhaBiNaHPS.jpg","media_type":"tv"},{"character":"","credit_id":"52534e4f19c2957940107b9b","episode_count":1,"first_air_date":"2004-09-13","id":319,"name":"The Tony Danza Show","original_name":"The Tony Danza Show","poster_path":null,"media_type":"tv"},{"character":"","credit_id":"52573de9760ee36aaa052e49","episode_count":1,"first_air_date":"1979-12-27","id":2595,"name":"Knots Landing","original_name":"Knots Landing","poster_path":"\/rn6oZdrIKFh5E1ll9YDZKf3AOmg.jpg","media_type":"tv"},{"character":"","credit_id":"52574aac19c29531db0a4548","episode_count":1,"first_air_date":"1986-09-18","id":2966,"name":"Crime Story","original_name":"Crime Story","poster_path":"\/akyWWVoUlv8EMIMUNsOVkUorklO.jpg","media_type":"tv"},{"character":"","credit_id":"52574dad760ee36aaa16f0a7","episode_count":1,"first_air_date":"1999-11-01","id":3167,"name":"The Early Show","original_name":"The Early Show","poster_path":null,"media_type":"tv"},{"character":"","credit_id":"525750d4760ee36aaa1b6bd5","episode_count":1,"first_air_date":"1993-09-16","id":3452,"name":"Frasier","original_name":"Frasier","poster_path":"\/T6HMl01VDc8KWcqejh6o0EKr3V.jpg","media_type":"tv"},{"character":"","credit_id":"52576712760ee36aaa38b393","episode_count":1,"first_air_date":"2005-10-17","id":4385,"name":"The Colbert Report","original_name":"The Colbert Report","poster_path":"\/ehnYRh25twdBGd52uVwX5czC1Bc.jpg","media_type":"tv"},{"character":"","credit_id":"525770c7760ee36aaa48381c","episode_count":1,"first_air_date":"1984-09-18","id":4571,"name":"Hunter","original_name":"Hunter","poster_path":"\/51FtxCpGYzyFVR18ysVxPsiy0yq.jpg","media_type":"tv"},{"character":"","credit_id":"52577129760ee36aaa4932a7","episode_count":1,"first_air_date":"1993-09-13","id":4573,"name":"Late Night with Conan O'Brien","original_name":"Late Night with Conan O'Brien","poster_path":"\/v4N5l6JooObhXbjXoFaKbx92wB9.jpg","media_type":"tv"},{"character":"","credit_id":"52577bd319c29531db2054b5","episode_count":1,"first_air_date":"1951-12-24","id":4779,"name":"Hallmark Hall of Fame","original_name":"Hallmark Hall of Fame","poster_path":"\/bQxcF14v7jyR6XReTAJK45VFSJU.jpg","media_type":"tv"},{"character":"","credit_id":"52586d4e760ee346611dd47b","episode_count":1,"first_air_date":"2001-09-17","id":22073,"name":"Good Day Live","original_name":"Good Day Live","poster_path":null,"media_type":"tv"},{"character":"","credit_id":"52588335760ee346614022fc","episode_count":1,"first_air_date":"1929-05-16","id":27023,"name":"The Academy Awards","original_name":"The Academy Awards","poster_path":"\/oQJeREgBeF1Afz9DABo5ymwu63Y.jpg","media_type":"tv"},{"character":"","credit_id":"52589998760ee346615d5e09","episode_count":8,"first_air_date":"1996-09-15","id":30715,"name":"The West","original_name":"The West","poster_path":"\/4gxjDLxD7lS4bVyvGRohMijbeNi.jpg","media_type":"tv"}],"crew":[{"id":4965,"title":"Impostor","original_title":"Impostor","department":"Production","job":"Producer","poster_path":"\/7puyy9kdDIXKMRrS018ZqaoG2mr.jpg","release_date":"2001-12-03","adult":false,"media_type":"movie"},{"id":9609,"title":"Of Mice and Men","original_title":"Of Mice and Men","department":"Directing","job":"Director","poster_path":"\/jBRcO6XrNZdWpQOVzkVpN7eJO4Q.jpg","release_date":"1992-10-02","adult":false,"media_type":"movie"},{"id":9609,"title":"Of Mice and Men","original_title":"Of Mice and Men","department":"Production","job":"Producer","poster_path":"\/jBRcO6XrNZdWpQOVzkVpN7eJO4Q.jpg","release_date":"1992-10-02","adult":false,"media_type":"movie"},{"id":50020,"title":"Miles from Home","original_title":"Miles from Home","department":"Directing","job":"Director","poster_path":"\/jmF8dYa9rSemXadxvhPVE9yLnb6.jpg","release_date":"1988-09-16","adult":false,"media_type":"movie"},{"credit_id":"525704e6760ee3776a0087ae","department":"Directing","episode_count":2,"id":1448,"job":"Director","name":"Thirtysomething","original_name":"Thirtysomething","poster_path":"\/tlEWRrWe2SCd0cYfk3X5LEoiOpm.jpg","media_type":"tv"},{"credit_id":"52572f7e760ee3776a328459","department":"Directing","episode_count":1,"id":2294,"job":"Director","name":"China Beach","original_name":"China Beach","poster_path":"\/l1GpOvQVV6I467ybyjYT7Brpv7b.jpg","media_type":"tv"},{"credit_id":"52574aad19c29531db0a4710","department":"Directing","episode_count":2,"id":2966,"job":"Director","name":"Crime Story","original_name":"Crime Story","poster_path":"\/akyWWVoUlv8EMIMUNsOVkUorklO.jpg","media_type":"tv"}]},"movie_credits":{"cast":[{"id":497,"title":"The Green Mile","character":"Lawyer Burt Hammersmith","original_title":"The Green Mile","poster_path":"\/3yJUlOtVa09CYJocwBU8eAryja0.jpg","release_date":"1999-12-05","adult":false},{"id":568,"title":"Apollo 13","character":"Ken Mattingly","original_title":"Apollo 13","poster_path":"\/7ksHQG9qbEyPBBTAe8NfJVAipmJ.jpg","release_date":"1995-06-30","adult":false},{"id":2067,"title":"Mission to Mars","character":"Jim McConnell","original_title":"Mission to Mars","poster_path":"\/eco5chujn3Mt7HnuMTUIuobPMoX.jpg","release_date":"2000-03-06","adult":false},{"id":2155,"title":"Reindeer Games","character":"Gabriel Mercer","original_title":"Reindeer Games","poster_path":"\/rK1P7za5gHvCqjrOVcsUTSlaSNq.jpg","release_date":"2000-02-25","adult":false},{"id":3595,"title":"Ransom","character":"Det. Jimmy Shaker","original_title":"Ransom","poster_path":"\/96pdw2qcx4g25vZLywNi4XRQVqm.jpg","release_date":"1996-11-08","adult":false},{"id":8744,"title":"Albino Alligator","character":"Milo","original_title":"Albino Alligator","poster_path":"\/jyDSlbq3FO5JIw8RuaQJl5bwMvI.jpg","release_date":"1996-09-09","adult":false},{"id":9609,"title":"Of Mice and Men","character":"George Milton","original_title":"Of Mice and Men","poster_path":"\/jBRcO6XrNZdWpQOVzkVpN7eJO4Q.jpg","release_date":"1992-10-02","adult":false},{"id":13519,"title":"The Stand","character":"Stu Redman","original_title":"The Stand","poster_path":"\/A3C9Ko4EZy1N1bzxBNlebnv5Fbr.jpg","release_date":"1994-05-08","adult":false},{"id":16901,"title":"Truman","character":"Harry S. Truman","original_title":"Truman","poster_path":"\/rg5YOvECqqArdZggjRmDBdjbSTh.jpg","release_date":"1995-09-09","adult":false},{"id":23908,"title":"A Midnight Clear","character":"Vance 'Mother' Wilkins","original_title":"A Midnight Clear","poster_path":"\/pwjzFhrzHmMTw3po5TCTkvFl9I9.jpg","release_date":"1992-04-24","adult":false},{"id":31018,"title":"Path to War","character":"","original_title":"Path to War","poster_path":"\/9M6zaDxlo0wTVQqo3Ighg9Y1pmY.jpg","release_date":"2002-01-01","adult":false},{"id":36809,"title":"When We Left Earth","character":"Narrator","original_title":"When We Left Earth","poster_path":"\/mmq0OwF5YYXLI3KNUWP3OI0C519.jpg","release_date":"2008-06-08","adult":false},{"id":38749,"title":"Jack the Bear","character":"Norman Strick","original_title":"Jack the Bear","poster_path":"\/pw5R5SXEJwfbAOBNPIQQotSWJOW.jpg","release_date":"1993-04-02","adult":false},{"id":39302,"title":"The Witness","character":"Young Soldier","original_title":"The Witness","poster_path":null,"release_date":"1992-01-01","adult":false},{"id":30946,"title":"All the Rage","character":"Morgan","original_title":"All the Rage","poster_path":"\/843mxrcWYqfk4CltGsqqmxfWbNm.jpg","release_date":"2000-03-04","adult":false},{"id":55210,"title":"Fallen Angel","character":"Terry McQuinn","original_title":"Fallen Angel","poster_path":"\/8M1hF3CKnemApy5AQNof2wlAnvD.jpg","release_date":"2003-03-11","adult":false},{"id":61445,"title":"George Wallace","character":"George C. Wallace","original_title":"George Wallace","poster_path":"\/edhs7A0EYrEEzvT1rajWtNC5bH0.jpg","release_date":"1997-08-24","adult":false},{"id":69314,"title":"Chicago Cubs: The Heart and Soul of Chicago","character":"Narrator","original_title":"Chicago Cubs: The Heart and Soul of Chicago","poster_path":"\/sKJyuMPn5Te8wGuYlj7Yl1en1FB.jpg","release_date":"2011-05-17","adult":false},{"id":47115,"title":"A Gentleman's Game","character":"Foster Pearse","original_title":"A Gentleman's Game","poster_path":"\/nxNPiTMzNKbw701DS3R9erwlv0F.jpg","release_date":"2002-01-01","adult":false},{"id":4965,"title":"Impostor","character":"Spencer Olham","original_title":"Impostor","poster_path":"\/7puyy9kdDIXKMRrS018ZqaoG2mr.jpg","release_date":"2001-12-03","adult":false},{"id":8688,"title":"Snake Eyes","character":"Commander Kevin Dunne","original_title":"Snake Eyes","poster_path":"\/lCKdTf0Cy3R3kBuw2xmWmbxX6pZ.jpg","release_date":"1998-08-07","adult":false},{"id":13,"title":"Forrest Gump","character":"Lt. Dan Taylor","original_title":"Forrest Gump","poster_path":"\/z4ROnCrL77ZMzT0MsNXY5j25wS2.jpg","release_date":"1994-06-22","adult":false},{"id":7484,"title":"Open Season","character":"Shaw (voice)","original_title":"Open Season","poster_path":"\/9TY3wQPNhZ60Mng0JetKEOfXqxU.jpg","release_date":"2006-09-29","adult":false},{"id":12634,"title":"The Big Bounce","character":"Ray Ritchie","original_title":"The Big Bounce","poster_path":"\/yTKph1RyCpJg0tWTuZuI0zLa9dD.jpg","release_date":"2004-01-29","adult":false},{"id":10922,"title":"The Human Stain","character":"Nathan Zuckerman","original_title":"The Human Stain","poster_path":"\/nfT5YqVhgblLn9rCiBkBl1JXPoy.jpg","release_date":"2003-10-31","adult":false},{"id":15727,"title":"My Name is Bill W.","character":"Ebby","original_title":"My Name is Bill W.","poster_path":"\/9BDAsNUL6yPH2pJkSDP6R5EObkN.jpg","release_date":"1989-04-30","adult":false},{"id":81404,"title":"A Game of Honor","character":"Narrator","original_title":"A Game of Honor","poster_path":null,"release_date":"2011-12-21","adult":false},{"id":95136,"title":"Bruno","character":"Dino Battaglia","original_title":"Bruno","poster_path":"\/pkvkpL2cqhCh0cR5Lae8BlCsQPK.jpg","release_date":"2000-12-01","adult":false},{"id":96521,"title":"That Championship Season","character":"Tom Daley","original_title":"That Championship Season","poster_path":"\/mJoU1X0qYWn2Zup972LF67z8H8e.jpg","release_date":"1999-06-06","adult":false},{"id":133776,"title":"Into The Fire","character":"Self","original_title":"Into The Fire","poster_path":"\/d2fwULDYWkynesGWZQy6ACCkswf.jpg","release_date":"2006-10-13","adult":false},{"id":141498,"title":"Lost Moon: The Triumph of Apollo 13","character":"Himself","original_title":"Lost Moon: The Triumph of Apollo 13","poster_path":null,"release_date":"1996-01-01","adult":false},{"id":12106,"title":"The Quick and the Dead","character":"Marshall","original_title":"The Quick and the Dead","poster_path":"\/dGw34L86JBo0KgNJuRq82LqOERe.jpg","release_date":"1995-02-09","adult":false},{"id":237353,"title":"Through the Eyes of Forrest Gump","character":"Himself","original_title":"Through the Eyes of Forrest Gump","poster_path":"\/4ntON0D2USxVoO7A7nAx5936TbO.jpg","release_date":"1994-10-01","adult":false},{"id":250195,"title":"True West","character":"Austin","original_title":"True West","poster_path":"\/fU4JWbRLPjpMQ03Qp2ZWrsaDfMx.jpg","release_date":"1984-02-01","adult":false},{"id":251146,"title":"The Grapes of Wrath","character":"","original_title":"The Grapes of Wrath","poster_path":null,"release_date":"1991-01-01","adult":false}],"crew":[{"id":4965,"title":"Impostor","original_title":"Impostor","department":"Production","job":"Producer","poster_path":"\/7puyy9kdDIXKMRrS018ZqaoG2mr.jpg","release_date":"2001-12-03","adult":false},{"id":9609,"title":"Of Mice and Men","original_title":"Of Mice and Men","department":"Directing","job":"Director","poster_path":"\/jBRcO6XrNZdWpQOVzkVpN7eJO4Q.jpg","release_date":"1992-10-02","adult":false},{"id":9609,"title":"Of Mice and Men","original_title":"Of Mice and Men","department":"Production","job":"Producer","poster_path":"\/jBRcO6XrNZdWpQOVzkVpN7eJO4Q.jpg","release_date":"1992-10-02","adult":false},{"id":50020,"title":"Miles from Home","original_title":"Miles from Home","department":"Directing","job":"Director","poster_path":"\/jmF8dYa9rSemXadxvhPVE9yLnb6.jpg","release_date":"1988-09-16","adult":false}]},"tv_credits":{"cast":[{"character":"","credit_id":"52570e1e760ee3776a096611","episode_count":2,"first_air_date":"2002-09-23","id":1620,"name":"CSI: Miami","original_name":"CSI: Miami","poster_path":"\/9brFwnnRmnHykxcrvn7ez79dXb6.jpg"},{"character":"","credit_id":"52572881760ee3776a297b85","episode_count":2,"first_air_date":"1997-08-11","id":2221,"name":"The View","original_name":"The View","poster_path":"\/2O8PmwGTUudEwKhqw9Wz4WECgNX.jpg"},{"character":"Mac Taylor","credit_id":"5257396d760ee3668d01d282","episode_count":137,"first_air_date":"2004-09-22","id":2458,"name":"CSI: NY","original_name":"CSI: NY","poster_path":"\/rtvezj8Z2NVE9fu83YOU1HimwYP.jpg"},{"character":"","credit_id":"52578be7760ee36aaa68686f","episode_count":20,"first_air_date":"2008-06-08","id":7398,"name":"When We Left Earth: The NASA Missions","original_name":"When We Left Earth: The NASA Missions","poster_path":"\/nhvJsJQiONyKIxbWDIKyA7NRmii.jpg"},{"character":"Stu Redman","credit_id":"525794db760ee36aaa70e90b","episode_count":5,"first_air_date":"1994-05-08","id":9045,"name":"The Stand","original_name":"The Stand","poster_path":"\/pPPrWmRFMnkTouVQuoIrKFZ5fUr.jpg"},{"character":"George C. Wallace","credit_id":"525858a2760ee346610d5668","episode_count":0,"first_air_date":null,"id":18898,"name":"George Wallace","original_name":"George Wallace","poster_path":null},{"character":"","credit_id":"5258a2df760ee3466166b393","episode_count":11,"first_air_date":"2009-11-15","id":32236,"name":"WWII in HD","original_name":"WWII in HD","poster_path":"\/zifQ8lnZVGc2cNMmA4HsyxXzBGp.jpg"},{"character":"","credit_id":"5258dbc9760ee34661752c40","episode_count":1,"first_air_date":"2004-01-26","id":34887,"name":"Dennis Miller","original_name":"Dennis Miller","poster_path":null},{"character":"","credit_id":"5253460d19c29579400c5562","episode_count":1,"first_air_date":"1994-06-01","id":217,"name":"Inside the Actors Studio","original_name":"Inside the Actors Studio","poster_path":"\/lH56Wic4WkXAzaRCnhhaBiNaHPS.jpg"},{"character":"","credit_id":"52534e4f19c2957940107b9b","episode_count":1,"first_air_date":"2004-09-13","id":319,"name":"The Tony Danza Show","original_name":"The Tony Danza Show","poster_path":null},{"character":"","credit_id":"52573de9760ee36aaa052e49","episode_count":1,"first_air_date":"1979-12-27","id":2595,"name":"Knots Landing","original_name":"Knots Landing","poster_path":"\/rn6oZdrIKFh5E1ll9YDZKf3AOmg.jpg"},{"character":"","credit_id":"52574aac19c29531db0a4548","episode_count":1,"first_air_date":"1986-09-18","id":2966,"name":"Crime Story","original_name":"Crime Story","poster_path":"\/akyWWVoUlv8EMIMUNsOVkUorklO.jpg"},{"character":"","credit_id":"52574dad760ee36aaa16f0a7","episode_count":1,"first_air_date":"1999-11-01","id":3167,"name":"The Early Show","original_name":"The Early Show","poster_path":null},{"character":"","credit_id":"525750d4760ee36aaa1b6bd5","episode_count":1,"first_air_date":"1993-09-16","id":3452,"name":"Frasier","original_name":"Frasier","poster_path":"\/T6HMl01VDc8KWcqejh6o0EKr3V.jpg"},{"character":"","credit_id":"52576712760ee36aaa38b393","episode_count":1,"first_air_date":"2005-10-17","id":4385,"name":"The Colbert Report","original_name":"The Colbert Report","poster_path":"\/ehnYRh25twdBGd52uVwX5czC1Bc.jpg"},{"character":"","credit_id":"525770c7760ee36aaa48381c","episode_count":1,"first_air_date":"1984-09-18","id":4571,"name":"Hunter","original_name":"Hunter","poster_path":"\/51FtxCpGYzyFVR18ysVxPsiy0yq.jpg"},{"character":"","credit_id":"52577129760ee36aaa4932a7","episode_count":1,"first_air_date":"1993-09-13","id":4573,"name":"Late Night with Conan O'Brien","original_name":"Late Night with Conan O'Brien","poster_path":"\/v4N5l6JooObhXbjXoFaKbx92wB9.jpg"},{"character":"","credit_id":"52577bd319c29531db2054b5","episode_count":1,"first_air_date":"1951-12-24","id":4779,"name":"Hallmark Hall of Fame","original_name":"Hallmark Hall of Fame","poster_path":"\/bQxcF14v7jyR6XReTAJK45VFSJU.jpg"},{"character":"","credit_id":"52586d4e760ee346611dd47b","episode_count":1,"first_air_date":"2001-09-17","id":22073,"name":"Good Day Live","original_name":"Good Day Live","poster_path":null},{"character":"","credit_id":"52588335760ee346614022fc","episode_count":1,"first_air_date":"1929-05-16","id":27023,"name":"The Academy Awards","original_name":"The Academy Awards","poster_path":"\/oQJeREgBeF1Afz9DABo5ymwu63Y.jpg"},{"character":"","credit_id":"52589998760ee346615d5e09","episode_count":8,"first_air_date":"1996-09-15","id":30715,"name":"The West","original_name":"The West","poster_path":"\/4gxjDLxD7lS4bVyvGRohMijbeNi.jpg"}],"crew":[{"credit_id":"525704e6760ee3776a0087ae","department":"Directing","episode_count":2,"id":1448,"job":"Director","name":"Thirtysomething","original_name":"Thirtysomething","poster_path":"\/tlEWRrWe2SCd0cYfk3X5LEoiOpm.jpg"},{"credit_id":"52572f7e760ee3776a328459","department":"Directing","episode_count":1,"id":2294,"job":"Director","name":"China Beach","original_name":"China Beach","poster_path":"\/l1GpOvQVV6I467ybyjYT7Brpv7b.jpg"},{"credit_id":"52574aad19c29531db0a4710","department":"Directing","episode_count":2,"id":2966,"job":"Director","name":"Crime Story","original_name":"Crime Story","poster_path":"\/akyWWVoUlv8EMIMUNsOVkUorklO.jpg"}]}} \ No newline at end of file diff --git a/test/Tmdb/Tests/Resources/tv/all.json b/test/Tmdb/Tests/Resources/tv/all.json new file mode 100644 index 00000000..71c158de --- /dev/null +++ b/test/Tmdb/Tests/Resources/tv/all.json @@ -0,0 +1 @@ +{"backdrop_path":"\/sIJyCJedGlZf1TId41gCtkblBGo.jpg","created_by":[{"id":66633,"name":"Vince Gilligan","profile_path":"\/wSTvJGz7QbJf1HK2Mv1Cev6W9TV.jpg"}],"episode_run_time":[45,47],"first_air_date":"2008-01-19","genres":[{"id":18,"name":"Drama"}],"homepage":"http:\/\/www.amctv.com\/shows\/breaking-bad","id":1396,"in_production":false,"languages":["en","de","ro","es","fa"],"last_air_date":"2013-09-29","name":"Breaking Bad","networks":[{"id":174,"name":"AMC"}],"number_of_episodes":62,"number_of_seasons":5,"original_name":"Breaking Bad","origin_country":["US"],"overview":"Breaking Bad is an American crime drama television series created and produced by Vince Gilligan. Set and produced in Albuquerque, New Mexico, Breaking Bad is the story of Walter White, a struggling high school chemistry teacher who is diagnosed with inoperable lung cancer at the beginning of the series. He turns to a life of crime, producing and selling methamphetamine, in order to secure his family's financial future before he dies, teaming with his former student, Jesse Pinkman. Heavily serialized, the series is known for positioning its characters in seemingly inextricable corners and has been labeled a contemporary western by its creator.","popularity":8.14745667435,"poster_path":"\/iRDNn9EHKuBhGa77UBteazvsZa1.jpg","seasons":[{"air_date":"2009-02-17","poster_path":"\/AngNuUbXSciwLnUXtdOBHqphxNr.jpg","season_number":0},{"air_date":"2008-01-19","poster_path":"\/dHCYpEoHEjAV6Xt3eyNthkdLRl3.jpg","season_number":1},{"air_date":"2009-03-08","poster_path":"\/rCdISteF1GPvPsy0a5L0LDffjtP.jpg","season_number":2},{"air_date":"2010-03-21","poster_path":"\/rINvcsYHUprsx9L8zNr5JltALda.jpg","season_number":3},{"air_date":"2011-07-17","poster_path":"\/ngnE7FFQqrrLgK3yVsv3kjwtQMZ.jpg","season_number":4},{"air_date":"2012-07-15","poster_path":"\/ih1JKNxEzW56azeFpEQmdu4poA4.jpg","season_number":5}],"status":"Ended","vote_average":8.9,"vote_count":37,"credits":{"cast":[{"character":"Walter White","credit_id":"52542282760ee313280017f9","id":17419,"name":"Bryan Cranston","profile_path":"\/qXWgFCk4OJqmLRUBEj7cbp8dnkx.jpg","order":0},{"character":"Skyler White","credit_id":"52542282760ee3132800181b","id":134531,"name":"Anna Gunn","profile_path":"\/lKlGjfmu9mJcF4upNrhtG3X9uyq.jpg","order":1},{"character":"Jesse Pinkman","credit_id":"52542282760ee31328001845","id":84497,"name":"Aaron Paul","profile_path":"\/oTceEUb6A9Bg6DeUTJBTETUOEAy.jpg","order":2},{"character":"Hank Schrader","credit_id":"52542283760ee3132800187b","id":14329,"name":"Dean Norris","profile_path":"\/500eNhWneDTXQuEXg6BR269IjHr.jpg","order":3},{"character":"Marie Schrader","credit_id":"52542283760ee31328001891","id":1217934,"name":"Betsy Brandt","profile_path":"\/zpmsca1HCVqYrtWXV9xdmsECDTI.jpg","order":4},{"character":"Walter White Jr.","credit_id":"52542284760ee313280018a9","id":1223196,"name":"RJ Mitte","profile_path":"\/hO5HJKM6p6SQjpdV8Fs64BJWzmT.jpg","order":5},{"character":"Saul Goodman","credit_id":"5271b180760ee35afc09bb8d","id":59410,"name":"Bob Odenkirk","profile_path":"\/8Xkrpac7iYqUsO7ImMEfNlYRjfS.jpg","order":73}],"crew":[{"department":"Production","id":5162,"name":"Mark Johnson","job":"Executive Producer","profile_path":"\/yKGF6cbzyP03Gl1QhVLCu1gWSW6.jpg"},{"department":"Production","id":29779,"name":"Michelle MacLaren","job":"Executive Producer","profile_path":null},{"department":"Production","id":66633,"name":"Vince Gilligan","job":"Executive Producer","profile_path":"\/wSTvJGz7QbJf1HK2Mv1Cev6W9TV.jpg"},{"department":"Sound","id":1280070,"name":"Dave Porter","job":"Original Music Composer","profile_path":null}]},"external_ids":{"imdb_id":"tt0903747","freebase_id":"\/en\/breaking_bad","freebase_mid":"\/m\/03d34x8","tvdb_id":81189,"tvrage_id":18164},"images":{"backdrops":[{"aspect_ratio":1.78,"file_path":"\/sIJyCJedGlZf1TId41gCtkblBGo.jpg","height":1080,"iso_639_1":"en","vote_average":"5.38461538461539","vote_count":2,"width":1920},{"aspect_ratio":1.78,"file_path":"\/8STVFl9kvWtFAydXUFHIUvT47AA.jpg","height":1080,"iso_639_1":"en","vote_average":5.3125,"vote_count":1,"width":1920},{"aspect_ratio":1.78,"file_path":"\/2YeWCxUeVehwsTzyWaQjIf0RCfc.jpg","height":1080,"iso_639_1":"en","vote_average":"5.30505952380952","vote_count":1,"width":1920},{"aspect_ratio":1.78,"file_path":"\/bzoZjhbpriBT2N5kwgK0weUfVOX.jpg","height":1080,"iso_639_1":null,"vote_average":"5.29761904761905","vote_count":1,"width":1920},{"aspect_ratio":1.78,"file_path":"\/eSzpy96DwBujGFj0xMbXBcGcfxX.jpg","height":1080,"iso_639_1":null,"vote_average":"5.28273809523809","vote_count":1,"width":1920},{"aspect_ratio":1.78,"file_path":"\/yFVUqiugxQLLrYxwsIcGQ3P8FWO.jpg","height":1080,"iso_639_1":null,"vote_average":"5.27529761904762","vote_count":1,"width":1920},{"aspect_ratio":1.78,"file_path":"\/6u4YG0oNzhFaFJs080ljlpSgpfD.jpg","height":1080,"iso_639_1":null,"vote_average":"5.27529761904762","vote_count":1,"width":1920},{"aspect_ratio":1.78,"file_path":"\/zzSjSRC04z7dc4xQopWTJYmXb9g.jpg","height":1080,"iso_639_1":null,"vote_average":"5.25297619047619","vote_count":1,"width":1920},{"aspect_ratio":1.78,"file_path":"\/2X0RK6uztO7J5XBSRtRcNGlzGml.jpg","height":1080,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/n5kIjzyYNdDfJbfNkG68j3qDm6n.jpg","height":1080,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/u3TcKJ1qqgd8D3Dd73FnIMVVsur.jpg","height":1080,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/eIOpMbnMqiAgBS8cZocAATRsb28.jpg","height":1080,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/uOUwoxW2nO8mWN0KQrXiKdXK132.jpg","height":1080,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/dRaV8HGx7Z9xmw77qSs8prp5OuI.jpg","height":720,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1280},{"aspect_ratio":1.78,"file_path":"\/mojM8NJQlpTWpiD68rcOWnzcEVR.jpg","height":720,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1280},{"aspect_ratio":1.78,"file_path":"\/nIh1ygw5kVRaEFqXcj8CTi3pKK5.jpg","height":720,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1280},{"aspect_ratio":1.78,"file_path":"\/bbFaLaLv8TwR7KKnZ3reHGS4VQO.jpg","height":720,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1280},{"aspect_ratio":1.78,"file_path":"\/bFWW5vVZS1YW0a0Cq0liYakj6vt.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/siv4GtEMtrqljl0qiTGCvzolXWH.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/yG8QDHyrVMBe5H7Q7cIPKq45Iq0.jpg","height":720,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1280},{"aspect_ratio":1.78,"file_path":"\/6tRuCy7VXidZVRXIR4ThBx2omK3.jpg","height":1080,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/bZ23G5JiNmeZG9t6hRMLhY9W3gP.jpg","height":720,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1280},{"aspect_ratio":1.78,"file_path":"\/gVqPqjyiDmpoNJOFjvg0b8WCC3R.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/bagJdiz7JzB1bb87x24qKwrgWwK.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/an69IYogpnY2spo1dGVjmTy0m49.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/eCaT3wx244KPmnMchvag3kSGGw5.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/vIgu5fsJH50QcSz2hmfaqJHovUo.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/oyOGhA8G74rd8c6VdeU3Mi7v8n7.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/gN14vIo5T2G3kwtdS1lHuFeJXJ9.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/2cxsSpTNb8SFczKLrnXlhw2p7hW.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/5sHew9rjOsALuDVxwu0pJexOXWA.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/61nBiocMvOxvPtJgxk3GLCePvcf.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/aIOpF9Fp1SbYpSusJ3scDTYrqod.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/bTJLGUbqcGAuZnNvp59zjqqLzOR.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/mpfWjvSmNaYCzfUmfnGe1A1wkbu.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/77q8qOwsEJyZGDf3nzhq13bg98X.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/zintOUBVjVapaNN3vAmm1rcfY1p.jpg","height":1080,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/rmOmfel02YAgVRUdb9tlRyLW8mm.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/23RzDwwd78gCffMoBXoOKKSRlcr.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/m5apfrjjgc7jbOwRTXqDF5EXXfO.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/nxVC9a6TjeoKr6Ezkfz1jRSlf6L.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/qnnW0CY89lQZPgNrwpARJOBQtI1.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/k2N2DpK7kDcM0rXLKuTV6bUTIZN.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/ebQo1jOfx9UR9cPzBa6bHpxMWhq.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/rMvlRVBngldwWCoGqxQoPdJRnwC.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/abFs25RWEvn8WkLholkqFAUC8OF.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/v5F4chUYiRnH9cI2JCpWrrK3q6D.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/ymrPqhHl8v9tf3eK3f9byggZ0n7.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/99PL1OnOT9PVZx09qerR0s1g0Gx.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/162VmHV23N1FqQhYjZiZCH9GkQA.jpg","height":720,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1280},{"aspect_ratio":1.78,"file_path":"\/gzqjlgcYIHZSnUS1bnxVDxQwCR0.jpg","height":720,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1280},{"aspect_ratio":1.78,"file_path":"\/qfWveejMEeA4zGgscX8YUUTLuTB.jpg","height":1080,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/3FnSPz1nqkaW65dj4BWRN185adp.jpg","height":1080,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/va7jNaQUsIdWADokQSdPXeJYk1O.jpg","height":720,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":1280},{"aspect_ratio":1.78,"file_path":"\/nXlTbIrgroOCCKQSsMizmqQ4NAG.jpg","height":720,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":1280},{"aspect_ratio":1.78,"file_path":"\/mrPw1gAXXV8OYQTr8ipKuYTuaa6.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/qamG9LeH42UombW1bfZlIlzO5Y1.jpg","height":1080,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/ewRICWQvNXsViiUouM3M3jm5VyI.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/qgSmYpFBZdfHbjssjJN1XOrb2Us.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/tJAeZ3OoWDC1LVe7IBmGnBSOYZX.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/upeNbWF5wKZUOUcUW4EnVfYYjRo.jpg","height":1080,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/y3Roit8o1v7EYXGqH7AQMNUBZQR.jpg","height":1080,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":1920},{"aspect_ratio":1.78,"file_path":"\/uqBIxGmeZMLdBA3SIa7fXC438zw.jpg","height":1080,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":1920}],"posters":[{"aspect_ratio":0.68,"file_path":"\/iRDNn9EHKuBhGa77UBteazvsZa1.jpg","height":1000,"iso_639_1":"en","vote_average":"5.34798534798535","vote_count":2,"width":680},{"aspect_ratio":1,"file_path":"\/lVbofIPlw3kYa8FQgHT7GtWMI2Q.jpg","height":1000,"iso_639_1":"nl","vote_average":5.3125,"vote_count":1,"width":1000},{"aspect_ratio":0.67,"file_path":"\/4yMXf3DW6oCL0lVPZaZM2GypgwE.jpg","height":1500,"iso_639_1":"en","vote_average":5.3125,"vote_count":1,"width":1000},{"aspect_ratio":0.67,"file_path":"\/j5k6ZTYqamPDZplCCXuokjJ2PoJ.jpg","height":2400,"iso_639_1":"en","vote_average":"5.29761904761905","vote_count":1,"width":1600},{"aspect_ratio":0.68,"file_path":"\/fO3OqQQEIZN44K9jcs0Q4JuFHOl.jpg","height":1000,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/51H0ifZ0TM5sAp4yBvolUpFaPaC.jpg","height":1000,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/xkbl9GV6p9JwDPXIYwODVcunlRT.jpg","height":1000,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/u69b0G6HlfrwkchQdn8lzEEjFxt.jpg","height":1000,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/hyWz3p2KCxw3T3OTyFzQgYvkhJf.jpg","height":1000,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/mmtUaqRpsWcqb4ISF3CaoK0ptO7.jpg","height":1000,"iso_639_1":"ru","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/i5bfplXbyLm7BvofUBVj7Zaan4w.jpg","height":1000,"iso_639_1":"ru","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/mVIvcV9IEsfnTdbNXPNWkiU6N7t.jpg","height":1000,"iso_639_1":"ru","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/e6Ydx9xHuiQa6qsx20LR4x71DCS.jpg","height":1000,"iso_639_1":"ru","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/t9r2UYuRppdZKmeYHSgdx09uHzl.jpg","height":1000,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/3feoWsQPtBdUhrOCVPB1iazSb2W.jpg","height":1000,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/uL7s6lRsApvFuxQFqT5FA1SuSdX.jpg","height":1000,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/1gNZDkSc1kb9azLYVQHS9DCBpAs.jpg","height":1000,"iso_639_1":"ru","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/zdipQZmcmaCUNGsXP6OdBEjDCSP.jpg","height":1000,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/xd8tk9ox8QvQClvD48bmQc2t6dx.jpg","height":1000,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/pOLOC2tzz70N1RngVZtfhJuB5Fp.jpg","height":1000,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/85fOzuORUuQlDPSNkFCDnaUXZtv.jpg","height":1000,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/21YJ4mM7C9V5e2esqeB4AoBjKPy.jpg","height":1000,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/xMvrBjxu2EskHhiZ2sNgufBhGzF.jpg","height":1000,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/wnoMOVO06oI55fWrR0mQUbquERh.jpg","height":1000,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/ccxTzJHWYhAGg3MFaTzGfpFAXGi.jpg","height":1000,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/oAJvOW85rXKs8GlWoT5jssd7qNU.jpg","height":1000,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/8VxH7FSiCDmSZyfxsqz25ZWbP7O.jpg","height":1000,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/7pFpIXpn2DOst3bOMQIqCEHeAWS.jpg","height":1000,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/6uiT7QidRjVVywFgOAUQoY7iPup.jpg","height":1000,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/fzNaunYfNFvVesiIvcEgr8h4qix.jpg","height":1000,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/nXXSNb8qXn66DeZL0BIG79Omyo2.jpg","height":1000,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/biPjf15logCBAIptiM1YYCOeTxE.jpg","height":1000,"iso_639_1":"en","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.68,"file_path":"\/3bHLOzAOY2Rn4c5YrvALzZVE6tg.jpg","height":1000,"iso_639_1":"ru","vote_average":0,"vote_count":0,"width":680},{"aspect_ratio":0.71,"file_path":"\/6PIZjmmA8aYXBP2q2BrfTSqnahZ.jpg","height":1000,"iso_639_1":"bg","vote_average":0,"vote_count":0,"width":706}]},"translations":{"translations":[{"iso_639_1":"en","name":"English","english_name":"English"},{"iso_639_1":"nl","name":"Nederlands","english_name":"Dutch"},{"iso_639_1":"tr","name":"T\u00fcrk\u00e7e","english_name":"Turkish"},{"iso_639_1":"sk","name":"Sloven\u0161\u010dina","english_name":"Slovak"},{"iso_639_1":"de","name":"Deutsch","english_name":"German"},{"iso_639_1":"ru","name":"P\u0443\u0441\u0441\u043a\u0438\u0439","english_name":"Russian"},{"iso_639_1":"fr","name":"Fran\u00e7ais","english_name":"French"},{"iso_639_1":"hu","name":"Magyar","english_name":"Hungarian"},{"iso_639_1":"zh","name":"\u4e2d\u56fd","english_name":"Mandarin"},{"iso_639_1":"el","name":"\u03b5\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac","english_name":"Greek"},{"iso_639_1":"pt","name":"Portugu\u00eas","english_name":"Portuguese"},{"iso_639_1":"es","name":"Espa\u00f1ol","english_name":"Spanish"},{"iso_639_1":"it","name":"Italiano","english_name":"Italian"},{"iso_639_1":"bg","name":"\u0431\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438 \u0435\u0437\u0438\u043a","english_name":"Bulgarian"},{"iso_639_1":"ro","name":"Rom\u00e2n\u0103","english_name":"Romanian"}]}} \ No newline at end of file diff --git a/test/Tmdb/Tests/Resources/tv/season/all.json b/test/Tmdb/Tests/Resources/tv/season/all.json new file mode 100644 index 00000000..78ca2878 --- /dev/null +++ b/test/Tmdb/Tests/Resources/tv/season/all.json @@ -0,0 +1 @@ +{"air_date":"2009-03-08","episodes":[{"air_date":"2009-03-08","episode_number":1,"name":"Seven Thirty-Seven","overview":"Walt and Jesse try to figure a way out of their partnership with Tuco. Hank tries to mend the fences between Marie and Skyler.","still_path":"\/bwgioLAgihPCUK21rLWocDaDM3g.jpg","vote_average":0,"vote_count":0},{"air_date":"2009-03-15","episode_number":2,"name":"Grilled","overview":"With Walt and Jesse trapped with Tuco, Marie and Hank comfort Skyler over his disappearance. Hank visits Mrs. Pinkman.","still_path":"\/cGy9Prgf3PnysaMRUl6qyOdDm7p.jpg","vote_average":0,"vote_count":0},{"air_date":"2009-03-22","episode_number":3,"name":"Bit by a Dead Bee","overview":"Walt and Jesse become short on cash when they try to cover their tracks. Meanwhile, the DEA has a lead that could them straight to Walt and Jesse.","still_path":"\/hwTdSnHmmpXPPhu6voGuTBdjzGa.jpg","vote_average":0,"vote_count":0},{"air_date":"2009-03-29","episode_number":4,"name":"Down","overview":"Walt attempts to reconnect with his family, while Jesse struggles to rebuild his life.","still_path":"\/yU3P34BXyVJN4YLJM4WnOphMOBy.jpg","vote_average":0,"vote_count":0},{"air_date":"2009-04-05","episode_number":5,"name":"Breakage","overview":"Hank suffers from the aftermath of his encounter with Tuco. Meanwhile, Jesse hires a crew to get their product out on the streets.","still_path":"\/kfm9bvGBgeemxgfGzFIRfSv8Qq1.jpg","vote_average":0,"vote_count":0},{"air_date":"2009-04-12","episode_number":6,"name":"Peekaboo","overview":"Walt's secret is in jeopardy when Skyler thanks Gretchen for paying for his treatment.","still_path":"\/g7xqJv3AMRn21QSKVi4SRQjlkca.jpg","vote_average":0,"vote_count":0},{"air_date":"2009-04-19","episode_number":7,"name":"Negro Y Azul","overview":"Jesse and Walt discuss expanding into new territories; Hank struggles to fit in; Skyler pursues a new job opportunity; Jesse gets to know his landlord.","still_path":"\/437cDgF2ESBIIMfOy92L57vmtiL.jpg","vote_average":0,"vote_count":0},{"air_date":"2009-04-26","episode_number":8,"name":"Better Call Saul","overview":"Walt and Jesse seek advice from a shady attorney when Badger gets in trouble with the law; the DEA believes they have caught up with \"Heisenberg\" ; Hank returns.","still_path":"\/60iF1Phmpd4tXqvQPtOVonxJOBF.jpg","vote_average":0,"vote_count":0},{"air_date":"2009-05-03","episode_number":9,"name":"4 Days Out","overview":"Walt and his family wait for news after he undergoes a PET-CT scan. Walt follows Saul's advice; Jesse's relationship with Jane is put on hold when he and Walt head to the desert for a marathon of cooking.","still_path":"\/4E9DKjGO5UQVKCmyUEwfiMpymDR.jpg","vote_average":0,"vote_count":0},{"air_date":"2009-05-10","episode_number":10,"name":"Over","overview":"Walt and Hank get into a heated argument at a party. Skyler opens up to her boss. Jane hides her relationship with Jesse from her father.","still_path":"\/8rVpiJXfEhvDsfBpggHXztVcawU.jpg","vote_average":0,"vote_count":0},{"air_date":"2009-05-17","episode_number":11,"name":"Mandala","overview":"When unforeseen circumstances cause Walt and Jesse to lose some dealers, Saul suggests they add a new business partner. At work, Skylar confronts Ted about the unnerving information she had uncovered. Jane learns what Jesse does for a living when he opens up to her, which ends in disastrous results.","still_path":"\/i15Fd14cI2ykH17jMyyqrr0IBOS.jpg","vote_average":0,"vote_count":0},{"air_date":"2009-05-24","episode_number":12,"name":"Phoenix","overview":"As Walt explores money laundering options, he and Jesse spar over the profits from their latest deal. Jesse and Jane clash with her father. Walt makes a fatal decision.","still_path":"\/oiBvDoXgY26outuHMBWRsjfZ71z.jpg","vote_average":0,"vote_count":0},{"air_date":"2009-05-31","episode_number":13,"name":"ABQ","overview":"Skylar confronts Walt about his secrecy; Jesse falls apart; and Jane's grief-stricken father takes action that results in further tragedy.","still_path":"\/nEgJh7OhNaNTS8mMbhoPkJ2HvWl.jpg","vote_average":0,"vote_count":0}],"name":"Season 2","overview":"The second season of the American television drama series Breaking Bad premiered on March 8, 2009 and concluded on May 31, 2009. It consisted of 13 episodes, each running approximately 47 minutes in length. AMC broadcast the second season on Sundays at 10:00 pm in the United States. The complete second season was released on Region 1 DVD and Region A Blu-ray on March 16, 2010.","id":3573,"poster_path":"\/rCdISteF1GPvPsy0a5L0LDffjtP.jpg","season_number":2,"credits":{"cast":[{"character":"Walter White","credit_id":"52542282760ee313280017f9","id":17419,"name":"Bryan Cranston","profile_path":"\/qXWgFCk4OJqmLRUBEj7cbp8dnkx.jpg","order":0},{"character":"Skyler White","credit_id":"52542282760ee3132800181b","id":134531,"name":"Anna Gunn","profile_path":"\/lKlGjfmu9mJcF4upNrhtG3X9uyq.jpg","order":1},{"character":"Jesse Pinkman","credit_id":"52542282760ee31328001845","id":84497,"name":"Aaron Paul","profile_path":"\/oTceEUb6A9Bg6DeUTJBTETUOEAy.jpg","order":2},{"character":"Hank Schrader","credit_id":"52542283760ee3132800187b","id":14329,"name":"Dean Norris","profile_path":"\/500eNhWneDTXQuEXg6BR269IjHr.jpg","order":3},{"character":"Marie Schrader","credit_id":"52542283760ee31328001891","id":1217934,"name":"Betsy Brandt","profile_path":"\/zpmsca1HCVqYrtWXV9xdmsECDTI.jpg","order":4},{"character":"Walter White Jr.","credit_id":"52542284760ee313280018a9","id":1223196,"name":"RJ Mitte","profile_path":"\/hO5HJKM6p6SQjpdV8Fs64BJWzmT.jpg","order":5}],"crew":[{"department":"Production","id":1223193,"name":"George Mastras","job":"Producer","profile_path":null},{"department":"Production","id":1223202,"name":"Diane Mercer","job":"Producer","profile_path":null},{"department":"Production","id":17419,"name":"Bryan Cranston","job":"Producer","profile_path":"\/qXWgFCk4OJqmLRUBEj7cbp8dnkx.jpg"},{"department":"Production","id":1218856,"name":"Patty Lin","job":"Producer","profile_path":null},{"department":"Production","id":29924,"name":"John Shiban","job":"Producer","profile_path":null},{"department":"Production","id":1223199,"name":"Melissa Bernstein","job":"Producer","profile_path":null},{"department":"Production","id":1223194,"name":"Sam Catlin","job":"Producer","profile_path":"\/6Oy9AmJ9JDCzJ5RbBL4no2zZgDl.jpg"},{"department":"Production","id":24951,"name":"Peter Gould","job":"Producer","profile_path":null},{"department":"Production","id":1223198,"name":"Moira Walley-Beckett","job":"Producer","profile_path":null},{"department":"Production","id":103009,"name":"Thomas Schnauz","job":"Producer","profile_path":null},{"department":"Production","id":1223200,"name":"Stewart Lyons","job":"Producer","profile_path":null},{"department":"Production","id":1223201,"name":"Karen Moore","job":"Producer","profile_path":null},{"department":"Production","id":29779,"name":"Michelle MacLaren","job":"Executive Producer","profile_path":null},{"department":"Production","id":66633,"name":"Vince Gilligan","job":"Executive Producer","profile_path":"\/wSTvJGz7QbJf1HK2Mv1Cev6W9TV.jpg"},{"department":"Production","id":5162,"name":"Mark Johnson","job":"Executive Producer","profile_path":"\/yKGF6cbzyP03Gl1QhVLCu1gWSW6.jpg"},{"department":"Sound","id":1280070,"name":"Dave Porter","job":"Original Music Composer","profile_path":null}]},"external_ids":{"freebase_id":"\/en\/breaking_bad_season_2","freebase_mid":"\/m\/06z8kdz","tvdb_id":40719,"tvrage_id":null},"images":{"posters":[{"aspect_ratio":0.69,"file_path":"\/rCdISteF1GPvPsy0a5L0LDffjtP.jpg","height":578,"iso_639_1":"en","vote_average":"5.38461538461539","vote_count":2,"width":400},{"aspect_ratio":0.78,"file_path":"\/bVutsi7CNCA3XLWwEWlbwm8vpmH.jpg","height":1024,"iso_639_1":"nl","vote_average":5.3125,"vote_count":1,"width":795},{"aspect_ratio":0.67,"file_path":"\/ww6cDy0dhrVEdMqielNEsYz96mg.jpg","height":1500,"iso_639_1":"en","vote_average":5.3125,"vote_count":1,"width":1000},{"aspect_ratio":0.69,"file_path":"\/mYsNUgov0AtEnwpNeopj1lgMTf2.jpg","height":578,"iso_639_1":"en","vote_average":"5.26785714285714","vote_count":1,"width":400},{"aspect_ratio":0.69,"file_path":"\/e5swnRAzZDr4b9ECZfrE9Xm3drP.jpg","height":578,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":400},{"aspect_ratio":0.69,"file_path":"\/k8uk7BJxm5jf8WqnZ642gJezVXE.jpg","height":578,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":400},{"aspect_ratio":0.69,"file_path":"\/3nzN2uj0KgKMdhPnchW0AZqXSC5.jpg","height":578,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":400},{"aspect_ratio":0.69,"file_path":"\/u605ok6C2Om9RUoMRyoAYGBK3qt.jpg","height":578,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":400},{"aspect_ratio":0.69,"file_path":"\/6lP6ac4wNmWgtfVvrsl53bMqrKS.jpg","height":578,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":400},{"aspect_ratio":0.69,"file_path":"\/7oHpe8g2fqg6ED9nlPDCnPAubT2.jpg","height":578,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":400},{"aspect_ratio":0.69,"file_path":"\/8MOnZ6sjNb7loJv24uroAhuN4G1.jpg","height":578,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":400},{"aspect_ratio":0.69,"file_path":"\/hTxpM4TWy2FPxldPln6SK9h5iZ0.jpg","height":578,"iso_639_1":"ru","vote_average":0,"vote_count":0,"width":400}]}} \ No newline at end of file diff --git a/test/Tmdb/Tests/Resources/tv/season/episode/all.json b/test/Tmdb/Tests/Resources/tv/season/episode/all.json new file mode 100644 index 00000000..b07ee19b --- /dev/null +++ b/test/Tmdb/Tests/Resources/tv/season/episode/all.json @@ -0,0 +1 @@ +{"air_date":"2009-03-08","episode_number":1,"name":"Seven Thirty-Seven","overview":"Walt and Jesse try to figure a way out of their partnership with Tuco. Hank tries to mend the fences between Marie and Skyler.","id":62092,"production_code":null,"season_number":2,"still_path":"\/bwgioLAgihPCUK21rLWocDaDM3g.jpg","vote_average":0,"vote_count":0,"credits":{"cast":[{"character":"Walter White","credit_id":"52542282760ee313280017f9","id":17419,"name":"Bryan Cranston","profile_path":"\/qXWgFCk4OJqmLRUBEj7cbp8dnkx.jpg","order":0},{"character":"Skyler White","credit_id":"52542282760ee3132800181b","id":134531,"name":"Anna Gunn","profile_path":"\/lKlGjfmu9mJcF4upNrhtG3X9uyq.jpg","order":1},{"character":"Jesse Pinkman","credit_id":"52542282760ee31328001845","id":84497,"name":"Aaron Paul","profile_path":"\/oTceEUb6A9Bg6DeUTJBTETUOEAy.jpg","order":2},{"character":"Hank Schrader","credit_id":"52542283760ee3132800187b","id":14329,"name":"Dean Norris","profile_path":"\/500eNhWneDTXQuEXg6BR269IjHr.jpg","order":3},{"character":"Marie Schrader","credit_id":"52542283760ee31328001891","id":1217934,"name":"Betsy Brandt","profile_path":"\/zpmsca1HCVqYrtWXV9xdmsECDTI.jpg","order":4},{"character":"Walter White Jr.","credit_id":"52542284760ee313280018a9","id":1223196,"name":"RJ Mitte","profile_path":"\/hO5HJKM6p6SQjpdV8Fs64BJWzmT.jpg","order":5}],"crew":[{"id":17419,"name":"Bryan Cranston","department":"Directing","job":"Director","profile_path":"\/qXWgFCk4OJqmLRUBEj7cbp8dnkx.jpg"}],"guest_stars":[{"id":1260529,"name":"Jesus Jr.","credit_id":"52725eb0760ee304500a8945","character":"Gonzo (as Jesus Payan)","order":34,"profile_path":null},{"id":53255,"name":"Cesar Garcia","credit_id":"527260de760ee304500af163","character":"No-Doze","order":35,"profile_path":"\/6KkknahgOIBaZfz3ip3UV89iVFO.jpg"},{"id":456066,"name":"Ryan Lee","credit_id":"52726267760ee3044a0a82fa","character":"Neighborhood Kid","order":36,"profile_path":"\/ruZj8XZ77CppycNJ4oV3QUrAzvj.jpg"},{"id":1006144,"name":"Vic Browder","credit_id":"527262a4760ee3044d0c416b","character":"Detective","order":37,"profile_path":null},{"id":58650,"name":"Raymond Cruz","credit_id":"5254227b760ee31328000cd6","character":"Tuco Salamanca","order":44,"profile_path":"\/afRJntGec0KE1uIYn9FFyp5lyO8.jpg"},{"id":61535,"name":"Steven Michael Quezada","credit_id":"5271b489760ee35b3e0881a7","character":"Steven Gomez","order":173,"profile_path":"\/dRJsuGKUWlAooFnYEq85SN9C4Nf.jpg"}]},"external_ids":{"imdb_id":null,"freebase_id":null,"freebase_mid":"\/m\/06z8kf5","tvdb_id":438912,"tvrage_id":692033},"images":{"stills":[{"aspect_ratio":2,"file_path":"\/bwgioLAgihPCUK21rLWocDaDM3g.jpg","height":200,"iso_639_1":null,"vote_average":0,"vote_count":0,"width":400}]}} \ No newline at end of file