Class: Onlyfans::Resources::Fans::Notes

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

Overview

APIs for managing OnlyFans fans (subscribers)

Instance Method Summary collapse

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.

Parameters:



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.

Parameters:

  • fan_id (String)

    Fan’s OnlyFans ID

  • account (String)

    The Account ID

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

Returns:

See Also:



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, options = Onlyfans::Fans::NoteClearNotesParams.dump_request(params)
   =
    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", , fan_id],
    model: Onlyfans::Models::Fans::NoteClearNotesResponse,
    options: options
  )
end

#create_edit_notes(fan_id, account:, notes:, request_options: {}) ⇒ Onlyfans::Models::Fans::NoteCreateEditNotesResponse

Create or edit notes for a specific fan.

Parameters:

  • fan_id (String)

    Path param: Fan’s OnlyFans ID

  • account (String)

    Path param: The Account ID

  • notes (String)

    Body param: The new note value.

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

Returns:

See Also:



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, options = Onlyfans::Fans::NoteCreateEditNotesParams.dump_request(params)
   =
    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", , fan_id],
    body: parsed,
    model: Onlyfans::Models::Fans::NoteCreateEditNotesResponse,
    options: options
  )
end

#get_notes(fan_id, account:, request_options: {}) ⇒ Onlyfans::Models::Fans::NoteGetNotesResponse

Retrieve notes for a specific fan.

Parameters:

  • fan_id (String)

    Fan’s OnlyFans ID

  • account (String)

    The Account ID

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

Returns:

See Also:



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, options = Onlyfans::Fans::NoteGetNotesParams.dump_request(params)
   =
    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", , fan_id],
    model: Onlyfans::Models::Fans::NoteGetNotesResponse,
    options: options
  )
end