npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

qbittorrent-api-v2

v1.2.2

Published

Wrapper around qBittorrent's Web API v2 to manage your torrents from Node. Documented and everything.

Downloads

141

Readme

Description

Wrapper around qBittorrent's Web API v2 to manage your torrents from Node. Documented and everything.

The Web API v2 applies for version 4.1+ of qBittorrent, for qBittorrent v3.2.0-v4.0.4 check the qbittorrent-api package.

Installation

npm install qbittorrent-api-v2

Example

const api = require('qbittorrent-api-v2')

api.connect('http://localhost:8080', 'admin', 'your_password')
	.then(qbt => {
		qbt.torrents()
			.then(torrents => {
				console.log(torrents)
			})
			.catch(err => {
				console.error(err)
			})
	})
	.catch(err => {
		console.error(err)
	})

Documentation

The module is fully self-documented so you will find all info in the code.

See qBittorrent's API documentation for more info.

Overview

Authentication

connect(host, user, password)

This method returns a Promise resolving an object allowing to call the other methods of the API.

Application

Get application version

appVersion()

Get API version

apiVersion()

Get build info

buildInfo()

Shutdown application

shutdown()

Get application preferences

preferences()

Set application preferences

TODO

Get default save path

defaultSavePath()

Log

Get log

log(normal, info, warning, critical, lastKnownId)

Get peer log

peerLog(lastKnownId)

Sync

Get main data

syncMainData(rid)

Get torrent peers data

syncPeersData(hash, rid)

Transfer info

Get global transfer info

transferInfo()

Get alternative speed limits state

speedLimitsMode()

Toggle alternative speed limits

toggleSpeedLimitsMode()

Get global download limit

globalDownloadLimit()

Set global download limit

setGlobalDownloadLimit(limit)

Get global upload limit

globalUploadLimit()

Set global upload limit

setGlobalUploadLimit(limit)

Ban peers

banPeers(peers)

Torrent management

Get torrent list

torrents([filter], [category], [sort], [reverse], [limit], [offset], [hashes])

Get torrent generic properties

properties(hash)

Get torrent trackers

trackers(hash)

Get torrent web seeds

webseeds(hash)

Get torrent contents

files(hash)

Get torrent pieces' states

pieceStates(hash)

Get torrent pieces' hashes

pieceHashes(hash)

Pause torrents

pauseTorrents(hashes)

Resume torrents

resumeTorrents(hashes)

Delete torrents

deleteTorrents(hashes)

Recheck torrents

recheckTorrents(hashes)

Reannounce torrents

reannounceTorrents(hashes)

Edit trackers

editTrackers(hash, origUrl, newUrl)

Remove trackers

removeTrackers(hash, urls)

Add peers

addPeers(hashes, peers)

Add new torrent

TODO

Add trackers to torrent

addTrackers(hash, urls)

Increase torrent priority

increasePriority(hashes)

Decrease torrent priority

decreasePriority(hashes)

Maximal torrent priority

maxPriority(hashes)

Minimal torrent priority

minPriority(hashes)

Set file priority

setFilePriority(hash, id, priority)

Get torrent download limit

downloadLimit(hashes)

Set torrent download limit

setDownloadLimit(hashes, limit)

Set torrent share limit

setShareLimit(hashes, ratioLimit, seedingTimeLimit)

Get torrent upload limit

uploadLimit(hashes)

Set torrent upload limit

setUploadLimit(hashes, limit)

Set torrent location

setLocation(hashes, location)

Set torrent name

rename(hash, name)

Set torrent category

setCategory(hash, category)

Get all categories

categories()

Add new category

createCategory(category, savePath)

Edit category

editCategory(category, savePath)

Remove categories

removeCategories(categories)

Add torrent tags

addTags(hashes, tags)

Remove torrent tags

removeTags(hashes, tags)

Get all tags

tags()

Create tags

createTags(tags)

Delete tags

deleteTags(tags)

Set automatic torrent management

setAutoManagement(hashes, enable)

Toggle sequential download

toggleSequentialDownload(hashes)

Set first/last piece priority

toggleFirstLastPiecePrio(hashes)

Set force start

setForceStart(hashes, value)

Set super seeding

setSuperSeeding(hashes, value)

Rename file

renameFile(hash, id, name)

Search

Start search

startSearch(pattern, plugins, category)

Stop search

stopSearch(id)

Get search status

searchStatus([id])

Get search results

searchResults(id, [limit], [offset])

Delete search

deleteSearch(id)

Get search categories

searchCategories([pluginName])

Get search plugins

searchPlugins()

Install search plugin

installPlugin(sources)

Uninstall search plugin

uninstallPlugin(names)

Enable search plugin

enablePlugin(names, enable)

Update search plugins

updatePlugins()