Table of Contents

Class TorBoxResponse<T>

Namespace
TorBoxSDK.Models.Common
Assembly
TorBoxSDK.dll

Represents a standard TorBox API response with a typed data payload.

public sealed record TorBoxResponse<T> : IEquatable<TorBoxResponse<T>>

Type Parameters

T

The type of the data payload.

Inheritance
TorBoxResponse<T>
Implements
Inherited Members

Remarks

All TorBox API responses share a common envelope with Success, Error, and Detail fields. The Data property contains the deserialized payload of type T.

Properties

Data

Gets the deserialized data payload, or null if the response contained no data.

[JsonPropertyName("data")]
public T? Data { get; init; }

Property Value

T

Detail

Gets additional detail about the response or error, or null if none was provided.

[JsonPropertyName("detail")]
public string? Detail { get; init; }

Property Value

string

Error

Gets the error message returned by the API, or null if no error occurred.

[JsonPropertyName("error")]
public string? Error { get; init; }

Property Value

string

Success

Gets a value indicating whether the API request was successful.

[JsonPropertyName("success")]
public bool Success { get; init; }

Property Value

bool