Class: Tmdb::TV
Class Method Summary
collapse
-
.airing_today(filters = {}) ⇒ Object
-
.alternative_titles(id, filters = {}) ⇒ Object
-
.backdrops(id, filters = {}) ⇒ Object
-
.cast(id, filters = {}) ⇒ Object
-
.changes(id, filters = {}) ⇒ Object
-
.content_ratings(id, filters = {}) ⇒ Object
-
.crew(id, filters = {}) ⇒ Object
-
.detail(id, filters = {}) ⇒ Object
-
.external_ids(id, filters = {}) ⇒ Object
-
.keywords(id, filters = {}) ⇒ Object
-
.latest(filters = {}) ⇒ Object
-
.on_the_air(filters = {}) ⇒ Object
-
.popular(filters = {}) ⇒ Object
-
.posters(id, filters = {}) ⇒ Object
-
.similar(id, filters = {}) ⇒ Object
-
.top_rated(filters = {}) ⇒ Object
-
.translations(id, filters = {}) ⇒ Object
-
.videos(id, filters = {}) ⇒ Object
Methods inherited from Struct
#analyze_value, #initialize
Constructor Details
This class inherits a constructor from Tmdb::Struct
Class Method Details
.airing_today(filters = {}) ⇒ Object
113
114
115
116
|
# File 'lib/tmdb/tv.rb', line 113
def self.airing_today(filters={})
result = Resource.new('/tv/airing_today', filters).get
self.new(result)
end
|
.alternative_titles(id, filters = {}) ⇒ Object
10
11
12
13
14
15
16
|
# File 'lib/tmdb/tv.rb', line 10
def self.alternative_titles(id, filters={})
result = Resource.new("/tv/#{id}/alternative_titles", filters).get
result['results'].map do |entry|
self.new(entry)
end
end
|
.backdrops(id, filters = {}) ⇒ Object
57
58
59
60
61
62
63
|
# File 'lib/tmdb/tv.rb', line 57
def self.backdrops(id, filters={})
result = Resource.new("/tv/#{id}/images", filters).get
result['backdrops'].map do |entry|
Backdrop.new(entry)
end
end
|
.cast(id, filters = {}) ⇒ Object
36
37
38
39
40
41
42
|
# File 'lib/tmdb/tv.rb', line 36
def self.cast(id, filters={})
result = Resource.new("/tv/#{id}/credits", filters).get
result['cast'].map do |entry|
Person.new(entry)
end
end
|
.changes(id, filters = {}) ⇒ Object
18
19
20
21
22
23
24
25
26
|
# File 'lib/tmdb/tv.rb', line 18
def self.changes(id, filters={})
result = Resource.new("/tv/#{id}/changes", filters).get
result['changes'].map do |entry|
change = Change.new(entry)
change.convert_items!
change
end
end
|
.content_ratings(id, filters = {}) ⇒ Object
28
29
30
31
32
33
34
|
# File 'lib/tmdb/tv.rb', line 28
def self.content_ratings(id, filters={})
result = Resource.new("/tv/#{id}/content_ratings", filters).get
result['results'].map do |entry|
Rating.new(entry)
end
end
|
.crew(id, filters = {}) ⇒ Object
44
45
46
47
48
49
50
|
# File 'lib/tmdb/tv.rb', line 44
def self.crew(id, filters={})
result = Resource.new("/tv/#{id}/credits", filters).get
result['crew'].map do |entry|
Person.new(entry)
end
end
|
.detail(id, filters = {}) ⇒ Object
4
5
6
7
8
|
# File 'lib/tmdb/tv.rb', line 4
def self.detail(id, filters={})
result = Resource.new("/tv/#{id}", filters).get
create_new_instance_with_normalized_data(result)
end
|
.external_ids(id, filters = {}) ⇒ Object
52
53
54
55
|
# File 'lib/tmdb/tv.rb', line 52
def self.external_ids(id, filters={})
result = Resource.new("/tv/#{id}/external_ids", filters).get
self.new(result)
end
|
.keywords(id, filters = {}) ⇒ Object
73
74
75
76
77
78
79
|
# File 'lib/tmdb/tv.rb', line 73
def self.keywords(id, filters={})
result = Resource.new("/tv/#{id}/keywords", filters).get
result['results'].map do |entry|
Keyword.new(entry)
end
end
|
.latest(filters = {}) ⇒ Object
102
103
104
105
106
|
# File 'lib/tmdb/tv.rb', line 102
def self.latest(filters={})
result = Resource.new('/tv/latest', filters).get
create_new_instance_with_normalized_data(result)
end
|
.on_the_air(filters = {}) ⇒ Object
108
109
110
111
|
# File 'lib/tmdb/tv.rb', line 108
def self.on_the_air(filters={})
result = Resource.new('/tv/on_the_air', filters).get
self.new(result)
end
|
.popular(filters = {}) ⇒ Object
123
124
125
126
|
# File 'lib/tmdb/tv.rb', line 123
def self.popular(filters={})
result = Resource.new('/tv/popular', filters).get
self.new(result)
end
|
.posters(id, filters = {}) ⇒ Object
65
66
67
68
69
70
71
|
# File 'lib/tmdb/tv.rb', line 65
def self.posters(id, filters={})
result = Resource.new("/tv/#{id}/images", filters).get
result['posters'].map do |entry|
Poster.new(entry)
end
end
|
.similar(id, filters = {}) ⇒ Object
81
82
83
84
|
# File 'lib/tmdb/tv.rb', line 81
def self.similar(id, filters={})
result = Resource.new("/tv/#{id}/similar", filters).get
self.new(result)
end
|
.top_rated(filters = {}) ⇒ Object
118
119
120
121
|
# File 'lib/tmdb/tv.rb', line 118
def self.top_rated(filters={})
result = Resource.new('/tv/top_rated', filters).get
self.new(result)
end
|
.translations(id, filters = {}) ⇒ Object
86
87
88
89
90
91
92
|
# File 'lib/tmdb/tv.rb', line 86
def self.translations(id, filters={})
result = Resource.new("/tv/#{id}/translations", filters).get
result['translations'].map do |entry|
Translation.new(entry)
end
end
|
.videos(id, filters = {}) ⇒ Object
94
95
96
97
98
99
100
|
# File 'lib/tmdb/tv.rb', line 94
def self.videos(id, filters={})
result = Resource.new("/tv/#{id}/videos", filters).get
result['results'].map do |entry|
Video.new(entry)
end
end
|