Class: Onlyfans::Resources::Statistics::Reach

Inherits:
Object
  • Object
show all
Defined in:
lib/onlyfans/resources/statistics/reach.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Reach

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 Reach.

Parameters:



46
47
48
# File 'lib/onlyfans/resources/statistics/reach.rb', line 46

def initialize(client:)
  @client = client
end

Instance Method Details

#get_profile_visitors(account, end_date:, start_date:, filter: nil, limit: nil, type: nil, request_options: {}) ⇒ Onlyfans::Models::Statistics::ReachGetProfileVisitorsResponse::UnionMember0, ...

Some parameter documentations has been truncated, see Models::Statistics::ReachGetProfileVisitorsParams for more details.

Get the number of profile visitors for a given period.

Parameters:

Returns:

See Also:



31
32
33
34
35
36
37
38
39
40
41
# File 'lib/onlyfans/resources/statistics/reach.rb', line 31

def get_profile_visitors(, params)
  parsed, options = Onlyfans::Statistics::ReachGetProfileVisitorsParams.dump_request(params)
  query = Onlyfans::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["api/%1$s/statistics/reach/profile-visitors", ],
    query: query,
    model: Onlyfans::Models::Statistics::ReachGetProfileVisitorsResponse,
    options: options
  )
end