Documentation
¶
Index ¶
- func DownloadFile(filepath string, url string) (bytes int64, err error)
- type Api
- func (api *Api) GetLatestMaps() ([]LatestMapElement, error)
- func (api *Api) GetLatestRuns() ([]LatestRunElement, error)
- func (api *Api) GetMapInformation(mapname string) (MapInfos, error)
- func (api *Api) GetMapsWithPattern(criteria string) []string
- func (api *Api) GetPersonalBestInformation(mapname string, guid string) (PersonalBestInfos, error)
- func (api *Api) GetServerStatus() (ServersListStatus, error)
- func (api *Api) GetToprunsInformation(mapname string) (ToprunsInfos, error)
- func (api *Api) MapSync() error
- func (api *Api) PostRunDemo(p models.PlayerRunInfo, demoDirectory string) (SendDemoResponse, error)
- func (api *Api) PostRunWithoutDemo(demoBody *DemoBody) (SendDemoResponse, error)
- func (api *Api) UjmGetWithBody(url string, body io.Reader) (resp *http.Response, err error)
- type DemoBody
- type LatestMapElement
- type LatestRunElement
- type MapInfos
- type MapSearchResult
- type PersonalBestElement
- type PersonalBestInfos
- type RunPlayerInfos
- type SendDemoResponse
- type ServerStatus
- type ServersListStatus
- type ToprunsInfos
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Api ¶
type Api struct {
BridgeUrl string
BridgeLocalUrl string
UjmUrl string
Apikey string
Client http.Client
ServerUrl string
}
func (*Api) GetLatestMaps ¶
func (api *Api) GetLatestMaps() ([]LatestMapElement, error)
func (*Api) GetLatestRuns ¶
func (api *Api) GetLatestRuns() ([]LatestRunElement, error)
func (*Api) GetMapsWithPattern ¶
func (*Api) GetPersonalBestInformation ¶
func (api *Api) GetPersonalBestInformation(mapname string, guid string) (PersonalBestInfos, error)
func (*Api) GetServerStatus ¶
func (api *Api) GetServerStatus() (ServersListStatus, error)
func (*Api) GetToprunsInformation ¶
func (api *Api) GetToprunsInformation(mapname string) (ToprunsInfos, error)
func (*Api) PostRunDemo ¶
func (api *Api) PostRunDemo(p models.PlayerRunInfo, demoDirectory string) (SendDemoResponse, error)
func (*Api) PostRunWithoutDemo ¶
func (api *Api) PostRunWithoutDemo(demoBody *DemoBody) (SendDemoResponse, error)
type DemoBody ¶
type DemoBody struct {
Playerguid string `json:"playerguid"`
Playername string `json:"playername"`
Serverip string `json:"serverip"`
Servername string `json:"servername"`
Serverfps string `json:"serverfps"`
Runtime string `json:"runtime"`
Mapfilename string `json:"mapfilename"`
Waynumber string `json:"waynumber"`
Apikey string `json:"apikey"`
PlayerIp string `json:"playerip"`
}
type LatestMapElement ¶
type LatestRunElement ¶
type MapSearchResult ¶
type MapSearchResult struct {
Matching []string `json:"matching"`
}
type PersonalBestElement ¶
type PersonalBestElement struct {
Run RunPlayerInfos `json:"run"`
Rank string `json:"rank"`
Wayname string `json:"wayname"`
}
type PersonalBestInfos ¶
type PersonalBestInfos struct {
Id int `json:"mapid"`
Filename string `json:"mapfilename"`
Mapname string `json:"mapname"`
RunsInfos []PersonalBestElement `json:"runs"`
}
type RunPlayerInfos ¶
type SendDemoResponse ¶
type ServerStatus ¶
type ServersListStatus ¶
type ServersListStatus []map[string]ServerStatus
type ToprunsInfos ¶
type ToprunsInfos struct {
Id int `json:"mapid"`
Filename string `json:"mapfilename"`
Mapname string `json:"mapname"`
RunsInfos map[string][]RunPlayerInfos `json:"runs"`
}
Click to show internal directories.
Click to hide internal directories.