@ctrl/rtorrent
    Preparing search index...

    Interface RTorrentClient

    rTorrent client interface

    interface RTorrentClient {
        config: TorrentClientConfig;
        state: TorrentClientState;
        addTorrent(
            torrent: string | Uint8Array<ArrayBufferLike>,
            options?: any,
        ): Promise<unknown>;
        addTorrentFromFile(
            fileContent: Uint8Array,
            options?: AddTorrentFileOptions,
        ): Promise<boolean>;
        addTorrentFromUrl(
            url: string,
            options?: AddTorrentUrlOptions,
        ): Promise<boolean>;
        addTorrentToView(hash: string, view: string): Promise<boolean>;
        exportState(): TorrentClientState;
        getAllData(): Promise<AllClientData>;
        getAllTorrents(): Promise<RTorrentTorrent[]>;
        getDownloadRateLimit(hash: string): Promise<number>;
        getSystemInfo(): Promise<RTorrentSystemInfo>;
        getTorrent(id: any): Promise<NormalizedTorrent>;
        getTorrentFiles(hash: string): Promise<RTorrentFile[]>;
        getTorrentPeers(hash: string): Promise<RTorrentPeer[]>;
        getTorrentProperties(hash: string): Promise<Partial<RTorrentTorrent>>;
        getTorrentRaw(hash: string): Promise<RTorrentTorrent | null>;
        getTorrentTrackers(hash: string): Promise<RTorrentTracker[]>;
        getUploadRateLimit(hash: string): Promise<number>;
        getVersion(): Promise<string>;
        getViews(): Promise<RTorrentView[]>;
        hasTorrent(hash: string): Promise<boolean>;
        normalizedAddTorrent(
            torrent: string | Uint8Array<ArrayBuffer>,
            options?: Partial<AddTorrentOptions>,
        ): Promise<NormalizedTorrent>;
        pauseTorrent(id: any): Promise<unknown>;
        queueDown(id: any): Promise<unknown>;
        queueUp(id: any): Promise<unknown>;
        removeTorrent(hash: string): Promise<boolean>;
        removeTorrentFromView(hash: string, view: string): Promise<boolean>;
        resumeTorrent(id: any): Promise<unknown>;
        setDownloadRateLimit(hash: string, rate: number): Promise<boolean>;
        setTorrentLabel(hash: string, label: string): Promise<boolean>;
        setTorrentPriority(
            hash: string,
            priority: RTorrentPriority,
        ): Promise<boolean>;
        setUploadRateLimit(hash: string, rate: number): Promise<boolean>;
        startTorrent(hash: string): Promise<boolean>;
        stopTorrent(hash: string): Promise<boolean>;
    }

    Hierarchy

    • TorrentClient
      • RTorrentClient
    Index

    Properties

    config: TorrentClientConfig
    state: TorrentClientState

    Methods

    • Parameters

      • torrent: string | Uint8Array<ArrayBufferLike>
      • Optionaloptions: any

      Returns Promise<unknown>

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

      Returns TorrentClientState

    • Returns all torrent data. Data has been normalized

      Returns Promise<AllClientData>

    • Parameters

      • id: any

      Returns Promise<NormalizedTorrent>

    • Parameters

      • torrent: string | Uint8Array<ArrayBuffer>
      • Optionaloptions: Partial<AddTorrentOptions>

      Returns Promise<NormalizedTorrent>

    • Parameters

      • id: any

      Returns Promise<unknown>

    • Parameters

      • id: any

      Returns Promise<unknown>

    • Parameters

      • id: any

      Returns Promise<unknown>

    • Parameters

      • id: any

      Returns Promise<unknown>