Class: Cadenya::Resources::Profiles

Inherits:
Object
  • Object
show all
Defined in:
lib/cadenya/resources/profiles.rb

Instance Method Summary collapse

Constructor Details

#initialize(core) ⇒ Profiles

Returns a new instance of Profiles.



8
9
10
# File 'lib/cadenya/resources/profiles.rb', line 8

def initialize(core)
  @core = core
end

Instance Method Details

#whoami(request_options: nil) ⇒ Object

Retrieves the profile for the credentials accessing the API



13
14
15
16
17
# File 'lib/cadenya/resources/profiles.rb', line 13

def whoami(request_options: nil)
  _path = "/v1/whoami"
  _data = @core.request(:get, _path, request_options: request_options)
  Types::Profile.from_json(_data)
end