module TmdbRexx::Client::Genre
Constants
- POSSIBLE_TYPES
- RESOURCE
Public Instance Methods
genre_movies(genre_id, options = {})
click to toggle source
Get the list of movies for a particular genre by id. By default, only movies with 10 or more votes are included.
@see # docs.themoviedb.apiary.io/#reference/movies/genremovielist
@param [String] genre_id the if of the genre to get movies for
@return [Hashie::Mash] response
@example Get the movies for the genre api response
client.genre_movies("genre-id")
# File lib/tmdb_rexx/client/genre.rb, line 34 def genre_movies(genre_id, options = {}) get([RESOURCE, genre_id, "movies"].join("/"), options) end
genres(type = "movie", options = {})
click to toggle source
Get the list of movie or tv genres.
@see # docs.themoviedb.apiary.io/#reference/movies/genres
@param [String] type the resource type you want genres for
@return [Hashie::Mash] response
@example Get the movie genres api response
client.genres("movie")
# File lib/tmdb_rexx/client/genre.rb, line 18 def genres(type = "movie", options = {}) raise InvalidTypeError unless POSSIBLE_TYPES.include?(type) get([RESOURCE, type, "list"].join("/"), options)['genres'] end