From 4b044710d762147cbea3b4df6fffa9975212d87b Mon Sep 17 00:00:00 2001 From: Michael Roterman Date: Sat, 8 Mar 2014 22:14:17 +0100 Subject: [PATCH] Adding examples for companies. --- examples/companies/api/get.php | 21 +++++++++++++++++++++ examples/companies/api/get_movies.php | 21 +++++++++++++++++++++ examples/companies/model/get_movies.php | 22 ++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 examples/companies/api/get.php create mode 100644 examples/companies/api/get_movies.php create mode 100644 examples/companies/model/get_movies.php diff --git a/examples/companies/api/get.php b/examples/companies/api/get.php new file mode 100644 index 00000000..fc284edc --- /dev/null +++ b/examples/companies/api/get.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); + +$company = $client->getCompaniesApi()->getCompany(1); + +var_dump($company); diff --git a/examples/companies/api/get_movies.php b/examples/companies/api/get_movies.php new file mode 100644 index 00000000..1f15c7d2 --- /dev/null +++ b/examples/companies/api/get_movies.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); + +$companyMovies = $client->getCompaniesApi()->getMovies(1); + +var_dump($companyMovies); diff --git a/examples/companies/model/get_movies.php b/examples/companies/model/get_movies.php new file mode 100644 index 00000000..fd48e27d --- /dev/null +++ b/examples/companies/model/get_movies.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\CompanyRepository($client); +$companyMovies = $repository->getMovies(1); + +var_dump($companyMovies);