Class: Onlyfans::Resources::Subscribers
- Inherits:
-
Object
- Object
- Onlyfans::Resources::Subscribers
- Defined in:
- lib/onlyfans/resources/subscribers.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Subscribers
constructor
private
A new instance of Subscribers.
-
#retrieve_statistics(account, end_date: nil, start_date: nil, type: nil, request_options: {}) ⇒ Onlyfans::Models::SubscriberRetrieveStatisticsResponse
Get subscriber and earning statistics for an account for a specified timeframe.
Constructor Details
#initialize(client:) ⇒ Subscribers
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 Subscribers.
39 40 41 |
# File 'lib/onlyfans/resources/subscribers.rb', line 39 def initialize(client:) @client = client end |
Instance Method Details
#retrieve_statistics(account, end_date: nil, start_date: nil, type: nil, request_options: {}) ⇒ Onlyfans::Models::SubscriberRetrieveStatisticsResponse
Get subscriber and earning statistics for an account for a specified timeframe. Optionally, filter by all, renews, or new subscribers.
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/onlyfans/resources/subscribers.rb', line 24 def retrieve_statistics(account, params = {}) parsed, = Onlyfans::SubscriberRetrieveStatisticsParams.dump_request(params) query = Onlyfans::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["api/%1$s/subscribers/statistics", account], query: query, model: Onlyfans::Models::SubscriberRetrieveStatisticsResponse, options: ) end |