Interface INotificationsClient
- Namespace
- TorBoxSDK.Main.Notifications
- Assembly
- TorBoxSDK.dll
Defines operations for managing notifications through the TorBox Main API.
public interface INotificationsClient
Methods
ClearAllNotificationsAsync(CancellationToken)
Clears all notifications for the authenticated user.
Task<TorBoxResponse> ClearAllNotificationsAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<TorBoxResponse>
The API response.
Exceptions
- TorBoxException
Thrown when the API returns an error.
ClearNotificationAsync(long, CancellationToken)
Clears a specific notification by its identifier.
Task<TorBoxResponse> ClearNotificationAsync(long notificationId, CancellationToken cancellationToken = default)
Parameters
notificationIdlongThe unique identifier of the notification to clear.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<TorBoxResponse>
The API response.
Exceptions
- TorBoxException
Thrown when the API returns an error.
GetIntercomHashAsync(string, string, CancellationToken)
Gets the Intercom identity verification hash for the authenticated user.
Task<TorBoxResponse<IntercomHash>> GetIntercomHashAsync(string authId, string email, CancellationToken cancellationToken = default)
Parameters
authIdstringThe user's auth identifier.
emailstringThe user's email address.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<TorBoxResponse<IntercomHash>>
The Intercom hash data.
Exceptions
- ArgumentNullException
Thrown when
authIdoremailis null.- ArgumentException
Thrown when
authIdoremailis empty.- TorBoxException
Thrown when the API returns an error.
GetMyNotificationsAsync(CancellationToken)
Retrieves the authenticated user's notifications.
Task<TorBoxResponse<IReadOnlyList<Notification>>> GetMyNotificationsAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<TorBoxResponse<IReadOnlyList<Notification>>>
A list of notifications.
Exceptions
- TorBoxException
Thrown when the API returns an error.
GetNotificationRssAsync(CancellationToken)
Gets the notifications RSS feed.
Task<TorBoxResponse<NotificationRssFeed>> GetNotificationRssAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<TorBoxResponse<NotificationRssFeed>>
The parsed RSS feed.
Exceptions
- TorBoxException
Thrown when the API returns an error.
SendTestNotificationAsync(CancellationToken)
Sends a test notification to the authenticated user.
Task<TorBoxResponse> SendTestNotificationAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<TorBoxResponse>
The API response.
Exceptions
- TorBoxException
Thrown when the API returns an error.