From 6a70621889754e1f24845a6e20afb95fb4fd6246 Mon Sep 17 00:00:00 2001 From: Michael Roterman Date: Sat, 8 Mar 2014 22:52:15 +0100 Subject: [PATCH] Adding examples for search. --- examples/search/api/collection.php | 21 +++++++++++++++++++++ examples/search/api/company.php | 21 +++++++++++++++++++++ examples/search/api/keyword.php | 21 +++++++++++++++++++++ examples/search/api/list.php | 21 +++++++++++++++++++++ examples/search/api/movie.php | 21 +++++++++++++++++++++ examples/search/api/person.php | 21 +++++++++++++++++++++ examples/search/api/tv.php | 21 +++++++++++++++++++++ 7 files changed, 147 insertions(+) create mode 100644 examples/search/api/collection.php create mode 100644 examples/search/api/company.php create mode 100644 examples/search/api/keyword.php create mode 100644 examples/search/api/list.php create mode 100644 examples/search/api/movie.php create mode 100644 examples/search/api/person.php create mode 100644 examples/search/api/tv.php diff --git a/examples/search/api/collection.php b/examples/search/api/collection.php new file mode 100644 index 00000000..4d493873 --- /dev/null +++ b/examples/search/api/collection.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->getSearchApi()->searchCollection('star wars'); + +var_dump($result); diff --git a/examples/search/api/company.php b/examples/search/api/company.php new file mode 100644 index 00000000..d29339b4 --- /dev/null +++ b/examples/search/api/company.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->getSearchApi()->searchCompany('warner bros'); + +var_dump($result); diff --git a/examples/search/api/keyword.php b/examples/search/api/keyword.php new file mode 100644 index 00000000..b81a22e1 --- /dev/null +++ b/examples/search/api/keyword.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->getSearchApi()->searchKeyword('scary'); + +var_dump($result); diff --git a/examples/search/api/list.php b/examples/search/api/list.php new file mode 100644 index 00000000..4aeea774 --- /dev/null +++ b/examples/search/api/list.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->getSearchApi()->searchList('award'); + +var_dump($result); diff --git a/examples/search/api/movie.php b/examples/search/api/movie.php new file mode 100644 index 00000000..0b788af0 --- /dev/null +++ b/examples/search/api/movie.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->getSearchApi()->searchMovies('batman'); + +var_dump($result); diff --git a/examples/search/api/person.php b/examples/search/api/person.php new file mode 100644 index 00000000..0a737a43 --- /dev/null +++ b/examples/search/api/person.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->getSearchApi()->searchPersons('bruce lee'); + +var_dump($result); diff --git a/examples/search/api/tv.php b/examples/search/api/tv.php new file mode 100644 index 00000000..cae9e169 --- /dev/null +++ b/examples/search/api/tv.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->getSearchApi()->searchTv('breaking bad'); + +var_dump($result);