Class: Onlyfans::Resources::SavedForLater::Posts::Settings

Inherits:
Object
  • Object
show all
Defined in:
lib/onlyfans/resources/saved_for_later/posts/settings.rb

Instance Method Summary collapse

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.

Parameters:



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.

Parameters:

Returns:

See Also:



39
40
41
42
43
44
45
46
# File 'lib/onlyfans/resources/saved_for_later/posts/settings.rb', line 39

def disable_automatic_posting(, params = {})
  @client.request(
    method: :patch,
    path: ["api/%1$s/saved-for-later/posts/settings/disable-automatic-posting", ],
    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.

Parameters:

Returns:

See Also:



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(, params)
  parsed, options =
    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", ],
    body: parsed,
    model: Onlyfans::Models::SavedForLater::Posts::SettingEnableOrUpdateAutomaticPostingResponse,
    options: options
  )
end

#retrieve(account, request_options: {}) ⇒ Onlyfans::Models::SavedForLater::Posts::SettingRetrieveResponse

Get the Saved For Later post settings.

Parameters:

Returns:

See Also:



19
20
21
22
23
24
25
26
# File 'lib/onlyfans/resources/saved_for_later/posts/settings.rb', line 19

def retrieve(, params = {})
  @client.request(
    method: :get,
    path: ["api/%1$s/saved-for-later/posts/settings", ],
    model: Onlyfans::Models::SavedForLater::Posts::SettingRetrieveResponse,
    options: params[:request_options]
  )
end