Class: Onlyfans::Resources::SavedForLater::Posts
- Inherits:
-
Object
- Object
- Onlyfans::Resources::SavedForLater::Posts
- Defined in:
- lib/onlyfans/resources/saved_for_later/posts.rb,
lib/onlyfans/resources/saved_for_later/posts/settings.rb
Defined Under Namespace
Classes: Settings
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(client:) ⇒ Posts
constructor
private
A new instance of Posts.
-
#list(account, limit:, offset:, request_options: {}) ⇒ Onlyfans::Models::SavedForLater::PostListResponse
List all posts that are marked as “Save For Later”.
Constructor Details
#initialize(client:) ⇒ Posts
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 Posts.
40 41 42 43 |
# File 'lib/onlyfans/resources/saved_for_later/posts.rb', line 40 def initialize(client:) @client = client @settings = Onlyfans::Resources::SavedForLater::Posts::Settings.new(client: client) end |
Instance Attribute Details
#settings ⇒ Onlyfans::Resources::SavedForLater::Posts::Settings (readonly)
8 9 10 |
# File 'lib/onlyfans/resources/saved_for_later/posts.rb', line 8 def settings @settings end |
Instance Method Details
#list(account, limit:, offset:, request_options: {}) ⇒ Onlyfans::Models::SavedForLater::PostListResponse
List all posts that are marked as “Save For Later”.
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/onlyfans/resources/saved_for_later/posts.rb', line 25 def list(account, params) parsed, = Onlyfans::SavedForLater::PostListParams.dump_request(params) query = Onlyfans::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["api/%1$s/saved-for-later/posts", account], query: query, model: Onlyfans::Models::SavedForLater::PostListResponse, options: ) end |