battlefy

package
v0.0.0-...-846776f Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindTeam

func FindTeam(tournamentID, name string, t *Team) ([]string, error)

FindTeam returns a list of team names found, or an error if none are found. If only one team is found, the Team will be written to t.

Types

type Player

type Player struct {
	ID   string `json:"_id"`
	PID  string `json:"persistentPlayerID"`
	IGN  string `json:"inGameName"`
	User struct {
		Name  string `json:"username"`
		Accts struct {
			Bnet struct {
				Btag string `json:"battletag"`
			} `'json:"battlenet"`
		} `json:"accounts"`
	} `json:"user"`
	// contains filtered or unexported fields
}

Player stores the Battlefy information about a player.

func (Player) Active

func (p Player) Active() bool

Active returns whether a player is active on their team.

func (Player) Battletag

func (p Player) Battletag() string

Battletag returns a player's battletag, or an empty string if they don't have one.

type Team

type Team struct {
	Players          []Player `json:"players"`
	PersistentTeamID string   `json:"persistentTeamID"`
	PersistentTeam   struct {
		Name                string   `json:"name"`
		Logo                string   `json:"logoUrl"`
		PersistentPlayerIDs []string `json:"persistentPlayerIDs"`
		PersistentCaptainID string   `json:"persistentCaptainID"`
	} `json:"persistentTeam"`
	// contains filtered or unexported fields
}

Team stores a bunch of team metadata.

func FindMatch

func FindMatch(tournamentLink, teamID string, round int) (Team, error)

FindMatch gets info on the opposing team in the given round

func (t Team) Link() string
func (t Team) Logo() string

func (Team) Name

func (t Team) Name() string

Jump to

Keyboard shortcuts

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