lib/turntabler/authorized_user.rb
def login
      response = EventMachine::HttpRequest.new('https://turntable.fm/api/user.email_login').get(:query => {:email => email, :password => password, :client => client.id}).response
      success, data = response.empty? ? [nil, {}] : JSON.parse(response)
      raise(ConnectionError, data['err']) unless success

      self.attributes = data
      true
    end
def login
      response = EventMachine::HttpRequest.new('https://turntable.fm/api/user.email_login').get(:query => {:email => email, :password => password, :client => client.id}).response
      success, data = response.empty? ? [nil, {}] : JSON.parse(response)
      raise(ConnectionError, data['err']) unless success

      self.attributes = data
      true
    end
Logs the user in using the associated e-mail address / password.  This will
 generate a user id / auth token for authentication with the API services.

 @api private
 @return [true]
 @raise [Turntabler::Error] if the command fails