class Putio::Client
Public Class Methods
new(user_token)
click to toggle source
# File lib/putio/client.rb, line 6 def initialize(user_token) @auth = {:query =>{:oauth_token=> user_token},:headers => {"Accept:" => "application/json"}} @options = {} end
Public Instance Methods
files()
click to toggle source
# File lib/putio/client.rb, line 11 def files get_endpoint("/files/list")["files"] end
get_endpoint(endpoint,options={})
click to toggle source
# File lib/putio/client.rb, line 17 def get_endpoint(endpoint,options={}) options.merge! @auth response = self.class.get(endpoint,options).parsed_response if response["status"] == "ERROR" raise AuthError else return response end end
search(options)
click to toggle source
# File lib/putio/client.rb, line 14 def search(options) end