Class: RememberTheRuby::RPC::Auth

Inherits:
Transported show all
Defined in:
lib/remember-the-ruby/rpc.rb

Instance Method Summary collapse

Methods inherited from Transported

#initialize

Constructor Details

This class inherits a constructor from RememberTheRuby::RPC::Transported

Instance Method Details

#get_authorization_url(params = {}) ⇒ Object



115
116
117
118
# File 'lib/remember-the-ruby/rpc.rb', line 115

def get_authorization_url(params={})
  params[:perms] ||= 'delete'
  data = Transport::TRANSPORT_URI + @transport.auth_path(params)
end

#get_frobObject



120
121
122
123
# File 'lib/remember-the-ruby/rpc.rb', line 120

def get_frob
  rsp = @transport.request('rtm.auth.getFrob')
  rsp.elements['frob'].text
end

#get_tokenObject



125
126
127
128
# File 'lib/remember-the-ruby/rpc.rb', line 125

def get_token
  rsp = @transport.request('rtm.auth.getToken')
  rsp.elements['auth/token'].text
end