Class: Traktr::Rate
Instance Method Summary
collapse
Methods inherited from Endpoint
#initialize
Instance Method Details
#episode(data) ⇒ Object
3
4
5
|
# File 'lib/traktr/rate.rb', line 3
def episode( data )
parse_response self.class.post('/' + File.join('episode', @client.api_key), body: data.merge(@auth).to_json, headers: { 'Content-Type' => 'application/json'})
end
|
#episodes(data) ⇒ Object
7
8
9
10
|
# File 'lib/traktr/rate.rb', line 7
def episodes( data )
data = @auth.merge( :episodes => data )
parse_response self.class.post('/' + File.join('episodes', @client.api_key), body: data.to_json, headers: { 'Content-Type' => 'application/json'})
end
|
#movie(data) ⇒ Object
12
13
14
|
# File 'lib/traktr/rate.rb', line 12
def movie( data )
parse_response self.class.post('/' + File.join('movie', @client.api_key), body: data.merge(@auth).to_json, headers: { 'Content-Type' => 'application/json'})
end
|
#movies(data) ⇒ Object
16
17
18
19
|
# File 'lib/traktr/rate.rb', line 16
def movies( data )
data = @auth.merge( :movies => data )
parse_response self.class.post('/' + File.join('movies', @client.api_key), body: data.to_json, headers: { 'Content-Type' => 'application/json'})
end
|
#show(data) ⇒ Object
21
22
23
|
# File 'lib/traktr/rate.rb', line 21
def show( data )
parse_response self.class.post('/' + File.join('show', @client.api_key), body: data.merge(@auth).to_json, headers: { 'Content-Type' => 'application/json'})
end
|
#shows(data) ⇒ Object
25
26
27
28
|
# File 'lib/traktr/rate.rb', line 25
def shows( data )
data = @auth.merge( :shows => data )
parse_response self.class.post('/' + File.join('shows', @client.api_key), body: data.to_json, headers: { 'Content-Type' => 'application/json'})
end
|