Class: Onlyfans::Resources::Fans::Notes
- Inherits:
-
Object
- Object
- Onlyfans::Resources::Fans::Notes
- Defined in:
- lib/onlyfans/resources/fans/notes.rb
Overview
APIs for managing OnlyFans fans (subscribers)
Instance Method Summary collapse
-
#clear_notes(fan_id, account:, request_options: {}) ⇒ Onlyfans::Models::Fans::NoteClearNotesResponse
Clear notes for a specific fan.
-
#create_edit_notes(fan_id, account:, notes:, request_options: {}) ⇒ Onlyfans::Models::Fans::NoteCreateEditNotesResponse
Create or edit notes for a specific fan.
-
#get_notes(fan_id, account:, request_options: {}) ⇒ Onlyfans::Models::Fans::NoteGetNotesResponse
Retrieve notes for a specific fan.
-
#initialize(client:) ⇒ Notes
constructor
private
A new instance of Notes.
Constructor Details
#initialize(client:) ⇒ Notes
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 Notes.
95 96 97 |
# File 'lib/onlyfans/resources/fans/notes.rb', line 95 def initialize(client:) @client = client end |
Instance Method Details
#clear_notes(fan_id, account:, request_options: {}) ⇒ Onlyfans::Models::Fans::NoteClearNotesResponse
Clear notes for a specific fan.
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/onlyfans/resources/fans/notes.rb', line 21 def clear_notes(fan_id, params) parsed, = Onlyfans::Fans::NoteClearNotesParams.dump_request(params) account = parsed.delete(:account) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :delete, path: ["api/%1$s/fans/%2$s/notes", account, fan_id], model: Onlyfans::Models::Fans::NoteClearNotesResponse, options: ) end |
#create_edit_notes(fan_id, account:, notes:, request_options: {}) ⇒ Onlyfans::Models::Fans::NoteCreateEditNotesResponse
Create or edit notes for a specific fan.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/onlyfans/resources/fans/notes.rb', line 50 def create_edit_notes(fan_id, params) parsed, = Onlyfans::Fans::NoteCreateEditNotesParams.dump_request(params) account = parsed.delete(:account) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :put, path: ["api/%1$s/fans/%2$s/notes", account, fan_id], body: parsed, model: Onlyfans::Models::Fans::NoteCreateEditNotesResponse, options: ) end |
#get_notes(fan_id, account:, request_options: {}) ⇒ Onlyfans::Models::Fans::NoteGetNotesResponse
Retrieve notes for a specific fan.
78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/onlyfans/resources/fans/notes.rb', line 78 def get_notes(fan_id, params) parsed, = Onlyfans::Fans::NoteGetNotesParams.dump_request(params) account = parsed.delete(:account) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["api/%1$s/fans/%2$s/notes", account, fan_id], model: Onlyfans::Models::Fans::NoteGetNotesResponse, options: ) end |