Documentation ¶
Index ¶
- type Client
- func (c *Client) FileAdd(gameID, packageID int, releaseVersion *semver.Version, isDownloadable bool, ...) (*files.AddResult, error)
- func (c *Client) FileRestart(gameID int, size int64, checksum string) (*files.RestartResult, error)
- func (c *Client) FileStatus(gameID int, size int64, checksum string) (*files.GetResult, error)
- func (c *Client) Game(gameID int) (*models.Game, error)
- func (c *Client) GamePackage(packageID int, options *packages.GetOptions) (*models.GamePackage, error)
- func (c *Client) Games() (*games.Games, error)
- func (c *Client) Me() (*models.User, error)
- func (c *Client) Token() string
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 is a client through which http requests for the service api endpoints are made
func NewClient ¶
NewClient creates a new simple http client that has the given token as the authorization and a user agent to identify the cli version
func (*Client) FileAdd ¶
func (c *Client) FileAdd(gameID, packageID int, releaseVersion *semver.Version, isDownloadable bool, size int64, checksum string, forceRestart bool, filepath string, startByte, chunkSize int64, bar *pb.ProgressBar) (*files.AddResult, error)
FileAdd does a POST /files/add call
func (*Client) FileRestart ¶ added in v0.5.0
FileRestart does a POST /files/add call to restart a file upload
func (*Client) FileStatus ¶
FileStatus does a GET /files/add call
func (*Client) GamePackage ¶
func (c *Client) GamePackage(packageID int, options *packages.GetOptions) (*models.GamePackage, error)
GamePackage does a /packages/:packageId call
Click to show internal directories.
Click to hide internal directories.