From 3de3bc604bd24a15056d322667fff10bdbe34252 Mon Sep 17 00:00:00 2001 From: Michael Roterman Date: Sat, 8 Mar 2014 23:00:52 +0100 Subject: [PATCH] Adding more examples for Tv. --- examples/tv/api/tv/popular.php | 21 +++++++++++++++++++++ examples/tv/api/tv/top_rated.php | 21 +++++++++++++++++++++ examples/tv/model/tv/popular.php | 22 ++++++++++++++++++++++ examples/tv/model/tv/top_rated.php | 22 ++++++++++++++++++++++ 4 files changed, 86 insertions(+) create mode 100644 examples/tv/api/tv/popular.php create mode 100644 examples/tv/api/tv/top_rated.php create mode 100644 examples/tv/model/tv/popular.php create mode 100644 examples/tv/model/tv/top_rated.php diff --git a/examples/tv/api/tv/popular.php b/examples/tv/api/tv/popular.php new file mode 100644 index 00000000..df28c88e --- /dev/null +++ b/examples/tv/api/tv/popular.php @@ -0,0 +1,21 @@ + + * @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); + +$result = $client->getTvApi()->getPopular(); + +var_dump($result); diff --git a/examples/tv/api/tv/top_rated.php b/examples/tv/api/tv/top_rated.php new file mode 100644 index 00000000..3773b756 --- /dev/null +++ b/examples/tv/api/tv/top_rated.php @@ -0,0 +1,21 @@ + + * @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); + +$result = $client->getTvApi()->getTopRated(); + +var_dump($result); diff --git a/examples/tv/model/tv/popular.php b/examples/tv/model/tv/popular.php new file mode 100644 index 00000000..6c36281a --- /dev/null +++ b/examples/tv/model/tv/popular.php @@ -0,0 +1,22 @@ + + * @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); + +$repository = new \Tmdb\Repository\TvRepository($client); +$tvShow = $repository->getPopular(); + +var_dump($tvShow); diff --git a/examples/tv/model/tv/top_rated.php b/examples/tv/model/tv/top_rated.php new file mode 100644 index 00000000..e68a1ef6 --- /dev/null +++ b/examples/tv/model/tv/top_rated.php @@ -0,0 +1,22 @@ + + * @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); + +$repository = new \Tmdb\Repository\TvRepository($client); +$tvShow = $repository->getTopRated(); + +var_dump($tvShow);