🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

github.com/guchengod/go-qbittorrent-api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/guchengod/go-qbittorrent-api

v0.0.0-20241227100236-4185424e283e
Source
Go
Version published
Created
Source

qBittorrent API Client in Go

Go Version License

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"
)

func main() {
	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
  • Torrent Management: Add, pause, resume, delete, recheck, reannounce torrents
  • RSS: Add feeds, manage items, set auto-downloading rules
  • Search: Start, stop, and manage searches
  • Sync: Get main data, torrent peers data
  • Transfer Info: Get global transfer info, set speed limits
  • Logs: Get main log, peer log

Documentation

For detailed documentation, refer to the qBittorrent Web API Documentation.

Contributing

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

Star History Chart

License

This project is licensed under the MIT License. See the LICENSE file for details.

FAQs

Package last updated on 27 Dec 2024

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