Class: Onlyfans::Resources::Following

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

Overview

APIs for managing OnlyFans followings (people you’re subscribed to)

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Following

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

Parameters:



113
114
115
# File 'lib/onlyfans/resources/following.rb', line 113

def initialize(client:)
  @client = client
end

Instance Method Details

#list_active(account, filter: nil, limit: nil, offset: nil, query: nil, request_options: {}) ⇒ Onlyfans::Models::FollowingListActiveResponse

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

Get a paginated list of followings for an Account. Newest followings are first.

Parameters:

  • account (String)

    The Account ID

  • filter (Onlyfans::Models::FollowingListActiveParams::Filter)
  • limit (Integer)

    Number of followings to return (1-50). Must be at least 1. Must not be greater t

  • offset (Integer)

    Pagination offset. Must be at least 0.

  • query (String, nil)

    Search within following name/username.

  • request_options (Onlyfans::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/onlyfans/resources/following.rb', line 29

def list_active(, params = {})
  parsed, options = Onlyfans::FollowingListActiveParams.dump_request(params)
  query = Onlyfans::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["api/%1$s/following/active", ],
    query: query,
    model: Onlyfans::Models::FollowingListActiveResponse,
    options: options
  )
end

#list_all(account, filter: nil, limit: nil, offset: nil, query: nil, request_options: {}) ⇒ Onlyfans::Models::FollowingListAllResponse

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

Get a paginated list of followings for an Account. Newest followings are first.

Parameters:

  • account (String)

    The Account ID

  • filter (Onlyfans::Models::FollowingListAllParams::Filter)
  • limit (Integer)

    Number of followings to return (1-50). Must be at least 1. Must not be greater t

  • offset (Integer)

    Pagination offset. Must be at least 0.

  • query (String, nil)

    Search within following name/username.

  • request_options (Onlyfans::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



63
64
65
66
67
68
69
70
71
72
73
# File 'lib/onlyfans/resources/following.rb', line 63

def list_all(, params = {})
  parsed, options = Onlyfans::FollowingListAllParams.dump_request(params)
  query = Onlyfans::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["api/%1$s/following/all", ],
    query: query,
    model: Onlyfans::Models::FollowingListAllResponse,
    options: options
  )
end

#list_expired(account, filter: nil, limit: nil, offset: nil, query: nil, request_options: {}) ⇒ Onlyfans::Models::FollowingListExpiredResponse

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

Get a paginated list of expired followings for an Account. Newest followings are first.

Parameters:

  • account (String)

    The Account ID

  • filter (Onlyfans::Models::FollowingListExpiredParams::Filter)
  • limit (Integer)

    Number of followings to return (1-50). Must be at least 1. Must not be greater t

  • offset (Integer)

    Pagination offset. Must be at least 0.

  • query (String, nil)

    Search within following name/username.

  • request_options (Onlyfans::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



98
99
100
101
102
103
104
105
106
107
108
# File 'lib/onlyfans/resources/following.rb', line 98

def list_expired(, params = {})
  parsed, options = Onlyfans::FollowingListExpiredParams.dump_request(params)
  query = Onlyfans::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["api/%1$s/following/expired", ],
    query: query,
    model: Onlyfans::Models::FollowingListExpiredResponse,
    options: options
  )
end