Class: Onlyfans::Resources::Notifications::TabsOrder
- Inherits:
-
Object
- Object
- Onlyfans::Resources::Notifications::TabsOrder
- Defined in:
- lib/onlyfans/resources/notifications/tabs_order.rb
Overview
Endpoints for managingr account notifications
Instance Method Summary collapse
-
#get(account, request_options: {}) ⇒ Onlyfans::Models::Notifications::TabsOrderGetResponse
Get the order of an account’s notification tabs as displayed on the OnlyFans notifications page.
-
#initialize(client:) ⇒ TabsOrder
constructor
private
A new instance of TabsOrder.
-
#update(account, tabs:, request_options: {}) ⇒ Onlyfans::Models::Notifications::TabsOrderUpdateResponse
Some parameter documentations has been truncated, see Models::Notifications::TabsOrderUpdateParams for more details.
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.
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
48 49 50 51 52 53 54 55 |
# File 'lib/onlyfans/resources/notifications/tabs_order.rb', line 48 def get(account, params = {}) @client.request( method: :get, path: ["api/%1$s/notifications/tabs-order", account], 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
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/onlyfans/resources/notifications/tabs_order.rb', line 25 def update(account, params) parsed, = Onlyfans::Notifications::TabsOrderUpdateParams.dump_request(params) @client.request( method: :put, path: ["api/%1$s/notifications/tabs-order", account], body: parsed, model: Onlyfans::Models::Notifications::TabsOrderUpdateResponse, options: ) end |