Class: Onlyfans::Resources::Notifications::TabsOrder

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

Overview

Endpoints for managingr account notifications

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ TabsOrder

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

Parameters:



60
61
62
# File 'lib/onlyfans/resources/notifications/tabs_order.rb', line 60

def initialize(client:)
  @client = client
end

Instance Method Details

#get(account, request_options: {}) ⇒ Onlyfans::Models::Notifications::TabsOrderGetResponse

Get the order of an account’s notification tabs as displayed on the OnlyFans notifications page

Parameters:

Returns:

See Also:



48
49
50
51
52
53
54
55
# File 'lib/onlyfans/resources/notifications/tabs_order.rb', line 48

def get(, params = {})
  @client.request(
    method: :get,
    path: ["api/%1$s/notifications/tabs-order", ],
    model: Onlyfans::Models::Notifications::TabsOrderGetResponse,
    options: params[:request_options]
  )
end

#update(account, tabs:, request_options: {}) ⇒ Onlyfans::Models::Notifications::TabsOrderUpdateResponse

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

Update the order of an account’s notification tabs as displayed on the OnlyFans notifications page

Parameters:

  • account (String)

    The Account ID

  • tabs (Array<String>)

    Array of tab keys. Must include exactly these: all, subscriptions, onlyfans, pur

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

Returns:

See Also:



25
26
27
28
29
30
31
32
33
34
# File 'lib/onlyfans/resources/notifications/tabs_order.rb', line 25

def update(, params)
  parsed, options = Onlyfans::Notifications::TabsOrderUpdateParams.dump_request(params)
  @client.request(
    method: :put,
    path: ["api/%1$s/notifications/tabs-order", ],
    body: parsed,
    model: Onlyfans::Models::Notifications::TabsOrderUpdateResponse,
    options: options
  )
end