Interface IGeneralClient
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
cancellationTokenCancellationTokenCancellation 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
cancellationTokenCancellationTokenCancellation 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
cancellationTokenCancellationTokenCancellation 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
optionsSpeedtestOptionsOptional speedtest parameters, or null for defaults.
cancellationTokenCancellationTokenCancellation 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
cancellationTokenCancellationTokenCancellation 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
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<TorBoxResponse<UpStatus>>
The API status data.
Exceptions
- TorBoxException
Thrown when the API returns an error.