Class: WhopSDK::Resources::Notifications
- Inherits:
-
Object
- Object
- WhopSDK::Resources::Notifications
- Defined in:
- lib/whop_sdk/resources/notifications.rb
Overview
Notifications
Instance Method Summary collapse
-
#create(body:, request_options: {}) ⇒ WhopSDK::Models::NotificationCreateResponse
Send a push notification to users in an experience or company team.
-
#initialize(client:) ⇒ Notifications
constructor
private
A new instance of Notifications.
Constructor Details
#initialize(client:) ⇒ Notifications
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 Notifications.
37 38 39 |
# File 'lib/whop_sdk/resources/notifications.rb', line 37 def initialize(client:) @client = client end |
Instance Method Details
#create(body:, request_options: {}) ⇒ WhopSDK::Models::NotificationCreateResponse
Send a push notification to users in an experience or company team. The notification is processed asynchronously and supports targeting specific users.
Required permissions:
-
‘notification:create`
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/whop_sdk/resources/notifications.rb', line 23 def create(params) parsed, = WhopSDK::NotificationCreateParams.dump_request(params) @client.request( method: :post, path: "notifications", body: parsed[:body], model: WhopSDK::Models::NotificationCreateResponse, options: ) end |