Versions in this module Expand all Collapse all v1 v1.1.4 Jun 13, 2023 v1.1.3 Jun 13, 2023 v1.1.1 Jan 10, 2023 v1.1.0 Jan 6, 2023 Changes in this version + const StateCheckingDL + const StateCheckingUP + const StateDownloading + const StateError + const StateMetaDL + const StatePausedDL + const StatePausedUP + const StateQueuedDL + const StateQueuedUP + const StateStalledDL + const StateStalledUP + const StateUploading + var TorrentState = &State + type Client struct + Authorize string + BaseURL string + Cookies http.CookieJar + Password string + Token string + Username string + func NewClient(baseURL string, username string, password string) (qb *Client, err error) + func NewClientEx(baseURL string, username string, password string, debug bool) (qb *Client, err error) + func (qb *Client) APIMinimumVersion() (string, error) + func (qb *Client) APIVersion() (string, error) + func (qb *Client) Command(action string, hash []string) error + func (qb *Client) GetPreference() (*Preference, 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, option *UploadOption) (err error) + type Preference struct + AltDlLimit int + AltUpLimit int + AnonymousMode bool + AutorunEnable bool + AutorunProgram string + BypassAuthSubnetWhiteList string + BypassAuthSubnetWhitelistEnabled bool + BypassLocalAuth bool + DHT bool + DHTPort int + DHTSameAsBT bool + DlLimit int + DontCountSlowTorrents bool + DyndnsDomain string + DyndnsEnabled bool + DyndnsPassword string + DyndnsService int + DyndnsUsername string + EnableUTP bool + Encryption int + ExportDir string + ExportDirEnabled bool + ForceProxy bool + IPFilterEnabled bool + IPFilterPath string + IPFilterTrackers bool + IncompleteFileExt bool + LSD bool + LimitTCPOverhead bool + LimitUTPRate bool + ListenPort int + Locale string + MailNotificationAuthEnabled bool + MailNotificationEmail string + MailNotificationEnabled bool + MailNotificationPassword string + MailNotificationSMTP string + MailNotificationSSLEnabled bool + MailNotificationUsername string + MaxActiveDownloads int + MaxActiveTorrents int + MaxActiveUploads int + MaxConnec int + MaxConnecPerTorrent int + MaxRatio float32 + MaxRatioAct int + MaxRatioEnabled bool + MaxUploadPerTorrent int + MaxUploads int + PEX bool + PreallocateAll bool + ProxyAuthEnabled bool + ProxyIP string + ProxyPassword string + ProxyPeerConnections bool + ProxyPort int + ProxyType int + ProxyUsername string + QueuingEnabled bool + RandomPort bool + SSLCert string + SSLKey string + SavePath string + ScanDirs map[string]string + ScheduleFromHour int + ScheduleFromMin int + ScheduleToHour int + ScheduleToMin int + SchedulerDays int + SchedulerEnabled bool + TempPath string + TempPathEnabled bool + UPNP bool + UpLimit int + UseHTTPS bool + WebUIPassword string + WebUIPort int + WebUIUPNP bool + WebUIUsername string + type State map[string]string + type Torrent struct + Category string + DateAdded uint64 + DateCompleted uint64 + Dlspeed int64 + Eta int64 + FirstLastPiecePriority bool + ForceStart bool + Hash string + LastActivity uint64 + Name string + NumComplete int64 + NumIncomplete int64 + NumLeechs int64 + NumSeeds int64 + Priority int64 + Progress float32 + Ratio float32 + SeqDl bool + Size int64 + State string + SuperSeeding bool + Upspeed int64 + func (T Torrent) Completed() bool + type UploadOption struct + Category string + Cookie string + DownloadLimit uint64 + FirstLastPiecePrio bool + Paused bool + Rename string + RootFolder bool + SavePath string + SequentialDownload bool + SkipChecking bool + UploadLimit uint64