Method: Camdram::Client#user

Defined in:
lib/camdram/client.rb

#userCamdram::User

Returns the user associated with the API token if set, otherwise raises an exception

Raises:

  • (StandardError)

    Error raised when the API token is not set.



78
79
80
81
82
# File 'lib/camdram/client.rb', line 78

def user
  slug = "/auth/account.json"
  response = get(slug)
  User.new(response)
end