Table of Contents

Interface IGeneralClient

Namespace
TorBoxSDK.Main.General
Assembly
TorBoxSDK.dll

Defines general operations for the TorBox API root, including status, statistics, and speedtest endpoints.

public interface IGeneralClient

Methods

Get30DayStatsAsync(CancellationToken)

Retrieves TorBox service statistics for the last 30 days.

Task<TorBoxResponse<IReadOnlyList<DailyStats>>> Get30DayStatsAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Cancellation token.

Returns

Task<TorBoxResponse<IReadOnlyList<DailyStats>>>

A list of daily statistics snapshots.

Exceptions

TorBoxException

Thrown when the API returns an error.

GetChangelogsJsonAsync(CancellationToken)

Gets the changelogs as structured JSON data.

Task<TorBoxResponse<IReadOnlyList<Changelog>>> GetChangelogsJsonAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Cancellation token.

Returns

Task<TorBoxResponse<IReadOnlyList<Changelog>>>

A list of changelog entries.

Exceptions

TorBoxException

Thrown when the API returns an error.

GetChangelogsRssAsync(CancellationToken)

Gets the changelogs as an RSS 2.0 feed.

Task<TorBoxResponse<ChangelogsRssFeed>> GetChangelogsRssAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Cancellation token.

Returns

Task<TorBoxResponse<ChangelogsRssFeed>>

The parsed RSS feed with channel metadata and changelog items.

Exceptions

TorBoxException

Thrown when the API returns an error.

GetSpeedtestFilesAsync(SpeedtestOptions?, CancellationToken)

Retrieves speedtest server URLs for connection testing.

Task<TorBoxResponse<IReadOnlyList<SpeedtestServer>>> GetSpeedtestFilesAsync(SpeedtestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

options SpeedtestOptions

Optional speedtest parameters, or null for defaults.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<TorBoxResponse<IReadOnlyList<SpeedtestServer>>>

A list of speedtest servers.

Exceptions

TorBoxException

Thrown when the API returns an error.

GetStatsAsync(CancellationToken)

Retrieves aggregate TorBox service statistics.

Task<TorBoxResponse<Stats>> GetStatsAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Cancellation token.

Returns

Task<TorBoxResponse<Stats>>

The current statistics.

Exceptions

TorBoxException

Thrown when the API returns an error.

GetUpStatusAsync(CancellationToken)

Retrieves the API root status.

Task<TorBoxResponse<UpStatus>> GetUpStatusAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Cancellation token.

Returns

Task<TorBoxResponse<UpStatus>>

The API status data.

Exceptions

TorBoxException

Thrown when the API returns an error.