mirror of
https://github.com/kristoferssolo/transmission-rpc.git
synced 2025-10-21 20:10:37 +00:00
docs
This commit is contained in:
parent
f2420e876a
commit
e88de4bd72
@ -2,9 +2,9 @@ Library to communicate with transmission rpc
|
||||
|
||||
spec: https://github.com/transmission/transmission/blob/master/extras/rpc-spec.txt
|
||||
|
||||
Supported Methods:
|
||||
#### Supported Methods
|
||||
|
||||
Torrent Actions:
|
||||
##### Torrent Actions
|
||||
|
||||
- [X] torrent-start
|
||||
- [X] torrent-stop
|
||||
@ -12,7 +12,7 @@ Torrent Actions:
|
||||
- [X] torrent-verify
|
||||
- [X] torrent-reannounce
|
||||
|
||||
Torrent modificators:
|
||||
##### Torrent Mutators
|
||||
|
||||
- [ ] torrent-set
|
||||
- [X] torrent-get
|
||||
|
||||
@ -120,7 +120,7 @@ mod tests {
|
||||
let url= env::var("TURL")?;
|
||||
let basic_auth = BasicAuth{user: env::var("TUSER")?, password: env::var("TPWD")?};
|
||||
let client = TransClient::with_auth(&url, basic_auth);
|
||||
let res: RpcResponse<Torrents<Torrent>> = client.torrent_get(vec![TorrentGetField::ID, TorrentGetField::NAME]).await?;
|
||||
let res: RpcResponse<Torrents<Torrent>> = client.torrent_get(vec![TorrentGetField::Id, TorrentGetField::Name]).await?;
|
||||
let names: Vec<&String> = res.arguments.torrents.iter().map(|it| it.name.as_ref().unwrap()).collect();
|
||||
println!("{:#?}", names);
|
||||
Ok(())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user