Implements

  • TorrentClient

Constructors

  • Parameters

    • options: Partial<TorrentClientConfig> = {}

    Returns Transmission

Properties

config: TorrentClientConfig
state: TransmissionState = {}

Methods

  • Parameters

    • config: Readonly<TorrentClientConfig>
    • state: Readonly<
          JsonifyObject<
              { version?: Record<string, unknown>; auth?: { sessionId: string } },
          >,
      >

    Returns Transmission

  • Export the current state of the client. Can be restored with createFromState.

    Returns JsonifyObject<
        { version?: Record<string, unknown>; auth?: { sessionId: string } },
    >

  • note: This is the same "torrent-add" action with different options, less confusing to add it as its own method

    Parameters

    Returns Promise<AddTorrentResponse>

  • Adding a torrent

    Parameters

    • torrent: string | Uint8Array<ArrayBufferLike>

      a stream of file content or contents of the file as base64 string

    • options: Partial<AddTorrentOptions> = {}

    Returns Promise<AddTorrentResponse>

  • Parameters

    • torrent: string | Uint8Array<ArrayBufferLike>
    • options: Partial<AddTorrentOptions> = {}

    Returns Promise<NormalizedTorrent>

  • Parameters

    Returns Promise<NormalizedTorrent>

  • Returns all torrent data. Data has been normalized

    Returns Promise<AllClientData>

  • Type Parameters

    • T

    Parameters

    • method: string
    • args: any = {}

    Returns Promise<Promise<FetchResponse<T>>>