Interface IRelayApiClient
Defines the Relay API client for relay-based operations through the TorBox Relay API.
public interface IRelayApiClient
Methods
CheckForInactiveAsync(string, long, CancellationToken)
Checks whether a torrent is inactive on the relay.
Task<TorBoxResponse<InactiveCheckResult>> CheckForInactiveAsync(string authId, long torrentId, CancellationToken cancellationToken = default)
Parameters
authIdstringThe authentication identifier of the user.
torrentIdlongThe unique identifier of the torrent to check.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<TorBoxResponse<InactiveCheckResult>>
The inactivity check result.
Exceptions
- ArgumentNullException
Thrown when
authIdis null.- ArgumentException
Thrown when
authIdis empty.- TorBoxException
Thrown when the API returns an error.
GetStatusAsync(CancellationToken)
Retrieves the current status of the TorBox relay service.
Task<TorBoxResponse<RelayStatus>> GetStatusAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<TorBoxResponse<RelayStatus>>
The relay status information.
Exceptions
- TorBoxException
Thrown when the API returns an error.