Class: Onlyfans::Resources::Following
- Inherits:
-
Object
- Object
- Onlyfans::Resources::Following
- Defined in:
- lib/onlyfans/resources/following.rb
Overview
APIs for managing OnlyFans followings (people you’re subscribed to)
Instance Method Summary collapse
-
#initialize(client:) ⇒ Following
constructor
private
A new instance of Following.
-
#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.
-
#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.
-
#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.
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.
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.
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/onlyfans/resources/following.rb', line 29 def list_active(account, params = {}) parsed, = Onlyfans::FollowingListActiveParams.dump_request(params) query = Onlyfans::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["api/%1$s/following/active", account], query: query, model: Onlyfans::Models::FollowingListActiveResponse, 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.
63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/onlyfans/resources/following.rb', line 63 def list_all(account, params = {}) parsed, = Onlyfans::FollowingListAllParams.dump_request(params) query = Onlyfans::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["api/%1$s/following/all", account], query: query, model: Onlyfans::Models::FollowingListAllResponse, 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.
98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/onlyfans/resources/following.rb', line 98 def list_expired(account, params = {}) parsed, = Onlyfans::FollowingListExpiredParams.dump_request(params) query = Onlyfans::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["api/%1$s/following/expired", account], query: query, model: Onlyfans::Models::FollowingListExpiredResponse, options: ) end |