Documentation ¶
Overview ¶
Package rtorrent implements a client for rTorrent.
Index ¶
- type Client
- type DownloadService
- func (s *DownloadService) Active() ([]string, error)
- func (s *DownloadService) All() ([]string, error)
- func (s *DownloadService) BaseFilename(infoHash string) (string, error)
- func (s *DownloadService) Complete() ([]string, error)
- func (s *DownloadService) DownloadRate(infoHash string) (int, error)
- func (s *DownloadService) DownloadTotal(infoHash string) (int, error)
- func (s *DownloadService) Hashing() ([]string, error)
- func (s *DownloadService) Incomplete() ([]string, error)
- func (s *DownloadService) Leeching() ([]string, error)
- func (s *DownloadService) Seeding() ([]string, error)
- func (s *DownloadService) Started() ([]string, error)
- func (s *DownloadService) Stopped() ([]string, error)
- func (s *DownloadService) UploadRate(infoHash string) (int, error)
- func (s *DownloadService) UploadTotal(infoHash string) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Downloads *DownloadService // contains filtered or unexported fields }
A Client is an rTorrent client. It can be used to retrieve a variety of statistics from rTorrent.
func New ¶
func New(addr string, transport http.RoundTripper) (*Client, error)
New creates a new Client using the input XML-RPC address and an optional transport. If transport is nil, a default one will be used.
func (*Client) DownloadRate ¶
DownloadRate retrieves the current download rate in bytes from rTorrent.
func (*Client) DownloadTotal ¶
DownloadTotal retrieves the total number of downloaded bytes since rTorrent startup.
func (*Client) UploadRate ¶
UploadRate retrieves the current upload rate in bytes from rTorrent.
func (*Client) UploadTotal ¶
UploadTotal retrieves the total number of uploaded bytes since rTorrent startup.
type DownloadService ¶
type DownloadService struct {
// contains filtered or unexported fields
}
A DownloadService is a wrapper for Client methods which operate on downloads.
func (*DownloadService) Active ¶
func (s *DownloadService) Active() ([]string, error)
Active retrieves a list of active downloads from rTorrent.
func (*DownloadService) All ¶
func (s *DownloadService) All() ([]string, error)
All retrieves a list of all downloads from rTorrent.
func (*DownloadService) BaseFilename ¶
func (s *DownloadService) BaseFilename(infoHash string) (string, error)
BaseFilename retrieves the base filename shown in the rTorrent UI for a specific download, by its info-hash.
func (*DownloadService) Complete ¶
func (s *DownloadService) Complete() ([]string, error)
Complete retrieves a list of complete downloads from rTorrent.
func (*DownloadService) DownloadRate ¶
func (s *DownloadService) DownloadRate(infoHash string) (int, error)
DownloadRate retrieves the current download rate in bytes for a specific download, by its info-hash.
func (*DownloadService) DownloadTotal ¶
func (s *DownloadService) DownloadTotal(infoHash string) (int, error)
DownloadTotal retrieves the total bytes downloaded for a specific download, by its info-hash.
func (*DownloadService) Hashing ¶
func (s *DownloadService) Hashing() ([]string, error)
Hashing retrieves a list of hashing downloads from rTorrent.
func (*DownloadService) Incomplete ¶
func (s *DownloadService) Incomplete() ([]string, error)
Incomplete retrieves a list of incomplete downloads from rTorrent.
func (*DownloadService) Leeching ¶
func (s *DownloadService) Leeching() ([]string, error)
Leeching retrieves a list of leeching downloads from rTorrent.
func (*DownloadService) Seeding ¶
func (s *DownloadService) Seeding() ([]string, error)
Seeding retrieves a list of seeding downloads from rTorrent.
func (*DownloadService) Started ¶
func (s *DownloadService) Started() ([]string, error)
Started retrieves a list of started downloads from rTorrent.
func (*DownloadService) Stopped ¶
func (s *DownloadService) Stopped() ([]string, error)
Stopped retrieves a list of stopped downloads from rTorrent.
func (*DownloadService) UploadRate ¶
func (s *DownloadService) UploadRate(infoHash string) (int, error)
UploadRate retrieves the current upload rate in bytes for a specific download, by its info-hash.
func (*DownloadService) UploadTotal ¶
func (s *DownloadService) UploadTotal(infoHash string) (int, error)
UploadTotal retrieves the total bytes uploaded for a specific download, by its info-hash.