diff --git a/lib/Tmdb/Api/Changes.php b/lib/Tmdb/Api/Changes.php index b572a8f9..79355184 100644 --- a/lib/Tmdb/Api/Changes.php +++ b/lib/Tmdb/Api/Changes.php @@ -26,13 +26,13 @@ class Changes * Please note that the change log system to support this was changed * on October 5, 2012 and will only show movies that have been edited since. * - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getMovieChanges(array $options = array(), array $headers = array()) + public function getMovieChanges(array $parameters = array(), array $headers = array()) { - return $this->get('movie/changes', $options, $headers); + return $this->get('movie/changes', $parameters, $headers); } /** @@ -46,12 +46,12 @@ public function getMovieChanges(array $options = array(), array $headers = array * Please note that the change log system to support this was changed * on October 5, 2012 and will only show movies that have been edited since. * - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getPersonChanges(array $options = array(), array $headers = array()) + public function getPersonChanges(array $parameters = array(), array $headers = array()) { - return $this->get('person/changes', $options, $headers); + return $this->get('person/changes', $parameters, $headers); } } diff --git a/lib/Tmdb/Api/Collections.php b/lib/Tmdb/Api/Collections.php index 03cac14b..1c69d0b0 100644 --- a/lib/Tmdb/Api/Collections.php +++ b/lib/Tmdb/Api/Collections.php @@ -25,25 +25,25 @@ class Collections * If you would like to sort them yourself you can use the provided release_date. * * @param $collection_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getCollection($collection_id, array $options = array(), array $headers = array()) + public function getCollection($collection_id, array $parameters = array(), array $headers = array()) { - return $this->get('collection/' . $collection_id, $options, $headers); + return $this->get('collection/' . $collection_id, $parameters, $headers); } /** * Get all of the images for a particular collection by collection id. * * @param $collection_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getImages($collection_id, array $options = array(), array $headers = array()) + public function getImages($collection_id, array $parameters = array(), array $headers = array()) { - return $this->get('collection/' . $collection_id . '/images', $options, $headers); + return $this->get('collection/' . $collection_id . '/images', $parameters, $headers); } } diff --git a/lib/Tmdb/Api/Companies.php b/lib/Tmdb/Api/Companies.php index cda59ab6..d3ddc5dc 100644 --- a/lib/Tmdb/Api/Companies.php +++ b/lib/Tmdb/Api/Companies.php @@ -19,25 +19,25 @@ class Companies * This method is used to retrieve all of the basic information about a company. * * @param $company_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getCompany($company_id, array $options = array(), array $headers = array()) + public function getCompany($company_id, array $parameters = array(), array $headers = array()) { - return $this->get('company/' . $company_id, $options, $headers); + return $this->get('company/' . $company_id, $parameters, $headers); } /** * Get the list of movies associated with a particular company. * * @param integer $company_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getMovies($company_id, array $options = array(), array $headers = array()) + public function getMovies($company_id, array $parameters = array(), array $headers = array()) { - return $this->get('company/' . $company_id . '/movies', $options, $headers); + return $this->get('company/' . $company_id . '/movies', $parameters, $headers); } } diff --git a/lib/Tmdb/Api/Discover.php b/lib/Tmdb/Api/Discover.php index 4c3b24eb..552b92e5 100644 --- a/lib/Tmdb/Api/Discover.php +++ b/lib/Tmdb/Api/Discover.php @@ -18,24 +18,24 @@ class Discover /** * Discover movies by different types of data like average rating, number of votes, genres and certifications. * - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function discoverMovies(array $options = array(), array $headers = array()) + public function discoverMovies(array $parameters = array(), array $headers = array()) { - return $this->get('discover/movie', $options, $headers); + return $this->get('discover/movie', $parameters, $headers); } /** * Discover TV shows by different types of data like average rating, number of votes, genres, the network they aired on and air dates. * - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function discoverTv(array $options = array(), array $headers = array()) + public function discoverTv(array $parameters = array(), array $headers = array()) { - return $this->get('discover/tv', $options, $headers); + return $this->get('discover/tv', $parameters, $headers); } } diff --git a/lib/Tmdb/Api/Find.php b/lib/Tmdb/Api/Find.php new file mode 100644 index 00000000..cbbb5cf4 --- /dev/null +++ b/lib/Tmdb/Api/Find.php @@ -0,0 +1,29 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Api; + +class Find + extends AbstractApi +{ + /** + * Get a list of valid jobs. + * + * @param array $parameters + * @param array $headers + * @return mixed + */ + public function getJobs(array $parameters = array(), array $headers = array()) + { + return $this->get('job/list', $parameters, $headers); + } +} diff --git a/lib/Tmdb/Api/Genres.php b/lib/Tmdb/Api/Genres.php index d7523a1f..aed86d4e 100644 --- a/lib/Tmdb/Api/Genres.php +++ b/lib/Tmdb/Api/Genres.php @@ -19,13 +19,13 @@ class Genres * Get the list of genres, and return one by id * * @param integer $id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getGenre($id, array $options = array(), array $headers = array()) + public function getGenre($id, array $parameters = array(), array $headers = array()) { - $response = $this->getGenres($options, $headers); + $response = $this->getGenres($parameters, $headers); if (array_key_exists('genres', $response)) { return $this->extractGenreByIdFromResponse($id, $response['genres']); @@ -37,26 +37,26 @@ public function getGenre($id, array $options = array(), array $headers = array() /** * Get the list of genres. * - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getGenres(array $options = array(), array $headers = array()) + public function getGenres(array $parameters = array(), array $headers = array()) { - return $this->get('genre/list', $options, $headers); + return $this->get('genre/list', $parameters, $headers); } /** * Get the list of movies for a particular genre by id. By default, only movies with 10 or more votes are included. * * @param $genre_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getMovies($genre_id, array $options = array(), array $headers = array()) + public function getMovies($genre_id, array $parameters = array(), array $headers = array()) { - return $this->get('genre/' . $genre_id . '/movies', $options, $headers); + return $this->get('genre/' . $genre_id . '/movies', $parameters, $headers); } /** diff --git a/lib/Tmdb/Api/Jobs.php b/lib/Tmdb/Api/Jobs.php index 59193553..1858c45c 100644 --- a/lib/Tmdb/Api/Jobs.php +++ b/lib/Tmdb/Api/Jobs.php @@ -18,12 +18,12 @@ class Jobs /** * Get a list of valid jobs. * - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getJobs(array $options = array(), array $headers = array()) + public function getJobs(array $parameters = array(), array $headers = array()) { - return $this->get('job/list', $options, $headers); + return $this->get('job/list', $parameters, $headers); } } diff --git a/lib/Tmdb/Api/Keywords.php b/lib/Tmdb/Api/Keywords.php index 08c69383..7ea9f18a 100644 --- a/lib/Tmdb/Api/Keywords.php +++ b/lib/Tmdb/Api/Keywords.php @@ -19,25 +19,25 @@ class Keywords * Get the basic information for a specific keyword id. * * @param int $keyword_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getKeyword($keyword_id, array $options = array(), array $headers = array()) + public function getKeyword($keyword_id, array $parameters = array(), array $headers = array()) { - return $this->get('keyword/' . $keyword_id, $options, $headers); + return $this->get('keyword/' . $keyword_id, $parameters, $headers); } /** * Get the list of movies for a particular keyword by id. * * @param int $keyword_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getMovies($keyword_id, array $options = array(), array $headers = array()) + public function getMovies($keyword_id, array $parameters = array(), array $headers = array()) { - return $this->get('keyword/' . $keyword_id . '/movies', $options, $headers); + return $this->get('keyword/' . $keyword_id . '/movies', $parameters, $headers); } } diff --git a/lib/Tmdb/Api/Lists.php b/lib/Tmdb/Api/Lists.php index a76df68e..d8289fe6 100644 --- a/lib/Tmdb/Api/Lists.php +++ b/lib/Tmdb/Api/Lists.php @@ -21,13 +21,13 @@ class Lists * Get a list by id. * * @param $list_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getList($list_id, array $options = array(), array $headers = array()) + public function getList($list_id, array $parameters = array(), array $headers = array()) { - return $this->get('list/' . $list_id, $options, $headers); + return $this->get('list/' . $list_id, $parameters, $headers); } /** diff --git a/lib/Tmdb/Api/Movies.php b/lib/Tmdb/Api/Movies.php index ed9022a3..2c6359d3 100644 --- a/lib/Tmdb/Api/Movies.php +++ b/lib/Tmdb/Api/Movies.php @@ -21,216 +21,216 @@ class Movies * Get the basic movie information for a specific movie id. * * @param $movie_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getMovie($movie_id, array $options = array(), array $headers = array()) + public function getMovie($movie_id, array $parameters = array(), array $headers = array()) { - return $this->get('movie/' . $movie_id, $options, $headers); + return $this->get('movie/' . $movie_id, $parameters, $headers); } /** * Get the alternative titles for a specific movie id. * * @param $movie_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getAlternativeTitles($movie_id, array $options = array(), array $headers = array()) + public function getAlternativeTitles($movie_id, array $parameters = array(), array $headers = array()) { - return $this->get('movie/' . $movie_id . '/alternative_titles', $options, $headers); + return $this->get('movie/' . $movie_id . '/alternative_titles', $parameters, $headers); } /** * Get the cast information for a specific movie id. * * @param $movie_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getCast($movie_id, array $options = array(), array $headers = array()) + public function getCast($movie_id, array $parameters = array(), array $headers = array()) { - return $this->get('movie/' . $movie_id . '/casts', $options, $headers); + return $this->get('movie/' . $movie_id . '/casts', $parameters, $headers); } /** * Get the images (posters and backdrops) for a specific movie id. * * @param $movie_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getImages($movie_id, array $options = array(), array $headers = array()) + public function getImages($movie_id, array $parameters = array(), array $headers = array()) { - return $this->get('movie/' . $movie_id . '/images', $options, $headers); + return $this->get('movie/' . $movie_id . '/images', $parameters, $headers); } /** * Get the plot keywords for a specific movie id. * * @param $movie_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getKeywords($movie_id, array $options = array(), array $headers = array()) + public function getKeywords($movie_id, array $parameters = array(), array $headers = array()) { - return $this->get('movie/' . $movie_id . '/keywords', $options, $headers); + return $this->get('movie/' . $movie_id . '/keywords', $parameters, $headers); } /** * Get the release date by country for a specific movie id. * * @param $movie_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getReleases($movie_id, array $options = array(), array $headers = array()) + public function getReleases($movie_id, array $parameters = array(), array $headers = array()) { - return $this->get('movie/' . $movie_id . '/releases', $options, $headers); + return $this->get('movie/' . $movie_id . '/releases', $parameters, $headers); } /** * Get the trailers for a specific movie id. * * @param $movie_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getTrailers($movie_id, array $options = array(), array $headers = array()) + public function getTrailers($movie_id, array $parameters = array(), array $headers = array()) { - return $this->get('movie/' . $movie_id . '/trailers', $options, $headers); + return $this->get('movie/' . $movie_id . '/trailers', $parameters, $headers); } /** * Get the translations for a specific movie id. * * @param $movie_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getTranslations($movie_id, array $options = array(), array $headers = array()) + public function getTranslations($movie_id, array $parameters = array(), array $headers = array()) { - return $this->get('movie/' . $movie_id . '/translations', $options, $headers); + return $this->get('movie/' . $movie_id . '/translations', $parameters, $headers); } /** * Get the similar movies for a specific movie id. * * @param $movie_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getSimilarMovies($movie_id, array $options = array(), array $headers = array()) + public function getSimilarMovies($movie_id, array $parameters = array(), array $headers = array()) { - return $this->get('movie/' . $movie_id . '/similar_movies', $options, $headers); + return $this->get('movie/' . $movie_id . '/similar_movies', $parameters, $headers); } /** * Get the reviews for a particular movie id. * * @param $movie_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getReviews($movie_id, array $options = array(), array $headers = array()) + public function getReviews($movie_id, array $parameters = array(), array $headers = array()) { - return $this->get('movie/' . $movie_id . '/reviews', $options, $headers); + return $this->get('movie/' . $movie_id . '/reviews', $parameters, $headers); } /** * Get the lists that the movie belongs to. * * @param $movie_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getLists($movie_id, array $options = array(), array $headers = array()) + public function getLists($movie_id, array $parameters = array(), array $headers = array()) { - return $this->get('movie/' . $movie_id . '/lists', $options, $headers); + return $this->get('movie/' . $movie_id . '/lists', $parameters, $headers); } /** * Get the changes for a specific movie id. * * @param $movie_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getChanges($movie_id, array $options = array(), array $headers = array()) + public function getChanges($movie_id, array $parameters = array(), array $headers = array()) { - return $this->get('movie/' . $movie_id . '/changes', $options, $headers); + return $this->get('movie/' . $movie_id . '/changes', $parameters, $headers); } /** * Get the latest movie id. * - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getLatest(array $options = array(), array $headers = array()) + public function getLatest(array $parameters = array(), array $headers = array()) { - return $this->get('movie/latest', $options, $headers); + return $this->get('movie/latest', $parameters, $headers); } /** * Get the list of upcoming movies. This list refreshes every day. The maximum number of items this list will include is 100. * - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getUpcoming(array $options = array(), array $headers = array()) + public function getUpcoming(array $parameters = array(), array $headers = array()) { - return $this->get('movie/upcoming', $options, $headers); + return $this->get('movie/upcoming', $parameters, $headers); } /** * Get the list of movies playing in theatres. This list refreshes every day. The maximum number of items this list will include is 100. * - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getNowPlaying(array $options = array(), array $headers = array()) + public function getNowPlaying(array $parameters = array(), array $headers = array()) { - return $this->get('movie/now_playing', $options, $headers); + return $this->get('movie/now_playing', $parameters, $headers); } /** * Get the list of popular movies on The Movie Database. This list refreshes every day. * - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getPopular(array $options = array(), array $headers = array()) + public function getPopular(array $parameters = array(), array $headers = array()) { - return $this->get('movie/popular', $options, $headers); + return $this->get('movie/popular', $parameters, $headers); } /** * Get the list of top rated movies. By default, this list will only include movies that have 10 or more votes. This list refreshes every day. * - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getTopRated(array $options = array(), array $headers = array()) + public function getTopRated(array $parameters = array(), array $headers = array()) { - return $this->get('movie/top_rated', $options, $headers); + return $this->get('movie/top_rated', $parameters, $headers); } /** diff --git a/lib/Tmdb/Api/People.php b/lib/Tmdb/Api/People.php index be918a92..08be5c8e 100644 --- a/lib/Tmdb/Api/People.php +++ b/lib/Tmdb/Api/People.php @@ -19,39 +19,39 @@ class People * Get the general person information for a specific id. * * @param $person_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getPerson($person_id, array $options = array(), array $headers = array()) + public function getPerson($person_id, array $parameters = array(), array $headers = array()) { - return $this->get('person/' . $person_id, $options, $headers); + return $this->get('person/' . $person_id, $parameters, $headers); } /** * Get the credits for a specific person id. * * @param $person_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getCredits($person_id, array $options = array(), array $headers = array()) + public function getCredits($person_id, array $parameters = array(), array $headers = array()) { - return $this->get('person/' . $person_id . '/credits', $options, $headers); + return $this->get('person/' . $person_id . '/credits', $parameters, $headers); } /** * Get the images for a specific person id. * * @param $person_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getImages($person_id, array $options = array(), array $headers = array()) + public function getImages($person_id, array $parameters = array(), array $headers = array()) { - return $this->get('person/' . $person_id . '/images', $options, $headers); + return $this->get('person/' . $person_id . '/images', $parameters, $headers); } /** @@ -64,36 +64,36 @@ public function getImages($person_id, array $options = array(), array $headers = * The language is present on fields that are translatable. * * @param $person_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getChanges($person_id, array $options = array(), array $headers = array()) + public function getChanges($person_id, array $parameters = array(), array $headers = array()) { - return $this->get('person/' . $person_id . '/changes', $options, $headers); + return $this->get('person/' . $person_id . '/changes', $parameters, $headers); } /** * Get the list of popular people on The Movie Database. This list refreshes every day. * - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getPopular(array $options = array(), array $headers = array()) + public function getPopular(array $parameters = array(), array $headers = array()) { - return $this->get('person/popular', $options, $headers); + return $this->get('person/popular', $parameters, $headers); } /** * Get the latest person id. * - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getLatest(array $options = array(), array $headers = array()) + public function getLatest(array $parameters = array(), array $headers = array()) { - return $this->get('person/latest', $options, $headers); + return $this->get('person/latest', $parameters, $headers); } } diff --git a/lib/Tmdb/Api/Reviews.php b/lib/Tmdb/Api/Reviews.php index d0289f90..6654ea83 100644 --- a/lib/Tmdb/Api/Reviews.php +++ b/lib/Tmdb/Api/Reviews.php @@ -19,12 +19,12 @@ class Reviews * Get the full details of a review by ID. * * @param $review_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getReview($review_id, array $options = array(), array $headers = array()) + public function getReview($review_id, array $parameters = array(), array $headers = array()) { - return $this->get('review/' . $review_id, $options, $headers); + return $this->get('review/' . $review_id, $parameters, $headers); } } diff --git a/lib/Tmdb/Api/Search.php b/lib/Tmdb/Api/Search.php index a71db8b5..053bfc00 100644 --- a/lib/Tmdb/Api/Search.php +++ b/lib/Tmdb/Api/Search.php @@ -19,13 +19,13 @@ class Search * Search for movies by title. * * @param $query - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function searchMovies($query, array $options = array(), array $headers = array()) + public function searchMovies($query, array $parameters = array(), array $headers = array()) { - return $this->get('search/movie', array_merge($options, array( + return $this->get('search/movie', array_merge($parameters, array( 'query' => urlencode($query) ), $headers)); } @@ -34,13 +34,13 @@ public function searchMovies($query, array $options = array(), array $headers = * Search for collections by name. * * @param $query - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function searchCollection($query, array $options = array(), array $headers = array()) + public function searchCollection($query, array $parameters = array(), array $headers = array()) { - return $this->get('search/collection', array_merge($options, array( + return $this->get('search/collection', array_merge($parameters, array( 'query' => urlencode($query) ), $headers)); } @@ -49,13 +49,13 @@ public function searchCollection($query, array $options = array(), array $header * Search for TV shows by title. * * @param $query - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function searchTv($query, array $options = array(), array $headers = array()) + public function searchTv($query, array $parameters = array(), array $headers = array()) { - return $this->get('search/tv', array_merge($options, array( + return $this->get('search/tv', array_merge($parameters, array( 'query' => urlencode($query) ), $headers)); } @@ -64,13 +64,13 @@ public function searchTv($query, array $options = array(), array $headers = arra * Search for people by name. * * @param $query - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function searchPersons($query, array $options = array(), array $headers = array()) + public function searchPersons($query, array $parameters = array(), array $headers = array()) { - return $this->get('search/person', array_merge($options, array( + return $this->get('search/person', array_merge($parameters, array( 'query' => urlencode($query) ), $headers)); } @@ -79,13 +79,13 @@ public function searchPersons($query, array $options = array(), array $headers = * Search for lists by name and description. * * @param $query - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function searchList($query, array $options = array(), array $headers = array()) + public function searchList($query, array $parameters = array(), array $headers = array()) { - return $this->get('search/list', array_merge($options, array( + return $this->get('search/list', array_merge($parameters, array( 'query' => urlencode($query) ), $headers)); } @@ -94,13 +94,13 @@ public function searchList($query, array $options = array(), array $headers = ar * Search for companies by name. * * @param $query - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function searchCompany($query, array $options = array(), array $headers = array()) + public function searchCompany($query, array $parameters = array(), array $headers = array()) { - return $this->get('search/company', array_merge($options, array( + return $this->get('search/company', array_merge($parameters, array( 'query' => urlencode($query) ), $headers)); } @@ -109,13 +109,13 @@ public function searchCompany($query, array $options = array(), array $headers = * Search for companies by name. * * @param $query - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function searchKeyword($query, array $options = array(), array $headers = array()) + public function searchKeyword($query, array $parameters = array(), array $headers = array()) { - return $this->get('search/keyword', array_merge($options, array( + return $this->get('search/keyword', array_merge($parameters, array( 'query' => urlencode($query) ), $headers)); } diff --git a/lib/Tmdb/Api/Tv.php b/lib/Tmdb/Api/Tv.php index 7c18ae80..3745525e 100644 --- a/lib/Tmdb/Api/Tv.php +++ b/lib/Tmdb/Api/Tv.php @@ -19,13 +19,13 @@ class Tv * Get the primary information about a TV series by id. * * @param integer $tvshow_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getTvshow($tvshow_id, array $options = array(), array $headers = array()) + public function getTvshow($tvshow_id, array $parameters = array(), array $headers = array()) { - return $this->get('tv/' . $tvshow_id, $options, $headers); + return $this->get('tv/' . $tvshow_id, $parameters, $headers); } /** @@ -33,51 +33,51 @@ public function getTvshow($tvshow_id, array $options = array(), array $headers = * Just like the website, we pull this information from the last season of the series. * * @param $tvshow_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getCredits($tvshow_id, array $options = array(), array $headers = array()) + public function getCredits($tvshow_id, array $parameters = array(), array $headers = array()) { - return $this->get('tv/' . $tvshow_id . '/credits', $options, $headers); + return $this->get('tv/' . $tvshow_id . '/credits', $parameters, $headers); } /** * Get the external ids that we have stored for a TV series. * * @param $tvshow_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getExternalIds($tvshow_id, array $options = array(), array $headers = array()) + public function getExternalIds($tvshow_id, array $parameters = array(), array $headers = array()) { - return $this->get('tv/' . $tvshow_id . '/external_ids', $options, $headers); + return $this->get('tv/' . $tvshow_id . '/external_ids', $parameters, $headers); } /** * Get the images (posters and backdrops) for a TV series. * * @param $tvshow_id - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getImages($tvshow_id, array $options = array(), array $headers = array()) + public function getImages($tvshow_id, array $parameters = array(), array $headers = array()) { - return $this->get('tv/' . $tvshow_id . '/images', $options, $headers); + return $this->get('tv/' . $tvshow_id . '/images', $parameters, $headers); } /** * Get the list of popular TV shows. This list refreshes every day. * - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getPopular(array $options = array(), array $headers = array()) + public function getPopular(array $parameters = array(), array $headers = array()) { - return $this->get('tv/popular', $options, $headers); + return $this->get('tv/popular', $parameters, $headers); } /** @@ -86,13 +86,13 @@ public function getPopular(array $options = array(), array $headers = array()) * By default, this list will only include TV shows that have 2 or more votes. * This list refreshes every day. * - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getTopRated(array $options = array(), array $headers = array()) + public function getTopRated(array $parameters = array(), array $headers = array()) { - return $this->get('tv/top_rated', $options, $headers); + return $this->get('tv/top_rated', $parameters, $headers); } } diff --git a/lib/Tmdb/Api/TvEpisode.php b/lib/Tmdb/Api/TvEpisode.php index 85716b10..c17a82c2 100644 --- a/lib/Tmdb/Api/TvEpisode.php +++ b/lib/Tmdb/Api/TvEpisode.php @@ -21,13 +21,13 @@ class TvEpisode * @param $tvshow_id * @param $season_number * @param $episode_number - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getEpisode($tvshow_id, $season_number, $episode_number, array $options = array(), array $headers = array()) + public function getEpisode($tvshow_id, $season_number, $episode_number, array $parameters = array(), array $headers = array()) { - return $this->get(sprintf('tv/%s/season/%s/episode/%s', $tvshow_id, $season_number,$episode_number), $options, $headers); + return $this->get(sprintf('tv/%s/season/%s/episode/%s', $tvshow_id, $season_number,$episode_number), $parameters, $headers); } /** @@ -36,13 +36,13 @@ public function getEpisode($tvshow_id, $season_number, $episode_number, array $o * @param $tvshow_id * @param $season_number * @param $episode_number - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getEpisodeCredits($tvshow_id, $season_number, $episode_number, array $options = array(), array $headers = array()) + public function getEpisodeCredits($tvshow_id, $season_number, $episode_number, array $parameters = array(), array $headers = array()) { - return $this->get(sprintf('tv/%s/season/%s/episode/%s/credits', $tvshow_id, $season_number,$episode_number), $options, $headers); + return $this->get(sprintf('tv/%s/season/%s/episode/%s/credits', $tvshow_id, $season_number,$episode_number), $parameters, $headers); } /** @@ -51,13 +51,13 @@ public function getEpisodeCredits($tvshow_id, $season_number, $episode_number, a * @param $tvshow_id * @param $season_number * @param $episode_number - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getEpisodeExternalIds($tvshow_id, $season_number, $episode_number, array $options = array(), array $headers = array()) + public function getEpisodeExternalIds($tvshow_id, $season_number, $episode_number, array $parameters = array(), array $headers = array()) { - return $this->get(sprintf('tv/%s/season/%s/episode/%s/external_ids', $tvshow_id, $season_number,$episode_number), $options, $headers); + return $this->get(sprintf('tv/%s/season/%s/episode/%s/external_ids', $tvshow_id, $season_number,$episode_number), $parameters, $headers); } /** @@ -66,12 +66,12 @@ public function getEpisodeExternalIds($tvshow_id, $season_number, $episode_numbe * @param $tvshow_id * @param $season_number * @param $episode_number - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getEpisodeImages($tvshow_id, $season_number, $episode_number, array $options = array(), array $headers = array()) + public function getEpisodeImages($tvshow_id, $season_number, $episode_number, array $parameters = array(), array $headers = array()) { - return $this->get(sprintf('tv/%s/season/%s/episode/%s/images', $tvshow_id, $season_number,$episode_number), $options, $headers); + return $this->get(sprintf('tv/%s/season/%s/episode/%s/images', $tvshow_id, $season_number,$episode_number), $parameters, $headers); } } diff --git a/lib/Tmdb/Api/TvSeason.php b/lib/Tmdb/Api/TvSeason.php index 4c7f5539..0f504ca7 100644 --- a/lib/Tmdb/Api/TvSeason.php +++ b/lib/Tmdb/Api/TvSeason.php @@ -20,13 +20,13 @@ class TvSeason * * @param $tvshow_id * @param $season_number - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getSeason($tvshow_id, $season_number, array $options = array(), array $headers = array()) + public function getSeason($tvshow_id, $season_number, array $parameters = array(), array $headers = array()) { - return $this->get(sprintf('tv/%s/season/%s', $tvshow_id, $season_number), $options, $headers); + return $this->get(sprintf('tv/%s/season/%s', $tvshow_id, $season_number), $parameters, $headers); } /** @@ -34,13 +34,13 @@ public function getSeason($tvshow_id, $season_number, array $options = array(), * * @param $tvshow_id * @param $season_number - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getSeasonCredits($tvshow_id, $season_number, array $options = array(), array $headers = array()) + public function getSeasonCredits($tvshow_id, $season_number, array $parameters = array(), array $headers = array()) { - return $this->get(sprintf('tv/%s/season/%s/credits', $tvshow_id, $season_number), $options, $headers); + return $this->get(sprintf('tv/%s/season/%s/credits', $tvshow_id, $season_number), $parameters, $headers); } /** @@ -48,13 +48,13 @@ public function getSeasonCredits($tvshow_id, $season_number, array $options = ar * * @param $tvshow_id * @param $season_number - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getSeasonExternalIds($tvshow_id, $season_number, array $options = array(), array $headers = array()) + public function getSeasonExternalIds($tvshow_id, $season_number, array $parameters = array(), array $headers = array()) { - return $this->get(sprintf('tv/%s/season/%s/external_ids', $tvshow_id, $season_number), $options, $headers); + return $this->get(sprintf('tv/%s/season/%s/external_ids', $tvshow_id, $season_number), $parameters, $headers); } /** @@ -62,12 +62,12 @@ public function getSeasonExternalIds($tvshow_id, $season_number, array $options * * @param $tvshow_id * @param $season_number - * @param array $options + * @param array $parameters * @param array $headers * @return mixed */ - public function getSeasonImages($tvshow_id, $season_number, array $options = array(), array $headers = array()) + public function getSeasonImages($tvshow_id, $season_number, array $parameters = array(), array $headers = array()) { - return $this->get(sprintf('tv/%s/season/%s/images', $tvshow_id, $season_number), $options, $headers); + return $this->get(sprintf('tv/%s/season/%s/images', $tvshow_id, $season_number), $parameters, $headers); } } diff --git a/test/Tmdb/Tests/Repository/FindRepositoryTest.php b/test/Tmdb/Tests/Repository/FindRepositoryTest.php new file mode 100644 index 00000000..a654d742 --- /dev/null +++ b/test/Tmdb/Tests/Repository/FindRepositoryTest.php @@ -0,0 +1,40 @@ + + * @copyright (c) 2013, Michael Roterman + * @version 0.0.1 + */ +namespace Tmdb\Tests\Repository; + +use Tmdb\Model\Query\ChangesQuery; + +class ChangesRepositoryTest extends TestCase +{ + /** + * @test + */ + public function shouldGetMovieChanges() + { + $repository = $this->getRepositoryWithMockedHttpClient(); + + $query = new ChangesQuery(); + + $repository->getMovieChanges($query); + } + + protected function getApiClass() + { + return 'Tmdb\Api\Changes'; + } + + protected function getRepositoryClass() + { + return 'Tmdb\Repository\ChangesRepository'; + } +} \ No newline at end of file