Class: Tmdb::Discover
Class Method Summary
collapse
Methods inherited from Struct
#analyze_value, #initialize
Constructor Details
This class inherits a constructor from Tmdb::Struct
Class Method Details
.movie(filters = {}) ⇒ Object
4
5
6
7
8
9
10
11
12
13
|
# File 'lib/tmdb/discover.rb', line 4
def self.movie(filters={})
result = Resource.new('/discover/movie', filters).get
discover = self.new(result.except('results'))
discover.results = result['results'].map do |result|
Movie.new(result)
end
discover
end
|
.tv(filters = {}) ⇒ Object
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/tmdb/discover.rb', line 15
def self.tv(filters={})
result = Resource.new('/discover/tv', filters).get
discover = self.new(result.except('results'))
discover.results = result['results'].map do |result|
TV.new(result)
end
discover
end
|