transmission-rpc-client
Version:
Transmission client for V3. More info in Git Repo
41 lines (40 loc) • 1.7 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReannounceTorrentRequest = exports.VerifyTorrentRequest = exports.StartNowTorrentRequest = exports.StopTorrentRequest = exports.StartTorrentRequest = void 0;
const AbstractRequest_1 = require("../AbstractRequest");
const TorrentMethods_1 = require("./TorrentMethods");
class ActionRequest extends AbstractRequest_1.AbstractRequest {
constructor(args, method, tag) {
super(args, method, tag);
}
}
class StartTorrentRequest extends ActionRequest {
static of(args, tag) {
return new StartTorrentRequest(args, TorrentMethods_1.TorrentMethods.TORRENT_START, tag);
}
}
exports.StartTorrentRequest = StartTorrentRequest;
class StopTorrentRequest extends ActionRequest {
static of(args, tag) {
return new StartTorrentRequest(args, TorrentMethods_1.TorrentMethods.TORRENT_STOP, tag);
}
}
exports.StopTorrentRequest = StopTorrentRequest;
class StartNowTorrentRequest extends ActionRequest {
static of(args, tag) {
return new StartTorrentRequest(args, TorrentMethods_1.TorrentMethods.TORRENT_START_NOW, tag);
}
}
exports.StartNowTorrentRequest = StartNowTorrentRequest;
class VerifyTorrentRequest extends ActionRequest {
static of(args, tag) {
return new StartTorrentRequest(args, TorrentMethods_1.TorrentMethods.TORRENT_VERIFY, tag);
}
}
exports.VerifyTorrentRequest = VerifyTorrentRequest;
class ReannounceTorrentRequest extends ActionRequest {
static of(args, tag) {
return new StartTorrentRequest(args, TorrentMethods_1.TorrentMethods.TORRENT_REANNOUNCE, tag);
}
}
exports.ReannounceTorrentRequest = ReannounceTorrentRequest;