gmr

package
v0.0.0-...-fec0eab Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2016 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(api_key string) string

func GetGame

func GetGame(game_id string, c chan Game)

func GetSaveFile

func GetSaveFile(api_key string, game_id string, download_to string, progressbar bool)

func SubmitSaveFile

func SubmitSaveFile(api_key string, game_id string, upload_from string, progressbar bool)

Types

type ApiCurrentTurn

type ApiCurrentTurn struct {
	Expires      string
	IsFirstTurn  bool
	Number       int
	PlayerNumber int
	Skipped      bool
	Started      string
	TurnId       int
	UserId       int
}

type ApiGamePlayer

type ApiGamePlayer struct {
	TurnOrder int
	UserId    int
}

type ApiGameResponse

type ApiGameResponse struct {
	CurrentTurn ApiCurrentTurn
	GameId      int
	Name        string
	Players     []ApiGamePlayer
}

type ApiGamesResponse

type ApiGamesResponse struct {
	CurrentTotalPoints int
	Games              []ApiGameResponse
	Players            []ApiPlayerResponse
}

func GetMyGames

func GetMyGames(api_key string) ApiGamesResponse

func (ApiGamesResponse) IsMyTurn

func (r ApiGamesResponse) IsMyTurn(game_id string) string

type ApiPlayerResponse

type ApiPlayerResponse struct {
	AvatarUrl    string
	GameId       int
	PersonaName  string
	PersonaState int
	SteamID      int
}

type Game

type Game struct {
	Id      string
	Name    string
	Players []Player // First player is current player
}

func GetGames

func GetGames(game_ids ...string) []Game

type Player

type Player struct {
	Name       string
	Civ        string
	Turn_order int
	Id         string
}

Jump to

Keyboard shortcuts

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