Documentation ¶
Overview ¶
Package apiinterface provides utilities for interacting with the Blade II Online REST API.
Package apiinterface provides utilities for interacting with the Blade II Online REST API.
Package apiinterface provides utilities for interacting with the Blade II Online REST API.
Package apiinterface provides utilities for interacting with the Blade II Online REST API.
Index ¶
Constants ¶
const ( Draw Winner = 0 Player1 = 1 Player2 = 2 )
Enum values that represent the potential winners for a match.
Variables ¶
This section is empty.
Functions ¶
func GetURL ¶
GetURL constructs and returns the URL for the specified endpoint of the Blade II Online REST API.
func UpdateMatchStats ¶
UpdateMatchStats synchronously sends a request to the API server to update the MMR, as well as the w/d/l for the specified players, based on the winner.
Fails silently (for the client) but logs to console.
Types ¶
type MMRUpdateRequest ¶
type MMRUpdateRequest struct { Player1ID uint64 `json:"player1id"` Player2ID uint64 `json:"player2id"` Winner Winner `json:"winner"` }
MMRUpdateRequest describes the data needed to update the MMR for a pair of users.