class Traktr::Network
Public Instance Methods
approve( user, follow_back = false )
click to toggle source
# 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 )
click to toggle source
# 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 )
click to toggle source
# 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()
click to toggle source
# 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 )
click to toggle source
# 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