Method: Dnsimple::Client::Identity#whoami

Defined in:
lib/dnsimple/client/identity.rb

#whoami(options = {}) ⇒ Dnsimple::Response<Dnsimple::Struct::Whoami>

Gets the information about the current authenticated context.

Parameters:

  • options (Hash) (defaults to: {})

Returns:

Raises:

See Also:



12
13
14
15
16
# File 'lib/dnsimple/client/identity.rb', line 12

def whoami(options = {})
  response = client.get(Client.versioned("/whoami"), options)

  Dnsimple::Response.new(response, Struct::Whoami.new(response["data"]))
end