diff --git a/examples/timezones/api/get.php b/examples/timezones/api/get.php new file mode 100644 index 00000000..214684ac --- /dev/null +++ b/examples/timezones/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); + +$timezones = $client->getTimezonesApi()->getTimezones(); + +var_dump($timezones); diff --git a/examples/timezones/model/get.php b/examples/timezones/model/get.php new file mode 100644 index 00000000..210740fd --- /dev/null +++ b/examples/timezones/model/get.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\CollectionRepository($client); +$collection = $repository->load(10); + +var_dump($collection); diff --git a/lib/Tmdb/Api/Timezones.php b/lib/Tmdb/Api/Timezones.php new file mode 100644 index 00000000..9fc96513 --- /dev/null +++ b/lib/Tmdb/Api/Timezones.php @@ -0,0 +1,31 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Api; + +/** + * Class Timezones + * @package Tmdb\Api + * @see http://docs.themoviedb.apiary.io/#timezones + */ +class Timezones extends AbstractApi +{ + /** + * Get the list of supported timezones for the API methods that support them. + * + * @return mixed + */ + public function getTimezones() + { + return $this->get('timezones/list'); + } +} diff --git a/lib/Tmdb/Client.php b/lib/Tmdb/Client.php index 5e7220d7..f0c99498 100644 --- a/lib/Tmdb/Client.php +++ b/lib/Tmdb/Client.php @@ -408,6 +408,14 @@ public function getCertificationsApi() return new Api\Certifications($this); } + /** + * @return Api\Timezones + */ + public function getTimezonesApi() + { + return new Api\Timezones($this); + } + /** * @return HttpClient|HttpClientInterface */