Table of Contents

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

cancellationToken CancellationToken

Cancellation 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

notificationId long

The unique identifier of the notification to clear.

cancellationToken CancellationToken

Cancellation 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

authId string

The user's auth identifier.

email string

The user's email address.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<TorBoxResponse<IntercomHash>>

The Intercom hash data.

Exceptions

ArgumentNullException

Thrown when authId or email is null.

ArgumentException

Thrown when authId or email is 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

cancellationToken CancellationToken

Cancellation 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

cancellationToken CancellationToken

Cancellation 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

cancellationToken CancellationToken

Cancellation token.

Returns

Task<TorBoxResponse>

The API response.

Exceptions

TorBoxException

Thrown when the API returns an error.