Class: Onlyfans::Resources::ClientSessions
- Inherits:
-
Object
- Object
- Onlyfans::Resources::ClientSessions
- Defined in:
- lib/onlyfans/resources/client_sessions.rb
Instance Method Summary collapse
-
#create(display_name:, client_reference_id: nil, proxy_country: nil, request_options: {}) ⇒ Onlyfans::Models::ClientSessionCreateResponse
Create Client Session Token for later use in embedded auth components - eg.
-
#initialize(client:) ⇒ ClientSessions
constructor
private
A new instance of ClientSessions.
Constructor Details
#initialize(client:) ⇒ ClientSessions
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 ClientSessions.
36 37 38 |
# File 'lib/onlyfans/resources/client_sessions.rb', line 36 def initialize(client:) @client = client end |
Instance Method Details
#create(display_name:, client_reference_id: nil, proxy_country: nil, request_options: {}) ⇒ Onlyfans::Models::ClientSessionCreateResponse
Create Client Session Token for later use in embedded auth components - eg. via @onlyfansapi/auth npm package.
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/onlyfans/resources/client_sessions.rb', line 22 def create(params) parsed, = Onlyfans::ClientSessionCreateParams.dump_request(params) @client.request( method: :post, path: "api/client-sessions", body: parsed, model: Onlyfans::Models::ClientSessionCreateResponse, options: ) end |