Class: TmdbEasy::Genre
- Inherits:
-
Base
- Object
- Base
- TmdbEasy::Genre
show all
- Defined in:
- lib/tmdb-easy/genre.rb
Class Method Summary
collapse
Methods inherited from Base
api_key, api_key=, base_api_url
Class Method Details
.genre_movies(genre_id, lang = 'en') ⇒ Object
10
11
12
13
14
15
|
# File 'lib/tmdb-easy/genre.rb', line 10
def self.genre_movies(genre_id, lang = 'en')
action_request = base_api_url + "genre/#{genre_id}/movies?api_key=#{@@api_key}&language=#{lang}"
response = api_response(action_request)
movies_per_genre = DeepOpenStruct.load(response).results
end
|
.list(lang = 'en') ⇒ Object
3
4
5
6
7
8
|
# File 'lib/tmdb-easy/genre.rb', line 3
def self.list(lang = 'en')
action_request = base_api_url + "genre/list?api_key=#{@@api_key}&language=#{lang}"
response = api_response(action_request)
genre_list = DeepOpenStruct.load(response).genres
end
|