Class: Cadenya::Resources::Profiles
- Inherits:
-
Object
- Object
- Cadenya::Resources::Profiles
- Defined in:
- lib/cadenya/resources/profiles.rb
Instance Method Summary collapse
-
#initialize(core) ⇒ Profiles
constructor
A new instance of Profiles.
-
#whoami(request_options: nil) ⇒ Object
Retrieves the profile for the credentials accessing the API.
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: ) Types::Profile.from_json(_data) end |