renameTorrent method
Rename torrent by given id
id
of the torrent to rename
name
new name
path
old name
Throws TransmissionException if errors
Implementation
Future<void> renameTorrent(
int id, {
String? name,
String? path,
}) async {
final results = await _dio.post('/',
data: _Request(methodRenameTorrent, arguments: {
'ids': id,
if (path != null) 'path': path,
if (name != null) 'name': name,
}).toJSON());
_checkResults(_Response.fromJSON(results.data));
}