qbittorrent-api-client
TypeScript icon, indicating that this package has built-in type declarations

0.5.1 • Public • Published

qBittorrent API client

This library provides a fully typed API client for qBittorrent.

⚠️ This library is still in development and may be unstable. Breaking changes may occur at any time.

Pre-requisites

Web-UI must be enabled in qBittorrent to be able to use the api with this library.

Installation

NPM

npm install qbittorrent-api-client

Yarn

yarn add qbittorrent-api-client

Example

import QBittorrentClient from 'qbittorrent-api-client'

const qBittorrentClient = new QBittorrentClient({ baseUrl: 'http://localhost:8080' });

// This will save the session cookie in the client
await qBittorrentClient.authenticate('user', 'password')

// Get all torrents
const [firstTorrent] = await qBittorrentClient.getTorrentInfos()

// Get torrent properties
const { seeds, peers } = await qBittorrentClient.getTorrentProperties(firstTorrent.hash)

console.log(`Torrent "${ firstTorrent.name }" has ${ seeds } seeds and ${ peers } peers`)
// Torrent "Ubuntu 20.04.1 LTS" has 1 seeds and 0 peers

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.5.1
    76
    • latest

Version History

Package Sidebar

Install

npm i qbittorrent-api-client

Weekly Downloads

85

Version

0.5.1

License

ISC

Unpacked Size

117 kB

Total Files

8

Last publish

Collaborators

  • super-bunny