Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

silvelo/node-transmission-typescript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-transmission-typescript

This package is a wrapper of node-transmission but writing in Typescript.

Install

npm install node-transmission-typescript

How to user

import {Transmission, SettingsConfig} from node-transmission-typescript';

Module

The module contains two class

SettingsConfig

To create the configuration for transmission.

new SettingsConfig(settings);

If dont pass arguments, create a default configuration. The configuration is an object with:

host: string;
port: number;
username: string;
password: string;
ssl: boolean;
url: string;

Transmission

To create a new conection with transmission. The param is the configuration created above.

new Transmission(settings);

All functions returns a promise, so you can use async/await to improve the code and all functions have a typed return.

Methods

property: status : IStatus

waitForState(id: number, state: string): Promise

remove(ids: number[], del?: boolean): Promise;

active(): Promise;

stop(ids: number[]): Promise;

start(ids: number[]): Promise;

startNow(ids: number[]): Promise;

verify(ids: number[]): Promise<{}>;

reannounce(ids: number[]): Promise<{}>;

session(session?: ISession): Promise<{}>;

sessionStats(): Promise;

freeSpace(path: string): Promise;

get(ids?: number[]): Promise<ITorrent[]>;

addUrl(url: string, options?: IAddOptions): Promise;

addFile(path: string, options?: IAddOptions): Promise;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published