Documentation ¶
Index ¶
- Constants
- type ApplicationAPIVersion
- type ApplicationBuildInfo
- type ApplicationPreferences
- type ApplicationVersion
- type Client
- func (client *Client) ApplicationAPIVersion() (*ApplicationAPIVersion, error)
- func (client *Client) ApplicationBuildInformation() (*ApplicationBuildInfo, error)
- func (client *Client) ApplicationDefaultSavePath() (string, error)
- func (client *Client) ApplicationPreferences() (*ApplicationPreferences, error)
- func (client *Client) ApplicationVersion() (*ApplicationVersion, error)
- func (client *Client) Authenticate() error
- func (client *Client) LogEntries(options map[string]string) (*LogEntry, error)
- func (client *Client) TorrentContents(hash string) (*TorrentContents, error)
- func (client *Client) TorrentDecreasePriority(hashes ...string) error
- func (client *Client) TorrentDelete(hashes ...string) error
- func (client *Client) TorrentDeleteWithFiles(hashes ...string) error
- func (client *Client) TorrentIncreasePriority(hashes ...string) error
- func (client *Client) TorrentList() (*Torrent, error)
- func (client *Client) TorrentPause(hashes ...string) error
- func (client *Client) TorrentPiecesHashes(hash string) (*TorrentPiecesHashes, error)
- func (client *Client) TorrentPiecesState(hash string) (*TorrentPiecesState, error)
- func (client *Client) TorrentProperties(hash string) (*TorrentProperties, error)
- func (client *Client) TorrentReAnnounce(hashes ...string) error
- func (client *Client) TorrentReCheck(hashes ...string) error
- func (client *Client) TorrentResume(hashes ...string) error
- func (client *Client) TorrentSetFilePriority(hash string, priority uint64, files ...string) error
- func (client *Client) TorrentSetHighestPriority(hashes ...string) error
- func (client *Client) TorrentSetLowestPriority(hashes ...string) error
- func (client *Client) TorrentTrackers(hash string) (*TorrentTrackers, error)
- type LogEntry
- type Torrent
- type TorrentContents
- type TorrentPiecesHashes
- type TorrentPiecesState
- type TorrentProperties
- type TorrentTrackers
Constants ¶
const ( // Base API Endpoint ENDPOINT_API = "%s/api/v2" // Authentication Endpoints // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#authentication ENDPOINT_AUTHENTICATION = ENDPOINT_API + "/auth/" // [GET] Login // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#login ENDPOINT_AUTHENTICATION_LOGIN = ENDPOINT_AUTHENTICATION + "login" // [GET] Logout // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#logout ENDPOINT_AUTHENTICATION_LOGOUT = ENDPOINT_AUTHENTICATION + "logout" // Application endpoints // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#application ENDPOINT_APPLICATION = ENDPOINT_API + "/app/" // [GET] Get application version // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-application-version ENDPOINT_APPLICATION_VERSION = ENDPOINT_APPLICATION + "version" // [GET] Get API version // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-api-version ENDPOINT_APPLICATION_API_VERSION = ENDPOINT_APPLICATION + "webapiVersion" // [GET] Get build info // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-build-info ENDPOINT_APPLICATION_BUILD_INFO = ENDPOINT_APPLICATION + "buildInfo" // [GET] Shutdown application // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#shutdown-application ENDPOINT_APPLICATION_SHUTDOWN = ENDPOINT_APPLICATION + "shutdown" // [GET] Get application preferences // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-application-preferences ENDPOINT_APPLICATION_PREFERENCES = ENDPOINT_APPLICATION + "preferences" // [POST] Set application preferences // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#set-application-preferences ENDPOINT_APPLICATION_SET_PREFERENCES = ENDPOINT_APPLICATION + "setPreferences" // [GET] Get default save path // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-default-save-path ENDPOINT_APPLICATION_DEFAULT_SAVE_PATH = ENDPOINT_APPLICATION + "defaultSavePath" // Log Endpoints // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#log ENDPOINT_LOG = ENDPOINT_API + "/log/" // [GET] Get log // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-log ENDPOINT_LOG_GET = ENDPOINT_LOG + "main" // [GET] Get peer log // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-peer-log ENDPOINT_LOG_PEERS = ENDPOINT_LOG + "peers" // Sync Endpoints // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#sync ENDPOINT_SYNC = ENDPOINT_API + "/sync/" // [GET] Get main data // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-main-data ENDPOINT_SYNC_MAIN = ENDPOINT_SYNC + "maindata" // [GET] Get torrent peers data // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-torrent-peers-data ENDPOINT_SYNC_TORRENT_PEERS = ENDPOINT_SYNC + "torrentPeers" // Transfer info // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#transfer-info ENDPOINT_TRANSFER = ENDPOINT_API + "transfer" // [GET] Get global transfer info // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-global-transfer-info ENDPOINT_TRANSFER_INFO = ENDPOINT_TRANSFER + "info" // [GET] Get alternative speed limits state // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-alternative-speed-limits-state ENDPOINT_TRANSFER_ALT_SPEED_LIMITS = ENDPOINT_TRANSFER + "speedLimitsMode" // [GET] Toggle alternative speed limits // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#toggle-alternative-speed-limits ENDPOINT_TRANSFER_TOGGLE_SPEED_LIMITS = ENDPOINT_TRANSFER + "toggleSpeedLimitsMode" // [GET] Get global download limit // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-global-download-limit ENDPOINT_TRANSFER_GET_DOWNLOAD_LIMIT = ENDPOINT_TRANSFER + "downloadLimit" // [POST] Set global download limit // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#set-global-download-limit ENDPOINT_TRANSFER_SET_DOWNLOAD_LIMIT = ENDPOINT_TRANSFER + "setDownloadLimit" // [GET] Get global upload limit // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-global-upload-limit ENDPOINT_TRANSFER_GET_UPLOAD_LIMIT = ENDPOINT_TRANSFER + "uploadLimit" // [POST] Set global upload limit // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#set-global-upload-limit ENDPOINT_TRANSFER_SET_UPLOAD_LIMIT = ENDPOINT_TRANSFER + "setUploadLimit" // [ANY] Ban peers // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#ban-peers ENDPOINT_TRANSFER_BAN_PEERS = ENDPOINT_TRANSFER + "banPeers" // Torrent Management Endpoint // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#torrent-management ENDPOINT_TORRENT = ENDPOINT_API + "/torrents/" // Get torrent list // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-torrent-list ENDPOINT_TORRENT_LIST = ENDPOINT_TORRENT + "info" // [GET] Get torrent generic properties // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-torrent-generic-properties ENDPOINT_TORRENT_PROPERTIES = ENDPOINT_TORRENT + "properties" // [GET] Get torrent trackers // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-torrent-trackers ENDPOINT_TORRENT_TRACKERS = ENDPOINT_TORRENT + "trackers" // [GET] Get torrent web seeds // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-torrent-web-seeds ENDPOINT_TORRENT_WEB_SEEDS = ENDPOINT_TORRENT + "webseeds" // [GET] Get torrent contents // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-torrent-contents ENDPOINT_TORRENT_CONTENTS = ENDPOINT_TORRENT + "files" // [GET] Get torrent pieces' states // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-torrent-pieces-states ENDPOINT_TORRENT_PIECES_STATES = ENDPOINT_TORRENT + "pieceStates" // [GET] Get torrent pieces' hashes // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-torrent-pieces-hashes ENDPOINT_TORRENT_PIECES_HASHES = ENDPOINT_TORRENT + "pieceHashes" // [POST] Pause torrents // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#pause-torrents ENDPOINT_TORRENT_PAUSE = ENDPOINT_TORRENT + "pause" // [POST] Resume torrents // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#resume-torrents ENDPOINT_TORRENT_RESUME = ENDPOINT_TORRENT + "resume" // [POST] Delete torrents // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#delete-torrents ENDPOINT_TORRENT_DELETE = ENDPOINT_TORRENT + "delete" // [POST] Recheck torrents // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#recheck-torrents ENDPOINT_TORRENT_RECHECK = ENDPOINT_TORRENT + "recheck" // [POST] Reannounce torrents // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#reannounce-torrents ENDPOINT_TORRENT_REANNOUNCE = ENDPOINT_TORRENT + "reannounce" // [POST] Add new torrent // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#add-new-torrent ENDPOINT_TORRENT_CREATE = ENDPOINT_TORRENT + "add" // [POST] Add trackers to torrent // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#add-trackers-to-torrent ENDPOINT_TORRENT_ADD_TRACKERS = ENDPOINT_TORRENT + "addTrackers" // [POST] Edit trackers // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#edit-trackers ENDPOINT_TORRENT_EDIT_TRACKERS = ENDPOINT_TORRENT + "editTracker" // [POST] Remove trackers // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#remove-trackers ENDPOINT_TORRENT_REMOVE_TRACKERS = ENDPOINT_TORRENT + "removeTrackers" // [POST] Add peers // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#add-peers ENDPOINT_TORRENT_ADD_PEERS = ENDPOINT_TORRENT + "addPeers" // [POST] Increase torrent priority // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#increase-torrent-priority ENDPOINT_TORRENT_INCREASE_PRIORITY = ENDPOINT_TORRENT + "increasePrio" // [POST] Decrease torrent priority // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#decrease-torrent-priority ENDPOINT_TORRENT_DECREASE_PRIORITY = ENDPOINT_TORRENT + "decreasePrio" // [POST] Maximal torrent priority // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#maximal-torrent-priority ENDPOINT_TORRENT_MAX_PRIORITY = ENDPOINT_TORRENT + "topPrio" // [POST] Minimal torrent priority // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#minimal-torrent-priority ENDPOINT_TORRENT_MIN_PRIORITY = ENDPOINT_TORRENT + "bottomPrio" // [POST] Set file priority // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#set-file-priority ENDPOINT_TORRENT_SET_FILE_PRIORITY = ENDPOINT_TORRENT + "filePrio" // [POST] Get torrent download limit // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#get-torrent-download-limit ENDPOINT_TORRENT_GET_DOWNLOAD_LIMIT = ENDPOINT_TORRENT + "downloadLimit" // [POST] Set torrent download limit // https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation#set-torrent-download-limit ENDPOINT_TORRENT_SET_DOWNLOAD_LIMIT = ENDPOINT_TORRENT + "setDownloadLimit" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationAPIVersion ¶
type ApplicationBuildInfo ¶
type ApplicationPreferences ¶
type ApplicationPreferences struct { AddTrackers string `json:"add_trackers"` AddTrackersEnabled bool `json:"add_trackers_enabled"` AltDownloadLimit int64 `json:"alt_dl_limit"` AltUploadLimit int64 `json:"alt_up_limit"` AltWebUIEnabled bool `json:"alternative_webui_enabled"` AltWebUIPath string `json:"alternative_webui_path"` AnnounceIP string `json:"announce_ip"` AnnounceToAllTiers bool `json:"announce_to_all_tiers"` AnnounceToAllTrackers bool `json:"announce_to_all_trackers"` AnonymousMode bool `json:"anonymous_mode"` AsyncIOThreads int64 `json:"async_io_threads"` AutoDeleteMode int64 `json:"auto_delete_mode"` AutoTMMEnabled bool `json:"auto_tmm_enabled"` AutoRunEnabled bool `json:"autorun_enabled"` AutoRunProgram string `json:"autorun_program"` BannedIPs string `json:"banned_IPs"` BittorrentProtocol int64 `json:"bittorrent_protocol"` BypassAuthSubnetWL string `json:"bypass_auth_subnet_whitelist"` BypassAuthSubnetWLEnabled bool `json:"bypass_auth_subnet_whitelist_enabled"` BypassLocalAuth bool `json:"bypass_local_auth"` CategoryChangedTMMEnabled bool `json:"category_changed_tmm_enabled"` CheckingMemoryUse int64 `json:"checking_memory_use"` CreateSubFolderEnabled bool `json:"create_subfolder_enabled"` CurrentInterfaceAddress string `json:"current_interface_address"` CurrentNetworkInterface string `json:"current_network_interface"` DHT bool `json:"dht"` DiskCache int64 `json:"disk_cache"` DiskCacheTTL int64 `json:"disk_cache_ttl"` DownloadLimit int64 `json:"dl_limit"` DontCountSlowTorrents bool `json:"dont_count_slow_torrents"` DynDNSDomain string `json:"dyndns_domain"` DynDNSEnabled bool `json:"dyndns_enabled"` DynDNSPassword string `json:"dyndns_password"` DynDNSService int64 `json:"dyndns_service"` DynDNSUsername string `json:"dyndns_username"` EmbeddedTrackerPort int64 `json:"embedded_tracker_port"` EnableCoalesceReadWrite bool `json:"enable_coalesce_read_write"` EnabledEmbeddedTracker bool `json:"enable_embedded_tracker"` EnableMultiConnFromSameIP bool `json:"enable_multi_connections_from_same_ip"` EnableOSCache bool `json:"enable_os_cache"` EnableSuperSeeding bool `json:"enable_super_seeding"` EnableUploadSuggestions bool `json:"enable_upload_suggestions"` Encryption int64 `json:"encryption"` ExportDirectory string `json:"export_dir"` ExportDirectoryFin string `json:"export_dir_fin"` FilePoolSize int64 `json:"file_pool_size"` IncompleteFilesExtension bool `json:"incomplete_files_ext"` IPFilterEnabled bool `json:"ip_filter_enabled"` IPFilterPath string `json:"ip_filter_path"` IPFilterTrackers bool `json:"ip_filter_trackers"` LimitLanPeers bool `json:"limit_lan_peers"` LimitTCPOverhead bool `json:"limit_tcp_overhead"` LimitUTPRate bool `json:"limit_utp_rate"` ListenPort int64 `json:"listen_port"` Locale string `json:"locale"` LSD bool `json:"lsd"` MailNotificationAuthEnabled bool `json:"mail_notification_auth_enabled"` MailNotificationEmail string `json:"mail_notification_email"` MailNotificationEnabled bool `json:"mail_notification_enabled"` MailNotificationPassword string `json:"mail_notification_password"` MailNotificationSender string `json:"mail_notification_sender"` MailNotificationSMTP string `json:"mail_notification_smtp"` MailNotificationSSLEnabled bool `json:"mail_notification_ssl_enabled"` MailNotificationUsername string `json:"mail_notification_username"` MaxActiveDownloads int64 `json:"max_active_downloads"` MaxActiveTorrents int64 `json:"max_active_torrents"` MaxActiveUploads int64 `json:"max_active_uploads"` MaxConnections int64 `json:"max_connec"` MaxConnectionPerTorrent int64 `json:"max_connec_per_torrent"` MaxRatio int64 `json:"max_ratio"` MaxRatioACT int64 `json:"max_ratio_act"` MaxRatioEnabled bool `json:"max_ratio_enabled"` MaxSeedingTime int64 `json:"max_seeding_time"` MaxSeedingTimeEnabled bool `json:"max_seeding_time_enabled"` MaxUploads int64 `json:"max_uploads"` MaxUploadsPerTorrent int64 `json:"max_uploads_per_torrent"` OutgoingPortsMax int64 `json:"outgoing_ports_max"` OutgoingPortsMin int64 `json:"outgoing_ports_min"` PEX bool `json:"pex"` PreAllocateAll bool `json:"preallocate_all"` ProxyAuthEnabled bool `json:"proxy_auth_enabled"` ProxyIP string `json:"proxy_ip"` ProxyPassword string `json:"proxy_password"` ProxyPeerConnection bool `json:"proxy_peer_connections"` ProxyPort int64 `json:"proxy_port"` ProxyTorrentsOnly bool `json:"proxy_torrents_only"` ProxyType int64 `json:"proxy_type"` ProxyUsername string `json:"proxy_username"` QueueingEnabled bool `json:"queueing_enabled"` RandomPort bool `json:"random_port"` ReCheckCompletedTorrents bool `json:"recheck_completed_torrents"` ResolvePeerCountries bool `json:"resolve_peer_countries"` RSSAutoDownloadingEnabled bool `json:"rss_auto_downloading_enabled"` RSSMaxArticlesPerFeed int64 `json:"rss_max_articles_per_feed"` RSSProcessingEnabled bool `json:"rss_processing_enabled"` RSSRefreshInterval int64 `json:"rss_refresh_interval"` SavePath string `json:"save_path"` SavePathChangedTMMEnabled bool `json:"save_path_changed_tmm_enabled"` SaveResumeDataInterval int64 `json:"save_resume_data_interval"` ScanDirs map[string]bool `json:"scan_dirs"` ScheduleFromHour int64 `json:"schedule_from_hour"` ScheduleFromMinute int64 `json:"schedule_from_min"` ScheduleToHour int64 `json:"schedule_to_hour"` ScheduleToMinute int64 `json:"schedule_to_min"` SchedulerDays int64 `json:"scheduler_days"` SchedulerEnabled bool `json:"scheduler_enabled"` SendBufferLowWatermark int64 `json:"send_buffer_low_watermark"` SendBufferWatermark int64 `json:"send_buffer_watermark"` SendBuffetWatermarkFactor int64 `json:"send_buffer_watermark_factor"` SlowTorrentDownloadRateThreshold int64 `json:"slow_torrent_dl_rate_threshold"` SlowTorrentInactiveTimer int64 `json:"slow_torrent_inactive_timer"` SlowTorrentUploadRateThreshold int64 `json:"slow_torrent_ul_rate_threshold"` SocketBacklogSize int64 `json:"socket_backlog_size"` StartPausedEnabled bool `json:"start_paused_enabled"` TemporaryPath string `json:"temp_path"` TemporaryPathEnabled bool `json:"temp_path_enabled"` TorrentChangedTMMEnabled bool `json:"torrent_changed_tmm_enabled"` UploadLimit int64 `json:"up_limit"` UploadChokingAlgorithm int64 `json:"upload_choking_algorithm"` UploadSlotsBehavior int64 `json:"upload_slots_behavior"` UPNP bool `json:"upnp"` UseHTTP bool `json:"use_https"` UTPTCPMixedMode int64 `json:"utp_tcp_mixed_mode"` WebUIAddress string `json:"web_ui_address"` WebUIClickJackingProtectionEnabled bool `json:"web_ui_clickjacking_protection_enabled"` WebUICSRFProtectionEnabled bool `json:"web_ui_csrf_protection_enabled"` WebUIDomainList string `json:"web_ui_domain_list"` WebUIHostHeaderValidationEnabled bool `json:"web_ui_host_header_validation_enabled"` WebUIHttpsCertificatePath string `json:"web_ui_https_cert_path"` WebUIHttpsKeyPath string `json:"web_ui_https_key_path"` WebUIPort int64 `json:"web_ui_port"` WebUISessionTimeout int64 `json:"web_ui_session_timeout"` WebUIUPNP bool `json:"web_ui_upnp"` WebUIUsername string `json:"web_ui_username"` }
type ApplicationVersion ¶
type Client ¶
type Client struct { Authenticated bool // contains filtered or unexported fields }
func (*Client) ApplicationAPIVersion ¶
func (client *Client) ApplicationAPIVersion() (*ApplicationAPIVersion, error)
Get application api version
func (*Client) ApplicationBuildInformation ¶
func (client *Client) ApplicationBuildInformation() (*ApplicationBuildInfo, error)
Get application build information
func (*Client) ApplicationDefaultSavePath ¶
Get default save path
func (*Client) ApplicationPreferences ¶
func (client *Client) ApplicationPreferences() (*ApplicationPreferences, error)
Get application preferences
func (*Client) ApplicationVersion ¶
func (client *Client) ApplicationVersion() (*ApplicationVersion, error)
Get application version
func (*Client) Authenticate ¶
Perform authentication procedure
func (*Client) LogEntries ¶
Get log
func (*Client) TorrentContents ¶
func (client *Client) TorrentContents(hash string) (*TorrentContents, error)
Get contents of a specific torrent
func (*Client) TorrentDecreasePriority ¶
Decrease priority for specified torrents
func (*Client) TorrentDelete ¶
Delete specified torrents
func (*Client) TorrentDeleteWithFiles ¶
Delete specified torrents and all downloaded files
func (*Client) TorrentIncreasePriority ¶
Increase priority for specified torrents
func (*Client) TorrentList ¶
Get list of active torrents
func (*Client) TorrentPause ¶
Pause specified torrents
func (*Client) TorrentPiecesHashes ¶
func (client *Client) TorrentPiecesHashes(hash string) (*TorrentPiecesHashes, error)
Get pieces hashes of a specific torrent
func (*Client) TorrentPiecesState ¶
func (client *Client) TorrentPiecesState(hash string) (*TorrentPiecesState, error)
Get pieces states of a specific torrent
func (*Client) TorrentProperties ¶
func (client *Client) TorrentProperties(hash string) (*TorrentProperties, error)
Get properties of a specific torrent
func (*Client) TorrentReAnnounce ¶
Re-Announce specified torrents
func (*Client) TorrentReCheck ¶
Re-Check specified torrents
func (*Client) TorrentResume ¶
Resume specified torrents
func (*Client) TorrentSetFilePriority ¶
Set lowest priority for specified torrents
func (*Client) TorrentSetHighestPriority ¶
Set highest priority for specified torrents
func (*Client) TorrentSetLowestPriority ¶
Set lowest priority for specified torrents
func (*Client) TorrentTrackers ¶
func (client *Client) TorrentTrackers(hash string) (*TorrentTrackers, error)
Get trackers of a specific torrent
type Torrent ¶
type Torrent []struct { AddedOn int64 `json:"added_on"` AmountLeft int64 `json:"amount_left"` AutoTMM bool `json:"auto_tmm"` Availability float64 `json:"availability"` Category string `json:"category"` Completed int64 `json:"completed"` CompletionOn int64 `json:"completion_on"` DownloadLimit int64 `json:"dl_limit"` DownloadSpeed int64 `json:"dlspeed"` Downloaded int64 `json:"downloaded"` DownloadedSession int64 `json:"downloaded_session"` EstimatedTimeLeft int64 `json:"eta"` FLPiecePrio bool `json:"f_l_piece_prio"` ForceStart bool `json:"force_start"` Hash string `json:"hash"` LastActivity int64 `json:"last_activity"` MagnetURI string `json:"magnet_uri"` MaxRatio int64 `json:"max_ratio"` MaxSeedingTime int64 `json:"max_seeding_time"` Name string `json:"name"` NumComplete int64 `json:"num_complete"` NumIncomplete int64 `json:"num_incomplete"` NumberOfLeechers int64 `json:"num_leechs"` NumberOfSeeders int64 `json:"num_seeds"` Priority int64 `json:"priority"` Progress float64 `json:"progress"` Ratio int64 `json:"ratio"` RatioLimit int64 `json:"ratio_limit"` SavePath string `json:"save_path"` SeedingTimeLimit int64 `json:"seeding_time_limit"` SeenComplete int64 `json:"seen_complete"` SequentialDownload bool `json:"seq_dl"` Size int64 `json:"size"` State string `json:"state"` SuperSeeding bool `json:"super_seeding"` Tags string `json:"tags"` TimeActive int64 `json:"time_active"` TotalSize int64 `json:"total_size"` Tracker string `json:"tracker"` UploadLimit int64 `json:"up_limit"` Uploaded int64 `json:"uploaded"` UploadedSession int64 `json:"uploaded_session"` UploadSpeed int64 `json:"upspeed"` }
type TorrentContents ¶
type TorrentPiecesHashes ¶
type TorrentPiecesHashes []string
type TorrentPiecesState ¶
type TorrentPiecesState []int64
type TorrentProperties ¶
type TorrentProperties struct { AdditionDate int64 `json:"addition_date"` Comment string `json:"comment"` CompletionDate int64 `json:"completion_date"` CreatedBy string `json:"created_by"` CreationDate int64 `json:"creation_date"` DownloadLimit int64 `json:"dl_limit"` DownloadSpeed int64 `json:"dl_speed"` DownloadSpeedAverage int64 `json:"dl_speed_avg"` EstimatedTimeLeft int64 `json:"eta"` LastSeen int64 `json:"last_seen"` ConnectionsCount int64 `json:"nb_connections"` ConnectionsLimit int64 `json:"nb_connections_limit"` Peers int64 `json:"peers"` PeersTotal int64 `json:"peers_total"` PieceSize int64 `json:"piece_size"` PiecesHave int64 `json:"pieces_have"` PiecesNumber int64 `json:"pieces_num"` Reannounce int64 `json:"reannounce"` SavePath string `json:"save_path"` SeedingTime int64 `json:"seeding_time"` Seeds int64 `json:"seeds"` SeedsTotal int64 `json:"seeds_total"` TimeElapsed int64 `json:"time_elapsed"` TotalDownloaded int64 `json:"total_downloaded"` TotalDownloadedSession int64 `json:"total_downloaded_session"` TotalSize int64 `json:"total_size"` TotalUploaded int64 `json:"total_uploaded"` TotalUploadedSession int64 `json:"total_uploaded_session"` TotalWasted int64 `json:"total_wasted"` UploadLimit int64 `json:"up_limit"` UploadSpeed int64 `json:"up_speed"` UploadSpeedAverage int64 `json:"up_speed_avg"` }
type TorrentTrackers ¶
type TorrentTrackers []struct { Message string `json:"msg"` NumDownloaded int64 `json:"num_downloaded"` LeechesCount int64 `json:"num_leeches"` PeersCount int64 `json:"num_peers"` SeedersCount int64 `json:"num_seeds"` Status int64 `json:"status"` //Tier int64 `json:"tier"` // TODO: so they can give back either INT or STRING, WTF? URL string `json:"url"` }