Table of Contents

Interface IRelayApiClient

Namespace
TorBoxSDK.Relay
Assembly
TorBoxSDK.dll

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

authId string

The authentication identifier of the user.

torrentId long

The unique identifier of the torrent to check.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<TorBoxResponse<InactiveCheckResult>>

The inactivity check result.

Exceptions

ArgumentNullException

Thrown when authId is null.

ArgumentException

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

cancellationToken CancellationToken

Cancellation token.

Returns

Task<TorBoxResponse<RelayStatus>>

The relay status information.

Exceptions

TorBoxException

Thrown when the API returns an error.