From b78538e98ec5cd4a2492c74d9f255a546173348a Mon Sep 17 00:00:00 2001 From: Michael Roterman Date: Sat, 8 Mar 2014 22:29:17 +0100 Subject: [PATCH] Adding examples for discover. --- examples/discover/api/movies.php | 24 ++++++++++++++++++++++++ examples/discover/api/tv.php | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 examples/discover/api/movies.php create mode 100644 examples/discover/api/tv.php diff --git a/examples/discover/api/movies.php b/examples/discover/api/movies.php new file mode 100644 index 00000000..9f2716fc --- /dev/null +++ b/examples/discover/api/movies.php @@ -0,0 +1,24 @@ + + * @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); + +$response = $client->getDiscoverApi()->discoverMovies(array( + 'page' => 1, + 'language' => 'en' +)); + +var_dump($response); diff --git a/examples/discover/api/tv.php b/examples/discover/api/tv.php new file mode 100644 index 00000000..6e3dcf64 --- /dev/null +++ b/examples/discover/api/tv.php @@ -0,0 +1,24 @@ + + * @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); + +$response = $client->getDiscoverApi()->discoverTv(array( + 'page' => 1, + 'language' => 'en' +)); + +var_dump($response);