Skip to content

TorBox-App/torbox-sdk-dotnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Table of Contents

Setup & Configuration

Supported Language Versions

This SDK is compatible with the following versions: C# >= .NET 6

Installation

To get started with the SDK, we recommend installing using nuget:

dotnet add package TorboxApi

Authentication

Access Token Authentication

The TorboxApi API uses an Access Token for authentication.

This token must be provided to authenticate your requests to the API.

Setting the Access Token

When you initialize the SDK, you can set the access token as follows:

using TorboxApi;
using TorboxApi.Config;

var config = new TorboxApiConfig()
{
	AccessToken = "YOUR_ACCESS_TOKEN"
};

var client = new TorboxApiClient(config);

If you need to set or update the access token after initializing the SDK, you can use:

client.SetAccessToken("YOUR_ACCESS_TOKEN")

Sample Usage

Below is a comprehensive example demonstrating how to authenticate and call a simple endpoint:

using TorboxApi;
using TorboxApi.Config;
using Environment = TorboxApi.Http.Environment;

var config = new TorboxApiConfig
{
  Environment = Environment.Default,
  AccessToken = "YOUR_ACCESS_TOKEN"
};

var client = new TorboxApiClient(config);

var response = await client.General.GetUpStatusAsync();

Console.WriteLine(response);

Services

The SDK provides various services to interact with the API.

Below is a list of all available services with links to their detailed documentation:
Name
TorrentsService
UsenetService
WebDownloadsDebridService
GeneralService
NotificationsService
UserService
RssFeedsService
IntegrationsService
QueuedService

Models

The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.

Below is a list of all available models with links to their detailed documentation:
Name Description
CreateTorrentRequest
CreateTorrentOkResponse
ControlTorrentOkResponse
RequestDownloadLinkOkResponse
GetTorrentListOkResponse
GetTorrentCachedAvailabilityOkResponse
ExportTorrentDataOkResponse
GetTorrentInfoOkResponse
GetTorrentInfo1Request
GetTorrentInfo1OkResponse
CreateUsenetDownloadRequest
CreateUsenetDownloadOkResponse
GetUsenetListOkResponse
CreateWebDownloadRequest
CreateWebDownloadOkResponse
GetWebDownloadListOkResponse
GetHosterListOkResponse
GetUpStatusOkResponse
GetStatsOkResponse
GetChangelogsJsonOkResponse
GetNotificationFeedOkResponse
GetUserDataOkResponse
AddReferralToAccountOkResponse
GetAllJobsOkResponse
GetAllJobsByHashOkResponse
CreateTorrentOkResponseData
GetTorrentListOkResponseData
DataFiles1
GetTorrentCachedAvailabilityOkResponseData
GetTorrentInfoOkResponseData
DataFiles2
GetTorrentInfo1OkResponseData
DataFiles3
CreateUsenetDownloadOkResponseData
GetUsenetListOkResponseData
DataFiles4
CreateWebDownloadOkResponseData
GetWebDownloadListOkResponseData
DataFiles5
GetHosterListOkResponseData
GetStatsOkResponseData
GetChangelogsJsonOkResponseData
GetNotificationFeedOkResponseData
GetUserDataOkResponseData
Settings
GetAllJobsOkResponseData
GetAllJobsByHashOkResponseData

License

This SDK is licensed under the MIT License.

See the LICENSE file for more details.