Constructors
constructor
new Deluge( options?: Partial < TorrentSettings > ) : Deluge
Parameters
Default value options: Partial < TorrentSettings > = {}
Properties
Private Optional _cookie
_cookie: Cookie
Private _msgId
_msgId: number = 0
config
config: TorrentSettings
Methods
Private _normalizeTorrentData
_normalizeTorrentData( id: string , torrent: Torrent ) : NormalizedTorrent
Parameters
Returns NormalizedTorrent
Private _validateAuth
_validateAuth( ) : Promise < void >
checkSession
checkSession( ) : Promise < boolean >
Returns Promise < boolean >
true if valid
connect
connect( selectedHost?: undefined | string , hostIdx?: number ) : Promise < ListMethods >
Parameters
Optional selectedHost: undefined | string
Default value hostIdx: number = 0
connected
connected( ) : Promise < boolean >
disconnect
disconnect( ) : Promise < boolean >
getAllData
getAllData( ) : Promise < AllClientData >
Returns Promise < AllClientData >
getPluginInfo
getPluginInfo( plugins: string [] ) : Promise < PluginInfo >
getTorrent
getTorrent( id: string ) : Promise < NormalizedTorrent >
Parameters
Returns Promise < NormalizedTorrent >
getTorrentStatus
getTorrentStatus( torrentId: string , additionalFields?: string [] ) : Promise < TorrentStatus >
Parameters
torrentId: string
Default value additionalFields: string [] = []
listMethods
Parameters
Default value auth: boolean = true
a list of method names
listTorrents
Parameters
Default value additionalFields: string [] = []
Default value filter: {} = {}
login
login( ) : Promise < boolean >
Returns Promise < boolean >
true if success
logout
logout( ) : Promise < boolean >
Returns Promise < boolean >
true if success
normalizedAddTorrent
normalizedAddTorrent( torrent: string | Buffer , options?: Partial < NormalizedAddTorrentOptions > ) : Promise < NormalizedTorrent >
Parameters
torrent: string | Buffer
Default value options: Partial < NormalizedAddTorrentOptions > = {}
Returns Promise < NormalizedTorrent >
removeTorrent
removeTorrent( torrentId: string , removeData?: boolean ) : Promise < BooleanStatus >
Parameters
torrentId: string
Default value removeData: boolean = true
request
request<T>( method: string , params?: any [] , needsAuth?: boolean , autoConnect?: boolean ) : Promise < Response < T > >
Type parameters
Parameters
method: string
Default value params: any [] = []
Default value needsAuth: boolean = true
Default value autoConnect: boolean = true
Returns Promise < Response < T > >
setTorrentLabel
setTorrentLabel( torrentId: string , label: string ) : Promise < DefaultResponse >
Parameters
torrentId: string
label: string
setTorrentTrackers
Parameters
torrentId: string
Default value trackers: Tracker [] = []
Legend
Constructor
Property
Method
Private property
Private method
Checks current session is valid