Class: Onlyfans::Resources::Whoami

Inherits:
Object
  • Object
show all
Defined in:
lib/onlyfans/resources/whoami.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Whoami

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Whoami.

Parameters:



27
28
29
# File 'lib/onlyfans/resources/whoami.rb', line 27

def initialize(client:)
  @client = client
end

Instance Method Details

#retrieve(request_options: {}) ⇒ Onlyfans::Models::WhoamiRetrieveResponse

Get details about the currently used API Key & the relevant Team

Parameters:

Returns:

See Also:



15
16
17
18
19
20
21
22
# File 'lib/onlyfans/resources/whoami.rb', line 15

def retrieve(params = {})
  @client.request(
    method: :get,
    path: "api/whoami",
    model: Onlyfans::Models::WhoamiRetrieveResponse,
    options: params[:request_options]
  )
end