rTorrent XMLRPC Bindings for Go (golang)
Fork of github.com/mrobinsn/go-rtorrent.
- Get IP, Name, Up/Down totals
- Get torrents within a view
- Get torrent by hash
- Get files for torrents
- Set the label on a torrent
- Add a torrent by URL or by metadata
- Delete a torrent (including files)
To install the package, run go get github.com/autobrr/go-rtorrent
To use it in application, import "github.com/autobrr/go-rtorrent"
client := rtorrent.NewClient(rtorrent.Config{Addr: "http://my-rtorrent.com/RPC2"})
name, _ := client.Name(context.Background())
fmt.Printf("My rTorrent's name: %v", name)
You can connect to a server using Basic Authentication by adding User and Pass to the config:
client := rtorrent.NewClient(rtorrent.Config{Addr: "http://my-rtorrent.com/RPC2", BasicUser: "user", BasicPass: "pass"})
Pull requests are welcome, please ensure you add relevant tests for any new/changed functionality.