Transmission class
Transmission object to interact with a remote instance Documentation about the API at https://github.com/transmission/transmission/blob/master/extras/rpc-spec.txt
Constructors
- Transmission({String? baseUrl, String? proxyUrl, bool enableLog = false})
-
Documentation about the API at https://github.com/transmission/transmission/blob/master/extras/rpc-spec.txt
baseUrl
url of the transmission server instance, default to http://localhost:9091/transmission/rpcproxyUrl
url use as a proxy, urls will be added at the end before request, default to nullenableLog
boolean to show http logs or notfactory
Properties
Methods
-
addTorrent(
{String? filename, String? metaInfo, String? downloadDir, String? cookies, bool? paused}) → Future< TorrentLight> -
Add torrent to transmission
filename
optional filename or URL of the .torrent filemetaInfo
optional base64-encoded .torrent contentdownloadDir
optional directory where to download the torrentcookies
optional pointer to a string of one or more cookiespaused
optional boolean to paused the torrent when added ReturnsTorrentLight
light torrent info if added successfully Throws AddTorrentException if errors -
askForMorePeers(
List< int> ids) → Future<void> -
Ask for more peers for torrents by given ids
ids
integer identifier list of the torrents to remove Throws TransmissionException if errors -
dispose(
) → void - close all connexions
-
getRecentlyActive(
{List< String> fields = const ['id', 'name', 'eta', 'queuePosition', 'downloadDir', 'isFinished', 'isStalled', 'leftUntilDone', 'metadataPercentComplete', 'error', 'errorString', 'percentDone', 'totalSize', 'peersConnected', 'sizeWhenDone', 'status', 'rateDownload', 'rateUpload', 'peersGettingFromUs', 'peersSendingToUs']}) → Future<RecentlyActiveTorrent> -
Get recently torrents activity
fields
list of fields to retrieve Returns list ofRecentlyActiveTorrent
that contain removed torrent ids or torrents update info Throws TransmissionException if errors -
getSession(
{List< String> fields = const ['alt-speed-enabled', 'speed-limit-down-enabled', 'speed-limit-up-enabled', 'download-dir', 'speed-limit-down', 'speed-limit-up', 'alt-speed-down', 'alt-speed-up', 'version']}) → Future<Map< String, dynamic> > -
Get data session, fields can be provided to get only needed information
fields
to retrieve, can be checked at https://github.com/transmission/transmission/blob/master/extras/rpc-spec.txt ReturnsMap
of the session's data Throws TransmissionException if errors -
getTorrents(
{List< String> fields = const ['id', 'name', 'eta', 'queuePosition', 'downloadDir', 'isFinished', 'isStalled', 'leftUntilDone', 'metadataPercentComplete', 'error', 'errorString', 'percentDone', 'totalSize', 'peersConnected', 'sizeWhenDone', 'status', 'rateDownload', 'rateUpload', 'peersGettingFromUs', 'peersSendingToUs']}) → Future<List< Torrent> > -
Get the list of torrents, fields can be provided to get only needed information
fields
to retrieve, can be checked at https://github.com/transmission/transmission/blob/master/extras/rpc-spec.txt Returns list of Torrent currently in transmission instance Throws TransmissionException if errors -
moveTorrents(
List< int> ids, String location, {bool move = false}) → Future<void> -
Move torrents by their given ids
ids
integer identifier list of the torrents to removelocation
new location to move the torrentmove
if true, move from previous location otherwise, search "location" for files, default false Throws TransmissionException if errors -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeTorrents(
List< int> ids, {bool deleteLocalData = false}) → Future<void> -
Remove torrents by their given ids
ids
integer identifier list of the torrents to removedeleteLocalData
boolean to also delete local data, default false Throws TransmissionException if errors -
renameTorrent(
int id, {String? name, String? path}) → Future< void> -
Rename torrent by given id
id
of the torrent to renamename
new namepath
old name Throws TransmissionException if errors -
setSession(
Map< String, dynamic> fields) → Future<void> -
Set data session
fields
to set, can be checked at https://github.com/transmission/transmission/blob/master/extras/rpc-spec.txt Throws TransmissionException if errors -
startNowTorrents(
List< int> ids) → Future<void> -
Start torrents now by given ids
ids
integer identifier list of the torrents to remove Throws TransmissionException if errors -
startTorrents(
List< int> ids) → Future<void> -
Start torrents by given ids
ids
integer identifier list of the torrents to remove Throws TransmissionException if errors -
stopTorrents(
List< int> ids) → Future<void> -
Stop torrents by given ids
ids
integer identifier list of the torrents to remove Throws TransmissionException if errors -
toString(
) → String -
A string representation of this object.
inherited
-
verifyTorrents(
List< int> ids) → Future<void> -
Verify torrents by given ids
ids
integer identifier list of the torrents to remove Throws TransmissionException if errors
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited