Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Utorrent

Hierarchy

  • Utorrent

Implements

  • TorrentClient

Index

Constructors

constructor

  • new Utorrent(options?: Partial<TorrentSettings>): Utorrent
  • Parameters

    • options: Partial<TorrentSettings> = {}

    Returns Utorrent

Properties

config

config: TorrentSettings

Methods

addTorrent

  • addTorrent(torrent: string | Buffer): Promise<BaseResponse>
  • Parameters

    • torrent: string | Buffer

    Returns Promise<BaseResponse>

connect

  • connect(): Promise<void>
  • Returns Promise<void>

forceStartTorrent

  • forceStartTorrent(hash: string): Promise<BaseResponse>
  • Parameters

    • hash: string

    Returns Promise<BaseResponse>

getAllData

  • getAllData(): Promise<AllClientData>
  • Returns Promise<AllClientData>

getSettings

  • getSettings(): Promise<SettingsResponse>
  • Returns Promise<SettingsResponse>

getTorrent

  • getTorrent(id: string): Promise<NormalizedTorrent>
  • Parameters

    • id: string

    Returns Promise<NormalizedTorrent>

getVersion

  • getVersion(): Promise<VersionResponse>
  • Returns Promise<VersionResponse>

listTorrents

  • listTorrents(): Promise<TorrentListResponse>
  • Returns Promise<TorrentListResponse>

normalizedAddTorrent

  • normalizedAddTorrent(torrent: string | Buffer, options?: Partial<AddTorrentOptions>): Promise<NormalizedTorrent>
  • Parameters

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

    Returns Promise<NormalizedTorrent>

pauseTorrent

  • pauseTorrent(hash: string): Promise<BaseResponse>
  • Parameters

    • hash: string

    Returns Promise<BaseResponse>

queueBottom

  • queueBottom(hash: string): Promise<BaseResponse>
  • Parameters

    • hash: string

    Returns Promise<BaseResponse>

queueDown

  • queueDown(hash: string): Promise<BaseResponse>
  • Parameters

    • hash: string

    Returns Promise<BaseResponse>

queueTop

  • queueTop(hash: string): Promise<BaseResponse>
  • Parameters

    • hash: string

    Returns Promise<BaseResponse>

queueUp

  • queueUp(hash: string): Promise<BaseResponse>
  • Parameters

    • hash: string

    Returns Promise<BaseResponse>

removeTorrent

  • removeTorrent(hash: string, removeData?: boolean): Promise<BaseResponse>
  • Parameters

    • hash: string
    • removeData: boolean = true

    Returns Promise<BaseResponse>

request

  • request<T>(action: string, params?: URLSearchParams): Promise<Response<T>>
  • Type parameters

    • T: object

    Parameters

    • action: string
    • params: URLSearchParams = ...

    Returns Promise<Response<T>>

resetSession

  • resetSession(): void
  • Returns void

resumeTorrent

  • resumeTorrent(hash: string): Promise<BaseResponse>
  • alias of unpause, resumes a torrent

    Parameters

    • hash: string

    Returns Promise<BaseResponse>

rssRemove

  • rssRemove(id: number): Promise<BaseResponse>
  • Parameters

    • id: number

    Returns Promise<BaseResponse>

rssUpdate

  • rssUpdate(url: string, id?: number, alias?: string, subscribe?: boolean, smartFilter?: boolean, enabled?: boolean): Promise<RssUpdateResponse>
  • subscribe to rss feed

    Parameters

    • url: string

      feed url

    • id: number = -1

      of rss feed to update, -1 for new feed

    • alias: string = ''
    • subscribe: boolean = false
    • smartFilter: boolean = false
    • enabled: boolean = true

    Returns Promise<RssUpdateResponse>

setProps

  • setProps(hash: string, props: Record<string, string | number>): Promise<BaseResponse>
  • Parameters

    • hash: string
    • props: Record<string, string | number>

    Returns Promise<BaseResponse>

setSetting

  • setSetting(settings: [string, string | number][]): Promise<BaseResponse>
  • set a setting

    Parameters

    • settings: [string, string | number][]

      settings to set [setting_name, value] as array of key value tuples

    Returns Promise<BaseResponse>

stopTorrent

  • stopTorrent(hash: string): Promise<BaseResponse>
  • Parameters

    • hash: string

    Returns Promise<BaseResponse>

unpause

  • unpause(hash: string): Promise<BaseResponse>
  • Parameters

    • hash: string

    Returns Promise<BaseResponse>