Module: Dnsimple::Client::Identity
- Included in:
- IdentityService
- Defined in:
- lib/dnsimple/client/identity.rb
Defined Under Namespace
Modules: StaticHelpers
Instance Method Summary collapse
-
#whoami(options = {}) ⇒ Dnsimple::Response<Hash>
Gets the information about the current authenticated context.
Instance Method Details
#whoami(options = {}) ⇒ Dnsimple::Response<Hash>
Gets the information about the current authenticated context.
12 13 14 15 16 17 18 19 |
# File 'lib/dnsimple/client/identity.rb', line 12 def whoami( = {}) response = client.get(Client.versioned("/whoami"), ) data = response["data"] account = data["account"] ? Struct::Account.new(data["account"]) : nil user = data["user"] ? Struct::User.new(data["user"]) : nil Response.new(response, account: account, user: user) end |