Download the PHP package aldobarr/qbittorrent-php without Composer
On this page you can find all versions of the php package aldobarr/qbittorrent-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aldobarr/qbittorrent-php
More information about aldobarr/qbittorrent-php
Files in aldobarr/qbittorrent-php
Package qbittorrent-php
Short Description An unofficial PHP client for the qbittorrent WebUI API
License GPL-3.0-only
Informations about the package qbittorrent-php
QBittorrent PHP API
A PHP client for the qbittorrent WebUI API
Requirements
- PHP 8.1 or higher
Installation
Please use Composer for the installation. For Composer documentation, please refer to getcomposer.org.
Install the module:
Basic Usage
Basic usage will indicate how to create a new api object with login credentials and make a raw request to the api. All requests using this object will maintain the login state for the life of the object. The raw request method will return a PSR-7 ResponseInterface object. See guzzle documentation.
Usage
The qbittorrent object allows you to create a more specific api wrapper for interacting with the different APIs available. For example the basic usage example above may be rewritten as such:
The application
method will return an Application object which extends the main QBittorrent object and maintains the current login state.
Each child object that implements an api prefix should contain a method that supports each api method under that prefix.
For accessing torrents, you may request a torrent object from the qbt object as such:
This torrent object may then interact with the torrent API. To get a list of all torrents use the torrents
method:
For more information on available API methods, see the main QBittorrent WebUI Api documentation.
Adding a New Torrent
To add a new torrent use the addTorrent
method of the QBittorrent class. This class supports all the parameters documented.
All of the parameters are optional, however if both $urls
and $file_paths
are empty, then the method immediately returns false.
Both $urls
and $file_paths
accept an array of values for adding torrents. The $file_paths
parameter accepts an array
of paths to try and send the binary file data to the qbittorrent api. $file_paths
may also optionally be a key => value pair where the key
is the name to specify for the file.
License
This php API wrapper is open-sourced software licensed under the GNU General Public License version 3.