A comprehensive Go client for interacting with the qBittorrent Web API. This library provides a simple and efficient way to manage your qBittorrent instance programmatically, supporting all major API endpoints.
Features
Full API Coverage: Supports all qBittorrent Web API endpoints, including torrent management, application preferences, RSS, and search.
Easy to Use: Simple and intuitive API design for seamless integration into your Go projects.
Authentication: Handles login and session management automatically.
Error Handling: Robust error handling and status code checking for reliable operation.
Extensible: Easily extendable to support future qBittorrent API updates.
Installation
To install the package, use go get:
go get github.com/guchengod/qbittorrent-api-go
Quick Start
Here's a quick example to get you started:
package main
import (
"fmt""github.com/guchengod/qbittorrent-api-go/qbittorrent"
)
funcmain() {
client := qbittorrent.NewDefaultClient("http://localhost:8080")
err := client.Login("admin", "adminadmin")
if err != nil {
fmt.Println("Login failed:", err)
return
}
defer client.Logout()
version, err := client.GetApplicationVersion()
if err != nil {
fmt.Println("Failed to get application version:", err)
return
}
fmt.Println("Application version:", version)
}
Supported Endpoints
Authentication: Login, Logout
Application: Get version, Shutdown, Get/set preferences
Contributions are welcome! If you'd like to contribute, please follow these steps:
Fork the repository.
Create a new branch for your feature or bugfix.
Commit your changes and push to your fork.
Submit a pull request with a detailed description of your changes.
Star History
License
This project is licensed under the MIT License. See the LICENSE file for details.
FAQs
Unknown package
Package last updated on 27 Dec 2024
Did you know?
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.
TC39 advances 9 JavaScript proposals, including Array.fromAsync, Error.isError, and Explicit Resource Management, which are now headed into the ECMAScript spec.