Transmission.API.RPC 4.0.0

dotnet add package Transmission.API.RPC --version 4.0.0
                    
NuGet\Install-Package Transmission.API.RPC -Version 4.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Transmission.API.RPC" Version="4.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Transmission.API.RPC" Version="4.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Transmission.API.RPC" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Transmission.API.RPC --version 4.0.0
                    
#r "nuget: Transmission.API.RPC, 4.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Transmission.API.RPC@4.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Transmission.API.RPC&version=4.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Transmission.API.RPC&version=4.0.0
                    
Install as a Cake Tool

Transmission.API.RPC

C# async client library for the Transmission RPC API. Targets .NET 10.0.

Full documentation and source code: https://github.com/Beatlegger/Transmission.API.RPC

Supported RPC methods

All methods are implemented. See the GitHub README for the full feature matrix.

Quick start

using Transmission.API.RPC;
using Transmission.API.RPC.Entity;
using Transmission.API.RPC.Arguments;

// URL format: "schema://host:port/transmission/rpc"
// e.g. "https://example.com:9091/transmission/rpc"
var client = new Client(
    "URL",
    sessionID: "PARAM_SESSION_ID",
    login: "PARAM_LOGIN",
    password: "PARAM_PASS");

// All methods are async
var sessionInfo = await client.GetSessionInformationAsync();
var allTorrents = await client.TorrentGetAsync(TorrentFields.ALL_FIELDS);

Adding torrents

// From a .torrent file
var fileBytes = File.ReadAllBytes("path/to/file.torrent");
var torrent = new NewTorrent
{
    Metainfo = Convert.ToBase64String(fileBytes),
    Paused = true
};
var added = await client.TorrentAddAsync(torrent);

// From a magnet link
var magnetTorrent = new NewTorrent
{
    Filename = "magnet:?xt=urn:btih:..."
};
var magnetAdded = await client.TorrentAddAsync(magnetTorrent);

Managing torrents

await client.TorrentStartAsync(new object[] { added.ID });
await client.TorrentStopAsync(new object[] { added.ID });
await client.TorrentRemoveAsync(new int[] { added.ID }, deleteData: false);

Custom HttpClient

var httpClient = new HttpClient();
var client = new Client("URL", httpClient, login: "PARAM_LOGIN", password: "PARAM_PASS");

License

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.0 210 4/15/2026
2.1.2 6,843 5/20/2020
2.1.1 1,277 5/20/2020
2.1.0 1,580 12/6/2019
2.0.0 3,000 1/18/2018
1.2.0 2,240 9/9/2017
1.1.0 2,255 5/7/2017
1.0.0 2,003 3/5/2017