games

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(client *cliHttp.SimpleClient, gameID int) (*models.Game, error)

Get sends a new /games/:gameId request

Types

type Games

type Games struct {
	Games   []models.Game `json:"data"`
	Page    int           `json:"page"`
	PerPage int           `json:"per_page"`
	Total   int           `json:"total"`
}

Games is a list of games as returned by the /games endpoint

func List

func List(client *cliHttp.SimpleClient) (*Games, error)

List sends a new /games request

type GetResult

type GetResult struct {
	Game  *models.Game  `json:"game"`
	Error *models.Error `json:"error,omitempty"`
}

GetResult is the payload from the `/games/:id` endpoint

type ListResult

type ListResult struct {
	Games *Games        `json:"games"`
	Error *models.Error `json:"error,omitempty"`
}

ListResult is the payload from the `/games` endpoint

Jump to

Keyboard shortcuts

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