You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.com/nullpointerw/go-qbittorrent-apiv2

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/nullpointerw/go-qbittorrent-apiv2

v0.0.17
Source
Go
Version published
Created
Source

go-qbittorrent-apiv2

Description

qBittorrent web API(v2.8.3) wrapper for go

Requires qBittorrent version ≥ v4.1.

Some of the code is reused from this repository superturkey650/go-qbittorrent.

TODO

At present, the API for RSS has been fully wrapped, as well as partially wrapping the API for torrent and sync. Welcome to submit PR to wrap all APIs.

Installation

go get in your module.

$ go get github.com/NullpointerW/go-qbittorrent-apiv2

Usage

import (
	qbt "github.com/NullpointerW/go-qbittorrent-apiv2"
)

func main() {
	// When connecting to qBittorrent on the local network and
	// 'Bypass from localhost' setting is active.
	// The parameters after 'host' can be ignored.
	// e.g.:NewCli("http://localhost:8991")
	cli, err := qbt.NewCli("http://localhost:8991", "admin", "123456")
	if err != nil {
		fmt.Printf("%+v\n", err)
	}
	torrnet, err := cli.TorrentList(optional{
		"filter": "downloading",
	})
	if err != nil {
		fmt.Printf("%+v\n", err)
	}
	torrnetProp, err := cli.GetTorrentProperties(torrnet[0].Hash)
	if err != nil {
		fmt.Printf("%+v\n", err)
	}
	fmt.Println(torrnetProp.SavePath)
	m, err := cli.LsAutoDLRule()
	if err != nil {
		fmt.Printf("%+v\n", err)
	}
	fmt.Println(m)
}

FAQs

Package last updated on 24 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts