Class: Traktr::Network
Instance Method Summary
collapse
Methods inherited from Endpoint
#initialize
Instance Method Details
#approve(user, follow_back = false) ⇒ Object
3
4
5
6
|
# File 'lib/traktr/network.rb', line 3
def approve( user, follow_back = false )
data = @auth.merge({:user => user, :follow_back => follow_back})
parse_response self.class.post('/' + File.join('approve', @client.api_key), body: data.to_json, headers: { 'Content-Type' => 'application/json'})
end
|
#deny(user) ⇒ Object
8
9
10
11
|
# File 'lib/traktr/network.rb', line 8
def deny( user )
data = @auth.merge({:user => user})
parse_response self.class.post('/' + File.join('deny', @client.api_key), body: data.to_json, headers: { 'Content-Type' => 'application/json'})
end
|
#follow(user) ⇒ Object
13
14
15
16
|
# File 'lib/traktr/network.rb', line 13
def follow( user )
data = @auth.merge({:user => user})
parse_response self.class.post('/' + File.join('follow', @client.api_key), body: data.to_json, headers: { 'Content-Type' => 'application/json'})
end
|
#requests ⇒ Object
18
19
20
|
# File 'lib/traktr/network.rb', line 18
def requests
parse_response self.class.post('/' + File.join('requests', @client.api_key), body: @auth.to_json, headers: { 'Content-Type' => 'application/json'})
end
|
#unfollow(user) ⇒ Object
22
23
24
25
|
# File 'lib/traktr/network.rb', line 22
def unfollow( user )
data = @auth.merge({:user => user})
parse_response self.class.post('/' + File.join('unfollow', @client.api_key), body: data.to_json, headers: { 'Content-Type' => 'application/json'})
end
|