From 1f7fe9c83201ff9f11ba6515e568668f99cbb3cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ewilan=20Rivi=C3=A8re?= Date: Tue, 24 Sep 2024 14:19:07 +0200 Subject: [PATCH] Add `raw()` method to execute raw request to TMDB API (for non implemented methods) --- README.md | 43 +- composer.json | 2 +- src/Repositories/RawRepository.php | 30 + src/Repositories/Repository.php | 27 +- src/Tmdb.php | 12 + tests/CollectionTest.php | 72 ++ tests/Datasets/collection-images.json | 1096 +++++++++++++++++++ tests/Datasets/collection-translations.json | 390 +++++++ tests/ImageTest.php | 10 +- tests/RawTest.php | 14 + 10 files changed, 1686 insertions(+), 10 deletions(-) create mode 100644 src/Repositories/RawRepository.php create mode 100644 tests/Datasets/collection-images.json create mode 100644 tests/Datasets/collection-translations.json create mode 100644 tests/RawTest.php diff --git a/README.md b/README.md index 67cf6f5..2a4a0b9 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,26 @@ $collection = Tmdb::client('API_KEY') ->details(collection_id: 119); // ?\Kiwilan\Tmdb\Models\TmdbCollection ``` +#### [Collection: Images](https://developer.themoviedb.org/reference/collection-images) + +Get the images that belong to a collection. + +```php +$images = Tmdb::client('API_KEY') + ->collections() + ->images(collection_id: 119); // ?\Kiwilan\Tmdb\Models\TmdbCollectionImages +``` + +#### [Collection: Translations](https://developer.themoviedb.org/reference/collection-translations) + +Get the translations that belong to a collection. + +```php +$translations = Tmdb::client('API_KEY') + ->collections() + ->translations(collection_id: 119); // ?\Kiwilan\Tmdb\Models\TmdbCollectionTranslations +``` + ### Companies #### [Companies: Details](https://developer.themoviedb.org/reference/company-details) @@ -480,6 +500,23 @@ $raw_data = $movie->getRawData(); // array $raw_title_key = $movie->getRawDataKey('title'); // mixed ``` +### Send raw request + +If you want to send a raw request to TMDB API, you can use `raw()` method, API key will be added automatically. + +```php +use Kiwilan\Tmdb\Tmdb; + +$response = Tmdb::client(apiKey()) + ->raw() + ->url('/movie/now_playing', ['language' => 'en-US', 'page' => 1]); // ?Kiwi\Tmdb\Repositories\RawRepository + +$response->isSuccess(); // bool +$response->getStatusCode(); // int +$response->getBody(); // array +$response->getUrl(); // string +``` + ## Testing ```bash @@ -501,10 +538,10 @@ A fix? A new feature? A typo? You're welcome to contribute to this project. Just - [ ] [Movie List](https://developer.themoviedb.org/reference/changes-movie-list) - [ ] [People List](https://developer.themoviedb.org/reference/changes-people-list) - [ ] [TV List](https://developer.themoviedb.org/reference/changes-tv-list) -- [ ] Collections +- [x] ~~Collections~~ - [x] ~~[Details](https://developer.themoviedb.org/reference/collection-details)~~ - - [ ] [Images](https://developer.themoviedb.org/reference/collection-images) - - [ ] [Translations](https://developer.themoviedb.org/reference/collection-translations) + - [x] ~~[Images](https://developer.themoviedb.org/reference/collection-images)~~ + - [x] ~~[Translations](https://developer.themoviedb.org/reference/collection-translations)~~ - [ ] Companies - [x] ~~[Details](https://developer.themoviedb.org/reference/company-details)~~ - [ ] [Alternative Names](https://developer.themoviedb.org/reference/company-alternative-names) diff --git a/composer.json b/composer.json index 109b49c..4dbb594 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "kiwilan/php-tmdb", "description": "PHP wrapper package to interact with the The Movie Database (TMDB) API.", - "version": "0.1.04", + "version": "0.1.05", "keywords": [ "php", "tmdb", diff --git a/src/Repositories/RawRepository.php b/src/Repositories/RawRepository.php new file mode 100644 index 0000000..911b124 --- /dev/null +++ b/src/Repositories/RawRepository.php @@ -0,0 +1,30 @@ + 'en-US', 'page' => 1]` + * + * @docs https://developer.themoviedb.org/reference/intro/getting-started + */ + public function url(string $url, ?array $params = null): ?RawRepository + { + if (! $params) { + $params = []; + } + + $this->get($url, $params); + + return $this->isSuccess ? $this : null; + } +} diff --git a/src/Repositories/Repository.php b/src/Repositories/Repository.php index 435a27c..abac86c 100644 --- a/src/Repositories/Repository.php +++ b/src/Repositories/Repository.php @@ -10,6 +10,8 @@ abstract class Repository protected ?array $body = null; + protected ?int $statusCode = null; + protected bool $isSuccess = false; protected string $language = 'en-US'; @@ -18,6 +20,27 @@ public function __construct( private string $apiKey, ) {} + /** + * Get URL used in the request + */ + public function getUrl(): ?string + { + return $this->url; + } + + /** + * Get the body of the response + */ + public function getBody(): ?array + { + return $this->body; + } + + public function isSuccess(): bool + { + return $this->isSuccess; + } + /** * Merge base URL with the path and execute the request * @@ -69,7 +92,9 @@ protected function execute(): ?array 'http_errors' => false, ]); - if ($response->getStatusCode() !== 200) { + $this->statusCode = $response->getStatusCode(); + + if ($this->statusCode !== 200) { return null; } diff --git a/src/Tmdb.php b/src/Tmdb.php index 0b8fa36..e67c0e0 100755 --- a/src/Tmdb.php +++ b/src/Tmdb.php @@ -2,6 +2,8 @@ namespace Kiwilan\Tmdb; +use Kiwilan\Tmdb\Repositories\Repository; + class Tmdb { protected function __construct( @@ -148,4 +150,14 @@ public function tvEpisodes(): Repositories\TVEpisodesRepository { return new Repositories\TVEpisodesRepository($this->apiKey); } + + /** + * Use Raw repository, used to send raw requests to the API (for methods not implemented). + * + * @docs https://developer.themoviedb.org/reference/intro/getting-started + */ + public function raw(): ?Repositories\RawRepository + { + return new Repositories\RawRepository($this->apiKey); + } } diff --git a/tests/CollectionTest.php b/tests/CollectionTest.php index 49d8385..dd9bc97 100644 --- a/tests/CollectionTest.php +++ b/tests/CollectionTest.php @@ -1,7 +1,12 @@ getParts())->not()->toBeEmpty(); expect($collection->getParts())->each(fn (Pest\Expectation $part) => expect($part->value)->toBeInstanceOf(TmdbMovie::class)); }); + +it('can get collection images', function () { + $images = Tmdb::client(apiKey()) + ->collections() + ->images(collection_id: 119); + + expect($images)->not()->toBeNull(); + expect($images)->toBeInstanceOf(TmdbImages::class); + expect($images->getBackdrops())->toBeArray(); + expect($images->getId())->toBeInt(); + + $backdrops = $images->getBackdrops(); + expect($backdrops)->toBeArray(); + expect($backdrops)->not()->toBeEmpty(); + expect($backdrops)->each(fn (Pest\Expectation $backdrop) => expect($backdrop->value)->toBeInstanceOf(TmdbImage::class)); + + $first = $backdrops[0]; + expect($first->getAspectRatio())->toBeFloat(); + expect($first->getHeight())->toBeInt(); + if ($first->getIso6391()) { + expect($first->getIso6391())->toBeString(); + } + expect($first->getFilePath())->toBeString(); + expect($first->getVoteAverage())->toBeFloat(); + expect($first->getVoteCount())->toBeInt(); + expect($first->getWidth())->toBeInt(); + expect($first->getType())->toBe(TmdbImageType::BACKDROP); + + $posters = $images->getPosters(); + expect($posters)->toBeArray(); + expect($posters)->not()->toBeEmpty(); + expect($posters)->each(fn (Pest\Expectation $poster) => expect($poster->value)->toBeInstanceOf(TmdbImage::class)); + + $first = $posters[0]; + expect($first->getAspectRatio())->toBeFloat(); + expect($first->getHeight())->toBeInt(); + if ($first->getIso6391()) { + expect($first->getIso6391())->toBeString(); + } + expect($first->getFilePath())->toBeString(); + expect($first->getVoteAverage())->toBeFloat(); + expect($first->getVoteCount())->toBeInt(); + expect($first->getWidth())->toBeInt(); + expect($first->getType())->toBe(TmdbImageType::POSTER); +}); + +it('can get collection translations', function () { + $translations = Tmdb::client(apiKey()) + ->collections() + ->translations(collection_id: 119); + + expect($translations)->not()->toBeNull(); + expect($translations)->toBeInstanceOf(TmdbTranslations::class); + expect($translations->getId())->toBe(119); + + $translations = $translations->getTranslations(); + expect($translations)->toBeArray(); + expect($translations)->not()->toBeEmpty(); + expect($translations)->each(fn (Pest\Expectation $translation) => expect($translation->value)->toBeInstanceOf(TmdbTranslation::class)); + + $first = $translations[0]; + expect($first->getIso31661())->toBeString(); + expect($first->getIso6391())->toBeString(); + expect($first->getName())->toBeString(); + expect($first->getEnglishName())->toBeString(); + expect($first->getData())->toBeArray(); +}); diff --git a/tests/Datasets/collection-images.json b/tests/Datasets/collection-images.json new file mode 100644 index 0000000..3b95fd4 --- /dev/null +++ b/tests/Datasets/collection-images.json @@ -0,0 +1,1096 @@ +{ + "id": 119, + "backdrops": [ + { + "aspect_ratio": 1.778, + "height": 1080, + "iso_639_1": null, + "file_path": "/bccR2CGTWVVSZAG0yqmy3DIvhTX.jpg", + "vote_average": 5.962, + "vote_count": 14, + "width": 1920 + }, + { + "aspect_ratio": 1.778, + "height": 2160, + "iso_639_1": null, + "file_path": "/cnAdXnQc9quORVkWdutpCmCTLkh.jpg", + "vote_average": 5.318, + "vote_count": 3, + "width": 3840 + }, + { + "aspect_ratio": 1.778, + "height": 2160, + "iso_639_1": null, + "file_path": "/vlj3kQml7k6k3gL4BbfOQ6c4nfT.jpg", + "vote_average": 5.312, + "vote_count": 1, + "width": 3840 + }, + { + "aspect_ratio": 1.778, + "height": 900, + "iso_639_1": "en", + "file_path": "/eoooF4yfXi3oeXZcjXXlB6bhlCk.jpg", + "vote_average": 5.312, + "vote_count": 1, + "width": 1600 + }, + { + "aspect_ratio": 1.778, + "height": 720, + "iso_639_1": null, + "file_path": "/rTHVYYfeonrFHYVhtR60ITDaErO.jpg", + "vote_average": 5.266, + "vote_count": 5, + "width": 1280 + }, + { + "aspect_ratio": 1.778, + "height": 1080, + "iso_639_1": null, + "file_path": "/aCsiXUQfyC2VCTgVRctL1P66ZHT.jpg", + "vote_average": 5.244, + "vote_count": 6, + "width": 1920 + }, + { + "aspect_ratio": 1.778, + "height": 1080, + "iso_639_1": null, + "file_path": "/5qkS6O6WzqhB1sAwKNCLJJwUInA.jpg", + "vote_average": 5.198, + "vote_count": 10, + "width": 1920 + }, + { + "aspect_ratio": 1.778, + "height": 1080, + "iso_639_1": null, + "file_path": "/jg4qGbVuwXzbuvoDUeW1ooCseAC.jpg", + "vote_average": 5.18, + "vote_count": 3, + "width": 1920 + }, + { + "aspect_ratio": 1.778, + "height": 2160, + "iso_639_1": null, + "file_path": "/fHHDSRzm9tfxRF2YcJJ2fP3mvV3.jpg", + "vote_average": 5.172, + "vote_count": 1, + "width": 3840 + }, + { + "aspect_ratio": 1.778, + "height": 1080, + "iso_639_1": null, + "file_path": "/3OgMNsCBieSOjo5aNGhJJRbPRT2.jpg", + "vote_average": 5.136, + "vote_count": 7, + "width": 1920 + }, + { + "aspect_ratio": 1.778, + "height": 1080, + "iso_639_1": "sh", + "file_path": "/c4N5bvUEv7lfQ88uI7AMr2Xd3Zh.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1920 + }, + { + "aspect_ratio": 1.778, + "height": 2160, + "iso_639_1": "en", + "file_path": "/sxyPBfYB9REym89Cj8ZkgXMS7eW.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 3840 + }, + { + "aspect_ratio": 1.778, + "height": 1080, + "iso_639_1": null, + "file_path": "/qSGzLCzfMZq8WF234cS3xvoRXji.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1920 + }, + { + "aspect_ratio": 1.778, + "height": 1080, + "iso_639_1": null, + "file_path": "/lKozw2tgc7r4EYHVTq2lROH48y8.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1920 + }, + { + "aspect_ratio": 1.778, + "height": 864, + "iso_639_1": null, + "file_path": "/ob1TV9nvDZnzo5qtssM0QqWAjRe.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1536 + }, + { + "aspect_ratio": 1.779, + "height": 1003, + "iso_639_1": null, + "file_path": "/493RUtsGNclsrknocBt3KIo11GM.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1784 + }, + { + "aspect_ratio": 1.779, + "height": 921, + "iso_639_1": null, + "file_path": "/nM0PsSeKOeSFOmSmbmLp3v8zLeh.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1638 + }, + { + "aspect_ratio": 1.778, + "height": 720, + "iso_639_1": null, + "file_path": "/s0HGy3sNExdytcrYHsm4LqfliQh.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1280 + }, + { + "aspect_ratio": 1.778, + "height": 720, + "iso_639_1": null, + "file_path": "/t7ySNmgHBKVL5LlbScTDaVCKeg3.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1280 + }, + { + "aspect_ratio": 1.778, + "height": 749, + "iso_639_1": null, + "file_path": "/gPNSHTTMTtTOX7D0tl2vXiIXW2Y.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1332 + }, + { + "aspect_ratio": 1.778, + "height": 864, + "iso_639_1": null, + "file_path": "/dsw8bKzIu88C116bQ1NirHDTe07.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1536 + }, + { + "aspect_ratio": 1.778, + "height": 720, + "iso_639_1": null, + "file_path": "/hwKfQiEeIkGrDrrfW4aPxDpbHSh.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1280 + }, + { + "aspect_ratio": 1.778, + "height": 720, + "iso_639_1": null, + "file_path": "/gOjHEdTtMhd79cPIGmPScgrZsBB.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1280 + } + ], + "posters": [ + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "en", + "file_path": "/oENY593nKRVL2PnxXsMtlh8izb4.jpg", + "vote_average": 5.45, + "vote_count": 18, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "fr", + "file_path": "/geSEwZ1hHjI2uv4Vb4dQrD2grnG.jpg", + "vote_average": 5.388, + "vote_count": 4, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "en", + "file_path": "/44BCXU0RfYNBSsbWHvtC4kZMHyk.jpg", + "vote_average": 5.388, + "vote_count": 4, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "it", + "file_path": "/4rTZZfmmMliEmINLHES28WCKq6c.jpg", + "vote_average": 5.384, + "vote_count": 2, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 3000, + "iso_639_1": "ru", + "file_path": "/nQLlpH905RXa9ifZrK8sWCbm4FS.jpg", + "vote_average": 5.384, + "vote_count": 2, + "width": 2000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "en", + "file_path": "/nSNle6UJNNuEbglNvXt67m1a1Yn.jpg", + "vote_average": 5.336, + "vote_count": 15, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1200, + "iso_639_1": "ru", + "file_path": "/yX4q1Q3UHBke3BNbpdnlulTBGDJ.jpg", + "vote_average": 5.322, + "vote_count": 5, + "width": 800 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "de", + "file_path": "/fVVwUTyykClDk16ViZnkDwsLaiL.jpg", + "vote_average": 5.318, + "vote_count": 3, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "pt", + "file_path": "/9x5456lykdCQTbwN6cVoU3gQsZp.jpg", + "vote_average": 5.312, + "vote_count": 1, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 2100, + "iso_639_1": "da", + "file_path": "/9Oe2cqa3i8SL9C6rXrqqyspW1a1.jpg", + "vote_average": 5.312, + "vote_count": 1, + "width": 1400 + }, + { + "aspect_ratio": 0.667, + "height": 1299, + "iso_639_1": "pl", + "file_path": "/nBlZt9pCo1xjVIO11HfbVugcGb6.jpg", + "vote_average": 5.312, + "vote_count": 1, + "width": 866 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "ko", + "file_path": "/emDQkB59zj4VuvTSXeXZuCbeFKO.jpg", + "vote_average": 5.312, + "vote_count": 1, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "hu", + "file_path": "/z6ulxsBWjOB8bwO4p5cbgCUPcS9.jpg", + "vote_average": 5.312, + "vote_count": 1, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 2100, + "iso_639_1": "hu", + "file_path": "/kscO4lFxAoansyjXp1Ym9VzcStj.jpg", + "vote_average": 5.312, + "vote_count": 1, + "width": 1400 + }, + { + "aspect_ratio": 0.667, + "height": 2250, + "iso_639_1": "fr", + "file_path": "/5sWUbRaNolm9ysiE6c1SRUVUhdk.jpg", + "vote_average": 5.312, + "vote_count": 1, + "width": 1500 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "en", + "file_path": "/dV0Du5dgKzojK4czuMesIbh07xb.jpg", + "vote_average": 5.306, + "vote_count": 7, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "en", + "file_path": "/7UJVffR2haKcGUKVTtCQcyudsNr.jpg", + "vote_average": 5.27, + "vote_count": 12, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "en", + "file_path": "/geZwAIgk3E0vqiQWBPBAvjaZFRO.jpg", + "vote_average": 5.264, + "vote_count": 8, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 3000, + "iso_639_1": "en", + "file_path": "/qx5x7HRP0MrSBx6N3QJFXpMrbWB.jpg", + "vote_average": 5.264, + "vote_count": 8, + "width": 2000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "en", + "file_path": "/z71k3LBZTnZVvUF0BLloHeRX23F.jpg", + "vote_average": 5.253, + "vote_count": 2, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "it", + "file_path": "/lTVIlPNfhVBZvXU31xHea6Sm7zO.jpg", + "vote_average": 5.252, + "vote_count": 4, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 3000, + "iso_639_1": "en", + "file_path": "/qMPLMnGirZpl7LKliFU1iNIrrDo.jpg", + "vote_average": 5.252, + "vote_count": 4, + "width": 2000 + }, + { + "aspect_ratio": 0.667, + "height": 3000, + "iso_639_1": "es", + "file_path": "/yAonjcMRitkztnvRjrLqwpKgbXS.jpg", + "vote_average": 5.252, + "vote_count": 4, + "width": 2000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "ru", + "file_path": "/rh9HN2oNVaVPNAp02z5sAbPSTJA.jpg", + "vote_average": 5.252, + "vote_count": 4, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "en", + "file_path": "/yPHJnfAPPUhCCL2q3jIhEANt0tS.jpg", + "vote_average": 5.252, + "vote_count": 4, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 3000, + "iso_639_1": "en", + "file_path": "/249qw7r9E31vvOSeMQoOrjxMjfm.jpg", + "vote_average": 5.252, + "vote_count": 4, + "width": 2000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "hu", + "file_path": "/rkcrR9pdUY4frqOPNUGUtLoqSeG.jpg", + "vote_average": 5.246, + "vote_count": 2, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "en", + "file_path": "/kP4yI13a16MThYv7CEbLdjrWCkk.jpg", + "vote_average": 5.246, + "vote_count": 2, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 876, + "iso_639_1": "ru", + "file_path": "/udurp2tihqGngjhCx7yje4Yvo7i.jpg", + "vote_average": 5.246, + "vote_count": 2, + "width": 584 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "es", + "file_path": "/s4q8BC1rgsHiv81YJiOnDc5rABE.jpg", + "vote_average": 5.246, + "vote_count": 2, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 3000, + "iso_639_1": "en", + "file_path": "/iAlYWQoh6EoPFZZlQZZTdNpzHxF.jpg", + "vote_average": 5.246, + "vote_count": 2, + "width": 2000 + }, + { + "aspect_ratio": 0.667, + "height": 3000, + "iso_639_1": "de", + "file_path": "/t9DGQfjEkPpoGIyOOH3FdwrqiFi.jpg", + "vote_average": 5.246, + "vote_count": 2, + "width": 2000 + }, + { + "aspect_ratio": 0.667, + "height": 1746, + "iso_639_1": "zh", + "file_path": "/2q8soZtMokGknXlIDGOxT6nW8L2.jpg", + "vote_average": 5.246, + "vote_count": 2, + "width": 1164 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "en", + "file_path": "/t2GzbKWX11dZWJGk9VxcDoTd3It.jpg", + "vote_average": 5.246, + "vote_count": 1, + "width": 1000 + }, + { + "aspect_ratio": 0.701, + "height": 1426, + "iso_639_1": "fr", + "file_path": "/yKXqvUq5wCctDOhub3ZDP0f8pH9.jpg", + "vote_average": 5.245, + "vote_count": 2, + "width": 1000 + }, + { + "aspect_ratio": 0.71, + "height": 2161, + "iso_639_1": "hu", + "file_path": "/hurQBkDiVI3T92me4U4cfEEKEhP.jpg", + "vote_average": 5.238, + "vote_count": 1, + "width": 1535 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "en", + "file_path": "/fGNibg724rDIEsXr6OirMouiFT7.jpg", + "vote_average": 5.238, + "vote_count": 0, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "en", + "file_path": "/6YxY6gmhuaecrlPtQUsa6fCW269.jpg", + "vote_average": 5.238, + "vote_count": 0, + "width": 1000 + }, + { + "aspect_ratio": 0.75, + "height": 800, + "iso_639_1": "fr", + "file_path": "/qbYaMxZccKDJF9yCK8w9eoZx2p4.jpg", + "vote_average": 5.18, + "vote_count": 3, + "width": 600 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "en", + "file_path": "/vfU2GVDZqsrJuR7W0JhpiKUKISc.jpg", + "vote_average": 5.18, + "vote_count": 3, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 2100, + "iso_639_1": "de", + "file_path": "/vWioneKgCEIdgjD8s94mIXAD3Lu.jpg", + "vote_average": 5.18, + "vote_count": 3, + "width": 1400 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "es", + "file_path": "/oZDEwzMe5HcJ054z6uL5CForyw7.jpg", + "vote_average": 5.18, + "vote_count": 3, + "width": 1000 + }, + { + "aspect_ratio": 0.739, + "height": 1457, + "iso_639_1": "es", + "file_path": "/aCBKbWTsQaDhf1xELvI7wY1Fwhv.jpg", + "vote_average": 5.174, + "vote_count": 3, + "width": 1077 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "de", + "file_path": "/amEg5nXGdsVE5r7AaXGr8B1FzNL.jpg", + "vote_average": 5.172, + "vote_count": 1, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "de", + "file_path": "/oeNIHJr0B4HA4xnFMBn7wNBLMfK.jpg", + "vote_average": 5.172, + "vote_count": 1, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1369, + "iso_639_1": "ru", + "file_path": "/1dplE5yLnaWVtcZGbbcc7FtVr3x.jpg", + "vote_average": 5.172, + "vote_count": 1, + "width": 913 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "de", + "file_path": "/nnr3uAMLnoijeafGTRL928sTef0.jpg", + "vote_average": 5.172, + "vote_count": 1, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "en", + "file_path": "/7fCKti7KtptNeFiqwXmkhMlBytc.jpg", + "vote_average": 5.172, + "vote_count": 1, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 3000, + "iso_639_1": "en", + "file_path": "/sWGvTSyJ2QBHz2pQ1guFlBpzWlm.jpg", + "vote_average": 5.172, + "vote_count": 1, + "width": 2000 + }, + { + "aspect_ratio": 0.667, + "height": 3000, + "iso_639_1": "en", + "file_path": "/u5xo1gPUoYu2Z1gSN7EEKQNUxe.jpg", + "vote_average": 5.172, + "vote_count": 1, + "width": 2000 + }, + { + "aspect_ratio": 0.667, + "height": 3000, + "iso_639_1": "es", + "file_path": "/dkJgm4WhQzGUQ72DtE9iMswty57.jpg", + "vote_average": 5.172, + "vote_count": 1, + "width": 2000 + }, + { + "aspect_ratio": 0.694, + "height": 1602, + "iso_639_1": "en", + "file_path": "/zoGY4M2qM29DFbxKaI0ECLwa18q.jpg", + "vote_average": 5.126, + "vote_count": 5, + "width": 1111 + }, + { + "aspect_ratio": 0.701, + "height": 1426, + "iso_639_1": "zh", + "file_path": "/d1WQazFwJ2VGJeiegZJjmRIVbI7.jpg", + "vote_average": 5.106, + "vote_count": 2, + "width": 1000 + }, + { + "aspect_ratio": 0.702, + "height": 1000, + "iso_639_1": "en", + "file_path": "/tfbZn3TIsNBwSSogkltl7O0iYvF.jpg", + "vote_average": 4.862, + "vote_count": 8, + "width": 702 + }, + { + "aspect_ratio": 0.697, + "height": 968, + "iso_639_1": "en", + "file_path": "/gqlVp3XA1wohY9IegmTD2VZbBHu.jpg", + "vote_average": 4.858, + "vote_count": 7, + "width": 675 + }, + { + "aspect_ratio": 0.78, + "height": 1600, + "iso_639_1": "fr", + "file_path": "/xSgRsxFiE9YNx9W9HVi7Lobmsbx.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1248 + }, + { + "aspect_ratio": 0.884, + "height": 1037, + "iso_639_1": "fr", + "file_path": "/h1boXadTcAp7aS77BpOnhtFVIiE.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 917 + }, + { + "aspect_ratio": 0.884, + "height": 1037, + "iso_639_1": "fr", + "file_path": "/h1boXadTcAp7aS77BpOnhtFVIiE.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 917 + }, + { + "aspect_ratio": 0.705, + "height": 2175, + "iso_639_1": "en", + "file_path": "/qECnQTyjwsuEkaEsw10Gj866SGu.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1534 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "hu", + "file_path": "/n2IFY6Y6h8QFprRA4HfgCUwiLkB.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "en", + "file_path": "/ef2J0vkz11jNpDXqGY6aWpzuXDH.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "fr", + "file_path": "/gVZCM3ec1ZCqrrqg2kz4i3xhgpK.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1125, + "iso_639_1": "fr", + "file_path": "/sxcxZePSkQEuoxCOAWOxz3ZsOuG.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 750 + }, + { + "aspect_ratio": 0.667, + "height": 3000, + "iso_639_1": "fr", + "file_path": "/4pG7wme57Yq6bvCP1EnruvF2U65.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 2000 + }, + { + "aspect_ratio": 0.667, + "height": 2100, + "iso_639_1": "pl", + "file_path": "/9Q6tGwxyo2HSKIjNcda2szn9vwl.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1400 + }, + { + "aspect_ratio": 0.701, + "height": 1426, + "iso_639_1": "es", + "file_path": "/s1sAkUwJjPDFJ1391sLcDfe7vas.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 3000, + "iso_639_1": "de", + "file_path": "/1HA76WpKYfBkbstT0rxtC0JB3Bd.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 2000 + }, + { + "aspect_ratio": 0.665, + "height": 1389, + "iso_639_1": "it", + "file_path": "/e7H8b6cayIqU4O4H2ktJUQUpJxT.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 924 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "en", + "file_path": "/A55YZIFiZZV3d1bZPmuk3Egok8N.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 3000, + "iso_639_1": "de", + "file_path": "/jigng6uQ21HTfwG0xv2ez7PCW7G.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 2000 + }, + { + "aspect_ratio": 0.667, + "height": 1875, + "iso_639_1": "it", + "file_path": "/lJNDSAVcPoU3KaCkcnLNYxz19ju.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1250 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "hu", + "file_path": "/rCyX0tDHM0ZXpN100n2LM6GM8V4.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1000 + }, + { + "aspect_ratio": 0.701, + "height": 1426, + "iso_639_1": "es", + "file_path": "/qyguNXd6ZKSVSUqGHMUHAGWcyV0.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1000 + }, + { + "aspect_ratio": 0.705, + "height": 2175, + "iso_639_1": "cs", + "file_path": "/gWvzi8QecOXVdZMKSgIVB6xwqxl.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1534 + }, + { + "aspect_ratio": 0.666, + "height": 800, + "iso_639_1": "ru", + "file_path": "/qoOZfCBQK9V9rwf7vDeFUqBLbEG.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 533 + }, + { + "aspect_ratio": 0.666, + "height": 800, + "iso_639_1": "ru", + "file_path": "/xA02FnX5t0A7vuVAfXGek5D1qbw.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 533 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "en", + "file_path": "/e7nfGHBZCS45lwRTqGZUKVpLpio.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1000 + }, + { + "aspect_ratio": 0.679, + "height": 1236, + "iso_639_1": "en", + "file_path": "/1Rcilf6NgknXKtIHPfsW5Mpp5lB.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 839 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "en", + "file_path": "/va65zxqyWy9uLEPQ2CxyC7JOGnn.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "en", + "file_path": "/Ful1hXFiQqeS3BCnBvrmtnAI9B.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "es", + "file_path": "/iKSJBlFGhPckh6xXxaNvAbfHyK8.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "fr", + "file_path": "/8sLnaQqS3O8LQ9W22zKXiTm3FSw.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 3000, + "iso_639_1": "hu", + "file_path": "/4n0DzkPMm9F4uP1EgYl4LcewTiu.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 2000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "ru", + "file_path": "/kDOcmYakftKURCTxqdvDtaCthrV.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "ru", + "file_path": "/ukZ8cLucwrJOB64Qsh4jwaI2gSf.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "fr", + "file_path": "/lUB6WbGyKf0aZ1dA20gwCpmNFPm.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "de", + "file_path": "/a1goYlL7NqCOCX2cpGPsr1Cjez0.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 1500, + "iso_639_1": "fr", + "file_path": "/ubjk5bclDuLYd1coMfXidJEQLgt.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1000 + }, + { + "aspect_ratio": 0.667, + "height": 3000, + "iso_639_1": "en", + "file_path": "/nUVtiPEPJ0j5qCZc2TLw0cGp2IL.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 2000 + }, + { + "aspect_ratio": 0.667, + "height": 1800, + "iso_639_1": "zh", + "file_path": "/h9h4WJP56DRBCFRM3WeHvTgKX2U.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1200 + }, + { + "aspect_ratio": 0.667, + "height": 1800, + "iso_639_1": null, + "file_path": "/5msCqTx79HLwhPiL50CWgbWxHdy.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1200 + }, + { + "aspect_ratio": 0.667, + "height": 1800, + "iso_639_1": "zh", + "file_path": "/bNPPwl1CAYZjXctLFN3SFl9ucGD.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1200 + }, + { + "aspect_ratio": 0.667, + "height": 1800, + "iso_639_1": "zh", + "file_path": "/eN5juZdXxMpsHsjajXf3UKAkpg0.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1200 + }, + { + "aspect_ratio": 0.667, + "height": 1800, + "iso_639_1": null, + "file_path": "/qtiPXXFIl0UYjr5zHOEVQHtzdCR.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1200 + }, + { + "aspect_ratio": 0.667, + "height": 1800, + "iso_639_1": null, + "file_path": "/hKZN83tFoNgpj2M3Wy2UNn8I7SS.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1200 + }, + { + "aspect_ratio": 0.667, + "height": 1800, + "iso_639_1": "zh", + "file_path": "/us90jAhPPcagZAlSk3f3fp21diW.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1200 + }, + { + "aspect_ratio": 0.667, + "height": 1800, + "iso_639_1": null, + "file_path": "/wjlpdcL4F8jezepH3CvXgo4hiNM.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1200 + }, + { + "aspect_ratio": 0.667, + "height": 1800, + "iso_639_1": "zh", + "file_path": "/3CHeZvJdWAx8zAjDe4OATRluXZ0.jpg", + "vote_average": 0, + "vote_count": 0, + "width": 1200 + } + ] +} diff --git a/tests/Datasets/collection-translations.json b/tests/Datasets/collection-translations.json new file mode 100644 index 0000000..96d4eee --- /dev/null +++ b/tests/Datasets/collection-translations.json @@ -0,0 +1,390 @@ +{ + "id": 119, + "translations": [ + { + "iso_3166_1": "US", + "iso_639_1": "en", + "name": "English", + "english_name": "English", + "data": { + "title": "", + "overview": "The Lord of the Rings trilogy consists of three epic fantasy films, based on the influential novels written by J. R. R. Tolkien, directed by Peter Jackson.", + "homepage": "" + } + }, + { + "iso_3166_1": "DE", + "iso_639_1": "de", + "name": "Deutsch", + "english_name": "German", + "data": { + "title": "Der Herr der Ringe Filmreihe", + "overview": "Die „Der Herr der Ringe“-Filme erhielten insgesamt 30 Oscar-Nominierungen und gewannen rekordträchtige 17 Oscars – der dritte Film wurde als Bester Film sowie für die Regie, das Drehbuch nach einer Vorlage und in acht weiteren Kategorien ausgezeichnet. Jacksons Filmtrilogie ist die Verfilmung der Romanbestseller von J.R.R. Tolkien, eine epische Reise von Menschen, Hobbits, Elben, Zwergen und den anderen Wesen und Kulturen in Mittelerde. Die Filme zeigen den Kampf Gut gegen Böse mit fantastischen Spezialeffekten und einem starken emotionalen Zentrum – es geht um unzertrennbare Freundschaften und die Opfer, die während des drohenden Untergangs von Mittelerde gebracht werden müssen.", + "homepage": "" + } + }, + { + "iso_3166_1": "IT", + "iso_639_1": "it", + "name": "Italiano", + "english_name": "Italian", + "data": { + "title": "Il Signore degli Anelli - Collezione", + "overview": "Il Signore degli Anelli (in inglese The Lord of the Rings) è una trilogia colossal fantasy co-prodotta, co-scritta e diretta del regista neozelandese Peter Jackson, basata sull'omonimo romanzo scritto da J. R. R. Tolkien. La saga è formata da Il Signore degli Anelli - La Compagnia dell'Anello (2001), Il Signore degli Anelli - Le due torri (2002) e Il Signore degli Anelli - Il ritorno del re (2003).", + "homepage": "" + } + }, + { + "iso_3166_1": "RU", + "iso_639_1": "ru", + "name": "Pусский", + "english_name": "Russian", + "data": { + "title": "Властелин колец (Коллекция)", + "overview": "Кинотрилогия «Властелин колец» — поставленная режиссёром Питером Джексоном серия из трёх связанных единым сюжетом кинофильмов, представляющая собой экранизацию романа Дж. Р. Р. Толкина «Властелин колец».", + "homepage": "" + } + }, + { + "iso_3166_1": "FR", + "iso_639_1": "fr", + "name": "Français", + "english_name": "French", + "data": { + "title": "Le Seigneur des anneaux - Saga", + "overview": "Dans les Terres du Milieu, l'Anneau unique forgé par Sauron le maléfique pour dominer les hommes, les elfes et les nains est tombé par inadvertance dans les mains de Frodon, paisible hobbit. Ce n'est qu'une question de temps avant que les sinistres Cavaliers Noirs, les Servants de l'Anneau, retrouvent sa trace. Sous la direction de Gandalf le magicien, une expédition est alors montée avec pour mission une tâche quasi-impossible : détruire l'Anneau, en le jetant dans le feu de la Montagne du Destin, au cœur du territoire ennemi…", + "homepage": "http://www.lordoftherings.net/" + } + }, + { + "iso_3166_1": "CN", + "iso_639_1": "zh", + "name": "普通话", + "english_name": "Mandarin", + "data": { + "title": "指环王(系列)", + "overview": "《魔戒》三部曲讲述的故事发生于第三纪元末期的中洲大陆,讲述霍比特人弗罗多·巴金斯为摧毁至尊魔戒而进行远征,并最终消黑暗魔君索隆的事故。而随着征途的进行,护戒队伍分崩析离,弗罗多、他的忠实伙伴山姆及奸诈的咕噜历经千辛万难抵达魔多,与此同时,巫师甘道夫、流亡的刚铎王位继承者阿拉贡联合中洲大陆的自由子民在黑门之外对抗索隆大军,最终在多方努力下取得了魔戒大战的胜利。", + "homepage": "" + } + }, + { + "iso_3166_1": "ES", + "iso_639_1": "es", + "name": "Español", + "english_name": "Spanish", + "data": { + "title": "El señor de los anillos - La trilogía", + "overview": "Trilogía del director Peter Jackson basada en las famosas novelas de JRR Tolkien", + "homepage": "" + } + }, + { + "iso_3166_1": "DK", + "iso_639_1": "da", + "name": "Dansk", + "english_name": "Danish", + "data": { + "title": "Ringenes herre (Samling)", + "overview": "Samling af Ringenes Herre film.", + "homepage": "" + } + }, + { + "iso_3166_1": "PT", + "iso_639_1": "pt", + "name": "Português", + "english_name": "Portuguese", + "data": { + "title": "O Senhor dos Anéis", + "overview": "A Série O Senhor dos Anéis é uma obra de ficção fantástica de J. R. R. Tolkien. Alternadamente cómica, singela, épica, monstruosa e diabólica, a narrativa desenvolve-se em meio a inúmeras mudanças de cenários e de personagens, num mundo imaginário absolutamente convincente em seu detalhes Tolkien criou em O Senhor dos anéis uma nova mitologia, num mundo inventado que demonstrou possuir um poder de atracão atemporal.", + "homepage": "" + } + }, + { + "iso_3166_1": "SE", + "iso_639_1": "sv", + "name": "svenska", + "english_name": "Swedish", + "data": { + "title": "Sagan om ringen (samling)", + "overview": "Trilogin om Härskarringen. Handlingen kretsar kring kampen mellan gott och ont. I centrum står den magiska härskarringen, som en gång för länge sedan smiddes av mörkrets herre Sauron för att härska över de andra ringar som han hade skänkt till sina fiender.", + "homepage": "" + } + }, + { + "iso_3166_1": "PL", + "iso_639_1": "pl", + "name": "Polski", + "english_name": "Polish", + "data": { + "title": "Władca Pierścieni - Kolekcja", + "overview": "Trylogia Władca Pierścieni składa się z trzech epickich filmów fantastycznych, opartych na wpływowych powieściach napisanych przez J. R. R. Tolkiena, w reżyserii Petera Jacksona.", + "homepage": "" + } + }, + { + "iso_3166_1": "NL", + "iso_639_1": "nl", + "name": "Nederlands", + "english_name": "Dutch", + "data": { + "title": "The Lord of the Rings Collectie", + "overview": "De fenomenale en episch trilogie 'The Lord Of The Rings' ('In de Ban van de Ring') verhaalt de strijd tussen goed en kwaad om het bezit van een magische ring.", + "homepage": "" + } + }, + { + "iso_3166_1": "HU", + "iso_639_1": "hu", + "name": "Magyar", + "english_name": "Hungarian", + "data": { + "title": "A Gyűrűk Ura Trilógia", + "overview": "A Gyűrűk Ura J. R. R. Tolkien híres, három kötetben megjelent regénye, melyből azonos című filmtrilógia is készült. A kötetek címei: A Gyűrű Szövetsége, A két torony és A király visszatér. A történet a szerző A babó (másképp A hobbit) című korábbi munkájának folytatása.", + "homepage": "" + } + }, + { + "iso_3166_1": "IL", + "iso_639_1": "he", + "name": "עִבְרִית", + "english_name": "Hebrew", + "data": { + "title": "שר הטבעות - אוסף", + "overview": "טרילוגיית סרטי שר הטבעות היא זיכיון סרטי פנטזיה שוברי קופות שבוימו על ידי פיטר ג'קסון, המבוססים על ספרי הפנטזיה האפית \"שר הטבעות\" מאת ג'ון רונלד רעואל טולקין. בטרילוגיית הסרטים מככב אנסמבל שחקנים, בהם איאן מק'קלן, איאן הולם, ויגו מורטנסן, ג'ון ריס-דייוויס, כריסטופר לי, הוגו ויבינג, שון בין, קייט בלאנשט וליב טיילר. הטרילוגיה זכתה להצלחה קופתית גדולה. שלושת הסרטים זכו ב-17 פרסי אוסקר וכן בעשרה פרסי סאטורן. זיכיון הסרטים מדורג במקום הרביעי ברשימת הזיכיונות שוברי הקופות הגדולים בכל הזמנים. העלילה מתרחשת בעולם בדיוני שנוצר על ידי טולקין ומוכר בשם \"הארץ התיכונה\". בדומה לספר, שלושת הסרטים עוקבים אחר מספר עלילות מקבילות. אחת מהן היא הרפתקאותיו של הוביט צעיר בשם פרודו בגינס וחברו האמיץ סם גמג'י במסעם להשמדת הטבעת האחת, ויחד איתה את שר האופל סאורון. קו עלילתי אחר הוא אהבתו של אראגורן לארוון. כמו כן מתוארות פלישות צבאות האורקים לרוהאן ולגונדור ומספר עלילות נוספות.", + "homepage": "" + } + }, + { + "iso_3166_1": "NO", + "iso_639_1": "no", + "name": "Norsk", + "english_name": "Norwegian", + "data": { + "title": "Ringenes Herre - Triologien", + "overview": "", + "homepage": "" + } + }, + { + "iso_3166_1": "CZ", + "iso_639_1": "cs", + "name": "Český", + "english_name": "Czech", + "data": { + "title": "Pán prstenů (kolekce)", + "overview": "Filmová trilogie na motivy jednoho z nejslavnějších fantasy románů, Středozem a její obyvatelé proti pánu Mordoru.", + "homepage": "" + } + }, + { + "iso_3166_1": "TH", + "iso_639_1": "th", + "name": "ภาษาไทย", + "english_name": "Thai", + "data": { + "title": "เดอะ ลอร์ดออฟเดอะริงส์ ฉบับไตรภาคพิเศษ", + "overview": "เรื่องย่อ เรื่องราวใน เดอะลอร์ดออฟเดอะริงส์ เกิดขึ้นบนดินแดนในจินตนาการที่มีชื่อว่า มิดเดิลเอิร์ธ ตัวละครในเรื่องมีหลายเผ่าพันธุ์ เช่น มนุษย์ เอลฟ์ ฮอบบิท คนแคระ พ่อมด และออร์ค หัวใจของเรื่องเกี่ยวข้องกับแหวนแห่งอำนาจ ซึ่งสร้างโดยจอมมารเซารอน เหตุการณ์ในเรื่องเริ่มต้นจากดินแดนไชร์อันสุขสงบ ไปยังส่วนต่าง ๆ ของมิดเดิลเอิร์ธ จนถึงเหตุการณ์สงครามแหวน โดยผ่านมุมมองของตัวละครฮอบบิทคนหนึ่งที่ชื่อ โฟรโด้ แบ๊กกิ้นส์", + "homepage": "" + } + }, + { + "iso_3166_1": "SK", + "iso_639_1": "sk", + "name": "Slovenčina", + "english_name": "Slovak", + "data": { + "title": "Pán prsteňov (kolekcia)", + "overview": "Pán prsteňov je filmová trilógia režírovaná Petrom Jacksonom. Scenár je založený na knižnej trilógii Pán prsteňov od J. R. R. Tolkiena. Pozostáva z troch filmov Pán prsteňov: Spoločenstvo prsteňa (2001), Pán prsteňov: Dve veže (2002) a Pán prsteňov: Návrat kráľa (2003). Je považovaná za jeden z najväčších a najambicióznejších filmových počinov, ktorého rozpočet sa vyšplhal na 281 miliónov amerických dolárov. Celý projekt trval osem rokov, pričom nakrúcanie všetkých troch častí sa dialo súčasne a výhradne len v domovine Petra Jacksona, na Novom Zélande. Každý film zo série bol vydaný na DVD aj v rozšírenej verzii rok po kinopremiére. Filmy sa držia knižnej predlohe v rovine príbehu, ale sú vynechané niektoré časti deja a súčasne sú pridané alebo pozmenené niektoré udalosti. (zdroj: wikipedia)", + "homepage": "http://www.lordoftherings.net" + } + }, + { + "iso_3166_1": "UA", + "iso_639_1": "uk", + "name": "Український", + "english_name": "Ukrainian", + "data": { + "title": "Володар перснів | Колекція", + "overview": "", + "homepage": "" + } + }, + { + "iso_3166_1": "RO", + "iso_639_1": "ro", + "name": "Română", + "english_name": "Romanian", + "data": { + "title": "Colecția Stăpânul inelelor", + "overview": "Trilogia Stăpânul inelelor este compusă din trei filme epice de fantezie regizate de Peter Jackson, bazate pe romanele de influență scrise de J. R. R. Tolkien.", + "homepage": "" + } + }, + { + "iso_3166_1": "TR", + "iso_639_1": "tr", + "name": "Türkçe", + "english_name": "Turkish", + "data": { + "title": "Yüzüklerin Efendisi [Seri]", + "overview": "John Ronald Reuel Tolkien'in yazdığı Yüzüklerin Efendisi adlı fantastik edebiyat serisinden uyarlanarak çekilmiş Peter Jackson imzalı bir film üçlemesidir.", + "homepage": "" + } + }, + { + "iso_3166_1": "JP", + "iso_639_1": "ja", + "name": "日本語", + "english_name": "Japanese", + "data": { + "title": "ロード・オブ・ザ・リング シリーズ", + "overview": "", + "homepage": "" + } + }, + { + "iso_3166_1": "KR", + "iso_639_1": "ko", + "name": "한국어/조선말", + "english_name": "Korean", + "data": { + "title": "반지의 제왕 시리즈", + "overview": "", + "homepage": "" + } + }, + { + "iso_3166_1": "BR", + "iso_639_1": "pt", + "name": "Português", + "english_name": "Portuguese", + "data": { + "title": "O Senhor dos Anéis: Coleção", + "overview": "A história narra o conflito contra o mal que se alastra pela Terra-média, através da luta de várias raças - Humanos, Anões, Elfos, Ents e Hobbits - contra Orcs, para evitar que o \"Anel do Poder\" volte às mãos de seu criador Sauron, o Senhor do Escuro. Partindo dos primórdios tranquilos do Condado, a história muda através da Terra-média e segue o curso da Guerra do Anel através dos olhos de seus personagens, especialmente do protagonista, Frodo Bolseiro.", + "homepage": "" + } + }, + { + "iso_3166_1": "GR", + "iso_639_1": "el", + "name": "ελληνικά", + "english_name": "Greek", + "data": { + "title": "Ο Άρχοντας των Δαχτυλιδιών", + "overview": "Η τριλογία \"Ο Άρχοντας των Δαχτυλιδιών\" αποτελείται από τρεις επικές ταινίες φαντασίας, βασισμένες σε μυθιστορήματα γραμμένα από τον Tζ. Ρ. Ρ. Τόλκιν.", + "homepage": "" + } + }, + { + "iso_3166_1": "FI", + "iso_639_1": "fi", + "name": "suomi", + "english_name": "Finnish", + "data": { + "title": "Taru sormusten herrasta", + "overview": "Taru sormusten herrasta -elokuvatrilogia on Peter Jacksonin ohjaama fantasiaelokuvatrilogia, joka pohjautuu kirjailija J. R. R. Tolkienin kirjoittamaan fantasiakirjaan Taru sormusten herrasta.", + "homepage": "" + } + }, + { + "iso_3166_1": "TW", + "iso_639_1": "zh", + "name": "普通话", + "english_name": "Mandarin", + "data": { + "title": "魔戒三部曲", + "overview": "《魔戒》(英語:The Lord of the Rings)是一部由英國牛津大學教授、語言學家J·R·R·托爾金創作的史詩奇幻文學作品。這個故事原是托爾金早年創作的兒童幻想小說《哈比人》(英語:The Hobbit)(1937年)之續篇,但隨著故事的發展逐漸變得恢弘龐大。這個故事的原文名稱,The Lord of the Rings(魔戒之王)指明瞭最主要的反派角色——墮落的神明索倫(Sauron),他創造了一枚戒指來統領其他戒指,並以此作為對抗甚至統治中土大陸(Middle-earth)的終極武器。故事開始於平靜的夏爾(the Shire),一個類似英國鄉村的哈比家園,隨著魔戒的爭奪而橫跨了整個中土大陸。主角包括哈比人(Hobbit)佛羅多·巴金斯(Frodo Baggins)、山姆·詹吉(Samwise Gamgee)、梅里(Meriadoc Brandybuck)、皮平(Peregrin Took)和他們的同伴游俠阿拉貢(Aragorn)、矮人吉姆利(Gimli)、精靈萊戈拉斯(Legolas),還有巫師甘道夫(Gandalf)。《魔戒》一書為流行文化帶來了一系列的影響及參照。托爾金迷們創建了許多社群,亦出版了大量有關托爾金及其作品的書籍。《魔戒》正持續地衍生出不同作品,如藝術插圖、音樂、電影、電視、廣播劇、電玩游戲、同人文章等。", + "homepage": "" + } + }, + { + "iso_3166_1": "VN", + "iso_639_1": "vi", + "name": "Tiếng Việt", + "english_name": "Vietnamese", + "data": { + "title": "Chúa Tể Của Những Chiếc Nhẫn", + "overview": "", + "homepage": "" + } + }, + { + "iso_3166_1": "HK", + "iso_639_1": "zh", + "name": "普通话", + "english_name": "Mandarin", + "data": { + "title": "魔戒(系列)", + "overview": "", + "homepage": "" + } + }, + { + "iso_3166_1": "RS", + "iso_639_1": "sr", + "name": "Srpski", + "english_name": "Serbian", + "data": { + "title": "", + "overview": "", + "homepage": "" + } + }, + { + "iso_3166_1": "MX", + "iso_639_1": "es", + "name": "Español", + "english_name": "Spanish", + "data": { + "title": "El Señor de los Anillos - Colección", + "overview": "La trilogía cinematográfica de El Señor de los Anillos, basada en la novela homónima del escritor británico J. R. R. Tolkien, las tres películas fueron escritas, producidas y dirigidas por Peter Jackson, co-escritas por Fran Walsh y Philippa Boyens y distribuidas por New Line Cinema. Considerado como uno de los mayores proyectos cinematográficos nunca acometidos, con una recaudación global de más de 2900 millones USD, la trilogía sigue la trama principal de la novela en la que se basa. Ambientada en el ficticio mundo de la Tierra Media, sigue las aventuras del hobbit Frodo Bolsón y sus compañeros en su misión de destruir el Anillo Único y asegurar así la aniquilación del Señor Oscuro, Sauron.", + "homepage": "" + } + }, + { + "iso_3166_1": "ES", + "iso_639_1": "ca", + "name": "Català", + "english_name": "Catalan", + "data": { + "title": "El Senyor dels Anells - Col·lecció", + "overview": "Trilogia del Senyor dels Anells.", + "homepage": "" + } + }, + { + "iso_3166_1": "GE", + "iso_639_1": "ka", + "name": "ქართული", + "english_name": "Georgian", + "data": { + "title": "ბეჭდების მბრძანებელი კოლექცია", + "overview": "", + "homepage": "" + } + }, + { + "iso_3166_1": "CA", + "iso_639_1": "fr", + "name": "Français", + "english_name": "French", + "data": { + "title": "Le Seigneur des anneaux - Collection", + "overview": "La trilogie du Seigneur des Anneaux se compose de trois films fantastiques épiques, basés sur les romans influents écrits par J. R. R. Tolkien, réalisés par Peter Jackson.", + "homepage": "" + } + }, + { + "iso_3166_1": "IR", + "iso_639_1": "fa", + "name": "فارسی", + "english_name": "Persian", + "data": { + "title": "مجموعه ارباب حلقه ها", + "overview": "سه گانه ارباب حلقه ها شامل سه فیلم تخیلی حماسی است که براساس رمان های تأثیرگذار نوشته جی آر آر تولکین ، به کارگردانی پیتر جکسون ساخته شده است.", + "homepage": "" + } + } + ] +} diff --git a/tests/ImageTest.php b/tests/ImageTest.php index 1d50810..14af563 100644 --- a/tests/ImageTest.php +++ b/tests/ImageTest.php @@ -5,11 +5,11 @@ use Kiwilan\Tmdb\Enums\TmdbPosterSize; use Kiwilan\Tmdb\Enums\TmdbProfileSize; use Kiwilan\Tmdb\Enums\TmdbStillSize; -use Kiwilan\Tmdb\Utils\TmdbBackdrop; -use Kiwilan\Tmdb\Utils\TmdbLogo; -use Kiwilan\Tmdb\Utils\TmdbPoster; -use Kiwilan\Tmdb\Utils\TmdbProfile; -use Kiwilan\Tmdb\Utils\TmdbStill; +use Kiwilan\Tmdb\Utils\Images\TmdbBackdrop; +use Kiwilan\Tmdb\Utils\Images\TmdbLogo; +use Kiwilan\Tmdb\Utils\Images\TmdbPoster; +use Kiwilan\Tmdb\Utils\Images\TmdbProfile; +use Kiwilan\Tmdb\Utils\Images\TmdbStill; use Kiwilan\Tmdb\Utils\TmdbUrl; define('BACKDROP_PATH', '/x2RS3uTcsJJ9IfjNPcgDmukoEcQ.jpg'); diff --git a/tests/RawTest.php b/tests/RawTest.php new file mode 100644 index 0000000..ace0d55 --- /dev/null +++ b/tests/RawTest.php @@ -0,0 +1,14 @@ +raw() + ->url('/movie/now_playing', ['language' => 'en-US', 'page' => 1]); + + expect($response)->not->toBeNull(); + expect($response->isSuccess())->toBeTrue(); + expect($response->getUrl())->toBeString(); + expect($response->getBody())->toBeArray(); +});