Class: Onlyfans::Resources::SharedTrialLinks::Tags
- Inherits:
-
Object
- Object
- Onlyfans::Resources::SharedTrialLinks::Tags
- Defined in:
- lib/onlyfans/resources/shared_trial_links/tags.rb,
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.
Instance Method Summary collapse
-
#add(shared_trial_link_id, account:, tags:, request_options: {}) ⇒ Onlyfans::Models::SharedTrialLinks::TagAddResponse
Add tags to a shared Free Trial Link.
-
#initialize(client:) ⇒ Tags
constructor
private
A new instance of Tags.
-
#list(shared_trial_link_id, account:, request_options: {}) ⇒ Onlyfans::Models::SharedTrialLinks::TagListResponse
Get tags for a specific shared Free Trial Link.
-
#remove(shared_trial_link_id, account:, tags:, request_options: {}) ⇒ Onlyfans::Models::SharedTrialLinks::TagRemoveResponse
Remove tags from a shared Free Trial Link.
Constructor Details
#initialize(client:) ⇒ Tags
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 Tags.
102 103 104 |
# File 'lib/onlyfans/resources/shared_trial_links/tags.rb', line 102 def initialize(client:) @client = client end |
Instance Method Details
#add(shared_trial_link_id, account:, tags:, request_options: {}) ⇒ Onlyfans::Models::SharedTrialLinks::TagAddResponse
Add tags to a shared Free Trial Link. Existing tags are preserved. Tag namespace is shared with owned Free Trial Links. This is a free endpoint.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/onlyfans/resources/shared_trial_links/tags.rb', line 53 def add(shared_trial_link_id, params) parsed, = Onlyfans::SharedTrialLinks::TagAddParams.dump_request(params) account = parsed.delete(:account) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :post, path: ["api/%1$s/shared-trial-links/%2$s/tags", account, shared_trial_link_id], body: parsed, model: Onlyfans::Models::SharedTrialLinks::TagAddResponse, options: ) end |
#list(shared_trial_link_id, account:, request_options: {}) ⇒ Onlyfans::Models::SharedTrialLinks::TagListResponse
Get tags for a specific shared Free Trial Link. Tag namespace is shared with owned Free Trial Links. This is a free endpoint.
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/onlyfans/resources/shared_trial_links/tags.rb', line 23 def list(shared_trial_link_id, params) parsed, = Onlyfans::SharedTrialLinks::TagListParams.dump_request(params) account = parsed.delete(:account) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["api/%1$s/shared-trial-links/%2$s/tags", account, shared_trial_link_id], model: Onlyfans::Models::SharedTrialLinks::TagListResponse, options: ) end |
#remove(shared_trial_link_id, account:, tags:, request_options: {}) ⇒ Onlyfans::Models::SharedTrialLinks::TagRemoveResponse
Remove tags from a shared Free Trial Link. Tag namespace is shared with owned Free Trial Links. This is a free endpoint.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/onlyfans/resources/shared_trial_links/tags.rb', line 84 def remove(shared_trial_link_id, params) parsed, = Onlyfans::SharedTrialLinks::TagRemoveParams.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/tags", account, shared_trial_link_id], body: parsed, model: Onlyfans::Models::SharedTrialLinks::TagRemoveResponse, options: ) end |