Subscribes a user to donation alert events.
Donation alert events notify when a new donation is made. This requires the user to be subscribed
to the $alerts:donation
private channel.
The Donation Alerts user ID.
The Client ID obtained beforehand.
Optional
options: DonationAlertsCentrifugoSubscribeOptionsAdditional options for subscription, such as formatting channel names.
Optional
rateLimiterOptions: RateLimiterRequestOptionsOptions for rate limiting during the subscription.
A promise resolving with the DonationAlertsCentrifugoChannel object.
Requires oauth-donation-subscribe
scope.
See the official documentation for more details: https://www.donationalerts.com/apidoc#introduction__centrifugo
Alternatively, the @donation-alerts/events
library can simplify the process of subscribing
and listening to events.
HttpError If the HTTP status code is outside the range of 200–299.
UnregisteredUserError If the user provided is not registered in the auth provider.
Subscribes a user to goal update events.
Goal update events provide information about the progress and completion of goals.
This requires the user to be subscribed to the $goals:goal
private channel.
The Donation Alerts user ID.
The Client ID obtained beforehand.
Optional
options: DonationAlertsCentrifugoSubscribeOptionsAdditional options for subscription, such as formatting channel names.
Optional
rateLimiterOptions: RateLimiterRequestOptionsOptions for rate limiting during the subscription.
A promise resolving with the successfully subscribed channel object.
Requires oauth-goal-subscribe
scope.
See the official documentation for more details: https://www.donationalerts.com/apidoc#introduction__centrifugo
Alternatively, the @donation-alerts/events
library can simplify the process of subscribing
and listening to events.
HttpError If the HTTP status code is outside the range of 200–299.
UnregisteredUserError If the user provided is not registered in the auth.
Subscribes a user to poll update events.
Poll update events notify about ongoing poll progress or results.
This requires the user to be subscribed to the $polls:poll
private channel.
The Donation Alerts user ID.
The Client ID obtained beforehand.
Optional
options: DonationAlertsCentrifugoSubscribeOptionsAdditional options for subscription, such as formatting channel names.
Optional
rateLimiterOptions: RateLimiterRequestOptionsOptions for rate limiting during the subscription.
A promise resolving with the successfully subscribed channel object.
Requires oauth-poll-subscribe
scope.
See the official documentation for more details: https://www.donationalerts.com/apidoc#introduction__centrifugo
Alternatively, the @donation-alerts/events
library can simplify the process of subscribing
and listening to events.
HttpError If the HTTP status code is outside the range of 200–299.
UnregisteredUserError If the user provided is not registered in the auth provider.
Subscribes a user to the specified Centrifugo private channels.
The Donation Alerts user ID.
The Client ID obtained beforehand.
List of private channel names to subscribe the user to. Channel names should not include the user ID – the library will format them automatically if needed.
Optional
options: DonationAlertsCentrifugoSubscribeOptionsAdditional options for subscription, such as formatting channel names.
Optional
rateLimiterOptions: RateLimiterRequestOptionsOptions for controlling the request rate using a rate limiter.
A promise resolving with a list of DonationAlertsCentrifugoChannel.
To subscribe a user, you must first obtain the Client ID (UUIDv4) via WebSockets.
The full subscription flow is described in the official documentation: https://www.donationalerts.com/apidoc#introduction__centrifugo
Alternatively, the @donation-alerts/events
library can simplify the process of subscribing
and listening to events.
HttpError If the HTTP status code is outside the range of 200–299.
UnregisteredUserError If the user provided is not registered in the auth provider.
Donation Alerts Centrifugo API.
Provides methods to manage user subscriptions to Centrifugo private channels. These channels allow receiving real-time updates about specific events such as donations, goals, and polls.