Table of Contents

Class TorrentInfoRequest

Namespace
TorBoxSDK.Models.Torrents
Assembly
TorBoxSDK.dll

Represents a request to retrieve torrent metadata from a torrent file, magnet URI, or info hash via the POST endpoint.

public sealed record TorrentInfoRequest : IEquatable<TorrentInfoRequest>
Inheritance
TorrentInfoRequest
Implements
Inherited Members

Remarks

The File and FileName properties are excluded from JSON serialization because this request is sent as multipart form data.

Properties

File

Gets the raw torrent file bytes, or null if a magnet URI or hash is provided instead.

[JsonIgnore]
public byte[]? File { get; init; }

Property Value

byte[]

Remarks

This property is excluded from JSON serialization and is handled separately as a file upload in multipart form data requests.

FileName

Gets the file name to use when uploading the torrent file, or null to use the default name.

[JsonIgnore]
public string? FileName { get; init; }

Property Value

string

Remarks

This property is excluded from JSON serialization and is only used as the filename parameter in multipart form data requests.

Hash

Gets the info hash to retrieve torrent metadata from, or null if a file or magnet URI is provided instead.

[JsonPropertyName("hash")]
public string? Hash { get; init; }

Property Value

string

Magnet

Gets the magnet URI to retrieve torrent metadata from, or null if a file or hash is provided instead.

[JsonPropertyName("magnet")]
public string? Magnet { get; init; }

Property Value

string

PeersOnly

Gets a value indicating whether to return only peer information, or null to use the default behavior.

[JsonPropertyName("peers_only")]
public bool? PeersOnly { get; init; }

Property Value

bool?

Timeout

Gets the timeout in seconds for metadata retrieval, or null to use the default timeout.

[JsonPropertyName("timeout")]
public int? Timeout { get; init; }

Property Value

int?

UseCacheLookup

Gets a value indicating whether to use cache lookup for the torrent info, or null to use the default behavior.

[JsonPropertyName("use_cache_lookup")]
public bool? UseCacheLookup { get; init; }

Property Value

bool?