Class: Onlyfans::Resources::Messages

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Messages

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

Parameters:



48
49
50
# File 'lib/onlyfans/resources/messages.rb', line 48

def initialize(client:)
  @client = client
end

Instance Method Details

#attach_tags(message_id, account:, rf_guest: nil, rf_partner: nil, rf_tag: nil, request_options: {}) ⇒ Onlyfans::Models::MessageAttachTagsResponse

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

Attach Tags (Release Forms) to a message that has already been sent. Please note, that this is a “sync” operation - for example, if you provide empty ‘rfTag` it will remove all existing tags already attached to the message.

Parameters:

  • message_id (String)

    Path param: The ID of the message to attach the release forms to. This can be ON

  • account (String)

    Path param: The Account ID

  • rf_guest (String)

    Body param: Array of OnlyFans Release Form Guest IDs to tag in your message

  • rf_partner (String)

    Body param: Array of OnlyFans Release Form Partners IDs to tag in your message

  • rf_tag (String)

    Body param: Array of OnlyFans Creator User IDs to tag in your message

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

Returns:

See Also:



30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/onlyfans/resources/messages.rb', line 30

def attach_tags(message_id, params)
  parsed, options = Onlyfans::MessageAttachTagsParams.dump_request(params)
   =
    parsed.delete(:account) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :post,
    path: ["api/%1$s/messages/%2$s/attach-tags", , message_id],
    body: parsed,
    model: Onlyfans::Models::MessageAttachTagsResponse,
    options: options
  )
end