Class: Tmdb::Find
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(id, filters = {}) ⇒ Object
4
5
6
7
8
9
10
|
# File 'lib/tmdb/find.rb', line 4
def self.movie(id, filters={})
result = Resource.new("/find/#{id}", filters).get
result['movie_results'].map do |entry|
Movie.new(entry)
end
end
|
.people(id, filters = {}) ⇒ Object
12
13
14
15
16
17
18
19
20
|
# File 'lib/tmdb/find.rb', line 12
def self.people(id, filters={})
result = Resource.new("/find/#{id}", filters).get
result['person_results'].map do |entry|
person = Person.new(entry)
person.convert_known_for!
person
end
end
|
.tv_episode(id, filters = {}) ⇒ Object
38
39
40
41
42
43
44
|
# File 'lib/tmdb/find.rb', line 38
def self.tv_episode(id, filters={})
result = Resource.new("/find/#{id}", filters).get
result['tv_season_results'].map do |entry|
TV.new(entry)
end
end
|
.tv_season(id, filters = {}) ⇒ Object
30
31
32
33
34
35
36
|
# File 'lib/tmdb/find.rb', line 30
def self.tv_season(id, filters={})
result = Resource.new("/find/#{id}", filters).get
result['tv_episode_results'].map do |entry|
TV.new(entry)
end
end
|
.tv_serie(id, filters = {}) ⇒ Object
22
23
24
25
26
27
28
|
# File 'lib/tmdb/find.rb', line 22
def self.tv_serie(id, filters={})
result = Resource.new("/find/#{id}", filters).get
result['tv_results'].map do |entry|
TV.new(entry)
end
end
|