Class: Tmdb::Search
Class Method Summary
collapse
Methods inherited from Struct
#analyze_value, #initialize
Constructor Details
This class inherits a constructor from Tmdb::Struct
Class Method Details
.collection(query, filters = {}) ⇒ Object
11
12
13
14
15
16
|
# File 'lib/tmdb/search.rb', line 11
def self.collection(query, filters={})
filters.merge!(query: clean_query_param(query))
result = Resource.new('/search/collection', filters).get
Collection.new(result)
end
|
.company(query, filters = {}) ⇒ Object
4
5
6
7
8
9
|
# File 'lib/tmdb/search.rb', line 4
def self.company(query, filters={})
filters.merge!(query: clean_query_param(query))
result = Resource.new('/search/company', filters).get
Company.new(result)
end
|
.keyword(query, filters = {}) ⇒ Object
18
19
20
21
22
23
|
# File 'lib/tmdb/search.rb', line 18
def self.keyword(query, filters={})
filters.merge!(query: clean_query_param(query))
result = Resource.new('/search/keyword', filters).get
Keyword.new(result)
end
|
.list(query, filters = {}) ⇒ Object
25
26
27
28
29
30
|
# File 'lib/tmdb/search.rb', line 25
def self.list(query, filters={})
filters.merge!(query: clean_query_param(query))
result = Resource.new('/search/list', filters).get
Tmdb::List.new(result)
end
|
.movie(query, filters = {}) ⇒ Object
32
33
34
35
36
37
|
# File 'lib/tmdb/search.rb', line 32
def self.movie(query, filters={})
filters.merge!(query: clean_query_param(query))
result = Resource.new('/search/movie', filters).get
Movie.new(result)
end
|
.multi(query, filters = {}) ⇒ Object
39
40
41
42
43
44
|
# File 'lib/tmdb/search.rb', line 39
def self.multi(query, filters={})
filters.merge!(query: clean_query_param(query))
result = Resource.new('/search/multi', filters).get
Multi.new(result)
end
|
.person(query, filters = {}) ⇒ Object
46
47
48
49
50
51
52
53
|
# File 'lib/tmdb/search.rb', line 46
def self.person(query, filters={})
filters.merge!(query: clean_query_param(query))
result = Resource.new('/search/person', filters).get
person = Person.new(result)
person.convert_known_for_multiple!
person
end
|
.tv(query, filters = {}) ⇒ Object
55
56
57
58
59
60
|
# File 'lib/tmdb/search.rb', line 55
def self.tv(query, filters={})
filters.merge!(query: clean_query_param(query))
result = Resource.new('/search/tv', filters).get
TV.new(result)
end
|