Class: Onlyfans::Resources::SharedTrialLinks
- Inherits:
-
Object
- Object
- Onlyfans::Resources::SharedTrialLinks
- Defined in:
- lib/onlyfans/resources/shared_trial_links.rb,
lib/onlyfans/resources/shared_trial_links/tags.rb,
sig/onlyfans/resources/shared_trial_links.rbs,
sig/onlyfans/resources/shared_trial_links/tags.rbs
Overview
APIs for Free Trial Links that other OF creators have shared with this account. Revenue, cost, and spender data are not available for shared links.
Defined Under Namespace
Classes: Tags
Instance Attribute Summary collapse
-
#tags ⇒ Onlyfans::Resources::SharedTrialLinks::Tags
readonly
APIs for Free Trial Links that other OF creators have shared with this account.
Instance Method Summary collapse
-
#initialize(client:) ⇒ SharedTrialLinks
constructor
private
A new instance of SharedTrialLinks.
-
#list(account, limit: nil, offset: nil, synchronous: nil, request_options: {}) ⇒ Onlyfans::Models::SharedTrialLinkListResponse
Some parameter documentations has been truncated, see Models::SharedTrialLinkListParams for more details.
-
#revoke_access(shared_trial_link_id, account:, request_options: {}) ⇒ Onlyfans::Models::SharedTrialLinkRevokeAccessResponse
Revoke the account's access to a shared Free Trial Link.
Constructor Details
#initialize(client:) ⇒ SharedTrialLinks
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 SharedTrialLinks.
79 80 81 82 |
# File 'lib/onlyfans/resources/shared_trial_links.rb', line 79 def initialize(client:) @client = client @tags = Onlyfans::Resources::SharedTrialLinks::Tags.new(client: client) end |
Instance Attribute Details
#tags ⇒ Onlyfans::Resources::SharedTrialLinks::Tags (readonly)
APIs for Free Trial Links that other OF creators have shared with this account. Revenue, cost, and spender data are not available for shared links.
11 12 13 |
# File 'lib/onlyfans/resources/shared_trial_links.rb', line 11 def @tags end |
Instance Method Details
#list(account, limit: nil, offset: nil, synchronous: nil, request_options: {}) ⇒ Onlyfans::Models::SharedTrialLinkListResponse
Some parameter documentations has been truncated, see Models::SharedTrialLinkListParams for more details.
List all Free Trial Links shared with the account by other OF creators. Calls OnlyFans live and syncs to our cache.
background. *
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/onlyfans/resources/shared_trial_links.rb', line 35 def list(account, params = {}) parsed, = Onlyfans::SharedTrialLinkListParams.dump_request(params) query = Onlyfans::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["api/%1$s/shared-trial-links", account], query: query, model: Onlyfans::Models::SharedTrialLinkListResponse, options: ) end |
#revoke_access(shared_trial_link_id, account:, request_options: {}) ⇒ Onlyfans::Models::SharedTrialLinkRevokeAccessResponse
Revoke the account's access to a shared Free Trial Link. Calls OnlyFans
DELETE /trials/share-access, then removes the local cache row. The owner keeps
the link.
62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/onlyfans/resources/shared_trial_links.rb', line 62 def revoke_access(shared_trial_link_id, params) parsed, = Onlyfans::SharedTrialLinkRevokeAccessParams.dump_request(params) account = parsed.delete(:account) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :delete, path: ["api/%1$s/shared-trial-links/%2$s", account, shared_trial_link_id], model: Onlyfans::Models::SharedTrialLinkRevokeAccessResponse, options: ) end |