Class: Onlyfans::Resources::SavedForLater::Posts::Settings
- Inherits:
-
Object
- Object
- Onlyfans::Resources::SavedForLater::Posts::Settings
- Defined in:
- lib/onlyfans/resources/saved_for_later/posts/settings.rb
Instance Method Summary collapse
-
#disable_automatic_posting(account, request_options: {}) ⇒ Onlyfans::Models::SavedForLater::Posts::SettingDisableAutomaticPostingResponse
Disable automatic posting of Saved For Later posts.
-
#enable_or_update_automatic_posting(account, period:, request_options: {}) ⇒ Onlyfans::Models::SavedForLater::Posts::SettingEnableOrUpdateAutomaticPostingResponse
Enable or update automatic posting of Saved For Later posts.
-
#initialize(client:) ⇒ Settings
constructor
private
A new instance of Settings.
-
#retrieve(account, request_options: {}) ⇒ Onlyfans::Models::SavedForLater::Posts::SettingRetrieveResponse
Get the Saved For Later post settings.
Constructor Details
#initialize(client:) ⇒ Settings
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 Settings.
76 77 78 |
# File 'lib/onlyfans/resources/saved_for_later/posts/settings.rb', line 76 def initialize(client:) @client = client end |
Instance Method Details
#disable_automatic_posting(account, request_options: {}) ⇒ Onlyfans::Models::SavedForLater::Posts::SettingDisableAutomaticPostingResponse
Disable automatic posting of Saved For Later posts.
39 40 41 42 43 44 45 46 |
# File 'lib/onlyfans/resources/saved_for_later/posts/settings.rb', line 39 def disable_automatic_posting(account, params = {}) @client.request( method: :patch, path: ["api/%1$s/saved-for-later/posts/settings/disable-automatic-posting", account], model: Onlyfans::Models::SavedForLater::Posts::SettingDisableAutomaticPostingResponse, options: params[:request_options] ) end |
#enable_or_update_automatic_posting(account, period:, request_options: {}) ⇒ Onlyfans::Models::SavedForLater::Posts::SettingEnableOrUpdateAutomaticPostingResponse
Enable or update automatic posting of Saved For Later posts.
61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/onlyfans/resources/saved_for_later/posts/settings.rb', line 61 def enable_or_update_automatic_posting(account, params) parsed, = Onlyfans::SavedForLater::Posts::SettingEnableOrUpdateAutomaticPostingParams.dump_request(params) @client.request( method: :patch, path: ["api/%1$s/saved-for-later/posts/settings/enable-or-update-automatic-posting", account], body: parsed, model: Onlyfans::Models::SavedForLater::Posts::SettingEnableOrUpdateAutomaticPostingResponse, options: ) end |
#retrieve(account, request_options: {}) ⇒ Onlyfans::Models::SavedForLater::Posts::SettingRetrieveResponse
Get the Saved For Later post settings.
19 20 21 22 23 24 25 26 |
# File 'lib/onlyfans/resources/saved_for_later/posts/settings.rb', line 19 def retrieve(account, params = {}) @client.request( method: :get, path: ["api/%1$s/saved-for-later/posts/settings", account], model: Onlyfans::Models::SavedForLater::Posts::SettingRetrieveResponse, options: params[:request_options] ) end |