Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- func (qb *Client) APIMinimumVersion() (string, error)
- func (qb *Client) APIVersion() (string, error)
- func (qb *Client) Command(action string, hash []string) error
- func (qb *Client) ListTorrent() (torrents *[]Torrent, err error)
- func (qb *Client) Logout() error
- func (qb *Client) Pause(hash []string) error
- func (qb *Client) PauseAll(hash []string) error
- func (qb *Client) Recheck(hash []string) error
- func (qb *Client) Remove(hash []string) error
- func (qb *Client) RemoveData(hash []string) error
- func (qb *Client) Start(hash []string) error
- func (qb *Client) StartAll(hash []string) error
- func (qb *Client) UploadFile(file *os.File) error
- type State
- type Torrent
Constants ¶
const ( StateError = "Error" //Some error occurred, applies to paused torrents StatePausedUP = "Upload Paused" //Torrent is paused and has finished downloading StatePausedDL = "Download Paused" //Torrent is paused and has NOT finished downloading StateQueuedUP = "Upload Queued" //Queuing is enabled and torrent is queued for upload StateQueuedDL = "Download Queued" //Queuing is enabled and torrent is queued for download StateUploading = "Uploading" //Torrent is being seeded and data is being transfered StateStalledUP = "Uploading, connection waiting" //Torrent is being seeded, but no connection were made StateCheckingUP = "Upload Checking" //Torrent has finished downloading and is being checked; this status also applies to preallocation (if enabled) and checking resume data on qBt startup StateCheckingDL = "Download File Checking" //Same as checkingUP, but torrent has NOT finished downloading StateDownloading = "Downloading" //Torrent is being downloaded and data is being transfered StateStalledDL = "Donwloading, connection waiting" //Torrent is being downloaded, but no connection were made StateMetaDL = "Fetching Metadata" //Torrent has just started downloading and is fetching metadata )
Variables ¶
var TorrentState = &State{ "error": StateError, "pausedUP": StatePausedUP, "pausedDL": StatePausedDL, "queuedUP": StateQueuedUP, "queuedDL": StateQueuedDL, "uploading": StateUploading, "stalledUP": StateStalledUP, "checkingUP": StateCheckingUP, "checkingDL": StateCheckingDL, "downloading": StateDownloading, "stalledDL": StateStalledDL, "metaDL": StateMetaDL, }
TorrentState ...
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { BaseURL string Username string Password string Token string Cookies http.CookieJar Authorize string // contains filtered or unexported fields }
Client ... qBittorrent Configure
func (*Client) APIMinimumVersion ¶
APIMinimumVersion ...
func (*Client) ListTorrent ¶
ListTorrent ...
func (*Client) Pause ¶
Pause ... https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-Documentation#pause-torrent
func (*Client) PauseAll ¶
PauseAll ... https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-Documentation#pause-all-torrents
func (*Client) Recheck ¶
Recheck ... https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-Documentation#recheck-torrent
func (*Client) Remove ¶
Remove ... https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-Documentation#delete-torrent
func (*Client) RemoveData ¶
RemoveData ... https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-Documentation#delete-torrent-with-downloaded-data
func (*Client) Start ¶
Start ... https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-Documentation#resume-torrent
func (*Client) StartAll ¶
StartAll ... https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-Documentation#resume-all-torrents
func (*Client) UploadFile ¶
UploadFile . https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-Documentation#upload-torrent-from-disk
type Torrent ¶
type Torrent struct { //https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-Documentation#get-torrent-list Hash string `json:"hash"` //Torrent hash Name string `json:"name"` //Torrent name Size int64 `json:"size"` //Total size (bytes) of files selected for download Progress float32 `json:"progress"` //Torrent progress (percentage/100) Dlspeed int64 `json:"dlspeed"` //Torrent download speed (bytes/s) Upspeed int64 `json:"upspeed"` //Torrent upload speed (bytes/s) Priority int64 `json:"priority"` //Torrent priority. Returns -1 if queuing is disabled or torrent is in seed mode NumSeeds int64 `json:"num_seeds"` //Number of seeds connected to NumComplete int64 `json:"num_complete"` //Number of seeds in the swarm NumLeechs int64 `json:"num_leechs"` //Number of leechers connected to NumIncomplete int64 `json:"num_incomplete"` //Number of leechers in the swarm Ratio float32 `json:"ratio"` //Torrent share ratio. Max ratio value: 9999. Eta int64 `json:"eta"` //Torrent ETA (seconds) State string `json:"state"` //Torrent state. See table here below for the possible values SeqDl bool `json:"seq_dl"` //True if sequential download is enabled FirstLastPiecePriority bool `json:"f_l_piece_prio"` //True if first last piece are prioritized Category string `json:"category"` //Category of the torrent SuperSeeding bool `json:"super_seeding"` //True if super seeding is enabled ForceStart bool `json:"force_start"` //True if force start is enabled for this torrent DateAdded uint64 `json:"added_on"` //Not On Wiki: Timestamp of Added Time DateCompleted uint64 `json:"completion_on"` //Not On Wiki: Timestamp of Completed Time LastActivity uint64 `json:"last_activity"` //Not On Wiki: Timestamp of LastActivity Time }
Torrent ...