Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // Address for Json request Address string Username string Password string // contains filtered or unexported fields }
Client represents a Transmission client
func (*Client) SessionGet ¶
func (c *Client) SessionGet() (*SessionGetResponse, error)
SessionGet method
func (*Client) TorrentAdd ¶
func (c *Client) TorrentAdd(URL string, paused bool) (*TorrentAddResponse, error)
TorrentAdd method
type SessionGetResponse ¶
type SessionGetResponse struct { // location of transmission's configuration directory ConfigDir string `json:"config-dir"` // default path to download torrents DownloadDir string `json:"download-dir"` // max number of torrents to download at once (see download-queue-enabled) DownloadQueueSize int `json:"download-queue-size"` // if true, limit how many torrents can be downloaded at once DownloadQueueEnabled bool `json:"download-queue-enabled"` // true means allow dht in public torrents DhtEnabled bool `json:"dht-enabled"` // "required", "preferred", "tolerated" Encryption string // torrents we're seeding will be stopped if they're idle for this long IdleSeedingLimit int `json:"idle-seeding-limit"` // true if the seeding inactivity limit is honored by default IdleSeedingLimitEnabled bool `json:"idle-seeding-limit-enabled"` // path for incomplete torrents, when enabled InclompleteDir string `json:"incomplete-dir"` // true means keep torrents in incomplete-dir until done InclompleteDirEnabled bool `json:"incomplete-dir-enabled"` // the current RPC API version RPCVersion int `json:"rpc-version"` // the minimum RPC API version supported RPCVersionMinimum int `json:"rpc-version-minimum"` // long version string "$version ($revision)" Version string }
SessionGetResponse represents the information returned by the SessionGet method.
type TorrentAddResponse ¶
type TorrentAddResponse struct { TorrentAdded struct { ID int `json:"id"` HashString string `json:"hashString"` Name string `json:"name"` } `json:"torrent-added"` }
TorrentAddResponse represents the information returned by the TorrentAdd method.
Click to show internal directories.
Click to hide internal directories.