Documentation
¶
Index ¶
- type Client
- func (c *Client) AddTransfer(magnetLink string, folderID int64) error
- func (c *Client) Authenticate() error
- func (c *Client) DeleteFile(fileID int64) error
- func (c *Client) DeleteTransfer(transferID int64) error
- func (c *Client) EnsureFolder(name string) (int64, error)
- func (c *Client) GetAccountInfo() (*putio.AccountInfo, error)
- func (c *Client) GetAllTransferFiles(fileID int64) ([]*putio.File, error)
- func (c *Client) GetDownloadURL(fileID int64) (string, error)
- func (c *Client) GetFiles(folderID int64) ([]*putio.File, error)
- func (c *Client) GetTransfers() ([]*putio.Transfer, error)
- func (c *Client) RetryTransfer(transferID int64) (*putio.Transfer, error)
- func (c *Client) UploadFile(data []byte, filename string, folderID int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the official Put.io client
func (*Client) AddTransfer ¶
AddTransfer adds a new transfer (torrent) to Put.io
func (*Client) Authenticate ¶
Authenticate verifies the OAuth token by fetching account info
func (*Client) DeleteFile ¶
DeleteFile removes a file from Put.io
func (*Client) DeleteTransfer ¶
DeleteTransfer removes a transfer from Put.io
func (*Client) EnsureFolder ¶
EnsureFolder creates a folder if it doesn't exist or returns the ID if it does
func (*Client) GetAccountInfo ¶
GetAccountInfo returns the Put.io account information
func (*Client) GetAllTransferFiles ¶ added in v0.9.2
GetAllTransferFiles recursively gets all files in a transfer
func (*Client) GetDownloadURL ¶
GetDownloadURL gets the download URL for a file
func (*Client) GetTransfers ¶
GetTransfers returns the list of current transfers
func (*Client) RetryTransfer ¶ added in v0.9.6
RetryTransfer retries a failed transfer
Click to show internal directories.
Click to hide internal directories.