ktorfs/transmission-rpc

PHP 100% object-oriented Transmission RPC client. This library gives you code-completion for all requests and responses available from the Transmission daemon.

Maintainers

Package info

github.com/kristoftorfs/transmission

pkg:composer/ktorfs/transmission-rpc

Statistics

Installs: 63

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.2 2015-04-24 12:25 UTC

This package is auto-updated.

Last update: 2026-03-07 05:32:49 UTC


README

A 100% OOP RPC client for Transmission. This library gives you code-completion for all requests and responses available from the Transmission daemon.

The plan is to keep this in sync at all times with Transmission RPC specs. Should you notice I'm behind on the specs, please notify me by opening a new issue.

Installation

Installation is done through composer.

Usage example

use \Transmission\Transmission;
use \Transmission\Requests;
use \Transmission\Responses;

try {
    $tr = new Transmission();
    $request = new Requests\TorrentGet();
    $request->fields = array(Requests\TorrentGet::eta, Requests\TorrentGet::name, Requests\TorrentGet::percentDone);
    #$request->includeAll();
    $response = $tr->torrentGet($request);
    foreach($response->torrents as $torrent) {
        printf('%s: %d%% done, %d seconds left<br>', $torrent->name, $torrent->percentDone * 100, $torrent->eta);
    }
} catch (Exception $e) {
    printf('Error %d - %s', $e->getCode(), $e->getMessage());
}