go-qbit is a lightweight and easy-to-use Go client library for interacting with the qBittorrent Web API. It provides a simple interface to manage torrents, preferences, and more.
- Full API Coverage: Supports all major features of the qBittorrent Web API.
- Simple and Intuitive: Clean API design for easy integration into your projects.
To install go-qbit, use the following command:
go get github.com/chx9/go-qbit
package main
import (
"fmt"
"log"
"github.com/chx9/go-qbit/qbit"
)
func main() {
// Create a new client
client := qbit.NewClient("http://localhost:8080")
// Log in to qBittorrent
err := client.Login("admin", "adminadmin")
if err != nil {
log.Fatal(err)
}
torrents, err := client.List(opts, nil)
if err != nil {
log.Fatal(err)
}
// Print torrent hashes
for _, torrent := range torrents {
fmt.Println(torrent.Hash)
}
}