api

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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

func NewClient(token string) *Client

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

func (c *Client) FileRestart(gameID int, size int64, checksum string) (*files.RestartResult, error)

FileRestart does a POST /files/add call to restart a file upload

func (*Client) FileStatus

func (c *Client) FileStatus(gameID int, size int64, checksum string) (*files.GetResult, error)

FileStatus does a GET /files/add call

func (*Client) Game

func (c *Client) Game(gameID int) (*models.Game, error)

Game does a /games/:gameId call

func (*Client) GamePackage

func (c *Client) GamePackage(packageID int, options *packages.GetOptions) (*models.GamePackage, error)

GamePackage does a /packages/:packageId call

func (*Client) Games

func (c *Client) Games() (*games.Games, error)

Games does a /games call

func (*Client) Me

func (c *Client) Me() (*models.User, error)

Me does a /me call

func (*Client) Token

func (c *Client) Token() string

Token returns the token this api client was created with

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL