Documentation
¶
Index ¶
- Constants
- Variables
- type ArchivedState
- type Ban
- type BanOpts
- type BanReason
- type BaseOpts
- type Clan
- type Client
- func (client *Client) Bans(ctx context.Context, httpClient HTTPExecutor, opts BanOpts) ([]Ban, error)
- func (client *Client) CompetitionDetails(ctx context.Context, httpClient HTTPExecutor, competitionID int) (CompetitionDetails, error)
- func (client *Client) CompetitionList(ctx context.Context, httpClient HTTPExecutor, opts Recursive) ([]Competition, error)
- func (client *Client) CompetitionMatches(ctx context.Context, httpClient HTTPExecutor, competitionID int, ...) ([]CompetitionMatch, error)
- func (client *Client) CompetitionResults(ctx context.Context, httpClient HTTPExecutor, competitionID int, ...) ([]CompetitionResult, error)
- func (client *Client) CompetitionTables(ctx context.Context, httpClient HTTPExecutor, competitionID int) (map[string]CompetitionTable, error)
- func (client *Client) CompetitionTeams(ctx context.Context, httpClient HTTPExecutor, competitionID int, opts BaseOpts) ([]CompetitionTeam, error)
- func (client *Client) Demos(ctx context.Context, httpClient HTTPExecutor, opts Recursive) ([]Demo, error)
- func (client *Client) MatchDetails(ctx context.Context, httpClient HTTPExecutor, leagueMatchID int) (*MatchDetails, error)
- func (client *Client) Matches(ctx context.Context, httpClient HTTPExecutor, opts Recursive) ([]Match, int, error)
- func (client *Client) MatchesPage(ctx context.Context, httpClient HTTPExecutor, page int, limit int) (*MatchesResponse, error)
- func (client *Client) Player(ctx context.Context, httpClient HTTPExecutor, playerID string) (*Player, error)
- func (client *Client) PlayerRecruitment(ctx context.Context, httpClient HTTPExecutor, opts RecruitmentOpts) ([]PlayerRecruitment, error)
- func (client *Client) PlayerResults(ctx context.Context, httpClient HTTPExecutor, playerID string, opts Recursive) ([]PlayerResult, error)
- func (client *Client) PlayerTransfers(ctx context.Context, httpClient HTTPExecutor, playerID int, opts BaseOpts) ([]PlayerTransfer, error)
- func (client *Client) Team(ctx context.Context, httpClient HTTPExecutor, teamID int) (*Team, error)
- func (client *Client) TeamMatches(ctx context.Context, httpClient HTTPExecutor, teamID int, opts Recursive) ([]TeamResult, error)
- func (client *Client) TeamRecruitment(ctx context.Context, httpClient HTTPExecutor, opts RecruitmentOpts) ([]TeamRecruitment, error)
- func (client *Client) TeamResults(ctx context.Context, httpClient HTTPExecutor, teamID int, opts Recursive) ([]TeamResult, error)
- func (client *Client) TeamTransfers(ctx context.Context, httpClient HTTPExecutor, teamID int, opts Recursive) ([]TeamTransfer, error)
- func (client *Client) Whitelists(ctx context.Context, httpClient HTTPExecutor) (map[string]Whitelist, error)
- type Competition
- type CompetitionDetails
- type CompetitionInfo
- type CompetitionMatch
- type CompetitionMatchClan
- type CompetitionOpts
- type CompetitionResult
- type CompetitionTable
- type CompetitionTeam
- type Demo
- type DemoOpts
- type DemoPage
- type Division
- type HTTPExecutor
- type IRC
- type Match
- type MatchClan
- type MatchCompetition
- type MatchDetails
- type MatchMapResult
- type MatchesOpts
- type MatchesResponse
- type Meta
- type PagedResult
- type Player
- type PlayerClasses
- type PlayerRecruitment
- type PlayerResponse
- type PlayerResult
- type PlayerResultClan
- type PlayerTeam
- type PlayerTransfer
- type RecruitmentComments
- type RecruitmentOpts
- type Recursive
- type Status
- type SteamGroup
- type SteamPlayer
- type TablesResponse
- type Team
- type TeamCompetition
- type TeamMatchesOpts
- type TeamNameChange
- type TeamPlayer
- type TeamRecruitment
- type TeamResult
- type TeamTransfer
- type TransferPlayerInfo
- type URLs
- type Whitelist
Constants ¶
View Source
const ( Active = iota Archived )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ArchivedState ¶
type ArchivedState int
type Client ¶
func (*Client) CompetitionDetails ¶
func (client *Client) CompetitionDetails(ctx context.Context, httpClient HTTPExecutor, competitionID int) (CompetitionDetails, error)
func (*Client) CompetitionList ¶
func (client *Client) CompetitionList(ctx context.Context, httpClient HTTPExecutor, opts Recursive) ([]Competition, error)
func (*Client) CompetitionMatches ¶
func (client *Client) CompetitionMatches(ctx context.Context, httpClient HTTPExecutor, competitionID int, opts Recursive) ([]CompetitionMatch, error)
func (*Client) CompetitionResults ¶
func (client *Client) CompetitionResults(ctx context.Context, httpClient HTTPExecutor, competitionID int, opts Recursive) ([]CompetitionResult, error)
func (*Client) CompetitionTables ¶
func (client *Client) CompetitionTables(ctx context.Context, httpClient HTTPExecutor, competitionID int) (map[string]CompetitionTable, error)
func (*Client) CompetitionTeams ¶
func (client *Client) CompetitionTeams(ctx context.Context, httpClient HTTPExecutor, competitionID int, opts BaseOpts) ([]CompetitionTeam, error)
func (*Client) MatchDetails ¶
func (client *Client) MatchDetails(ctx context.Context, httpClient HTTPExecutor, leagueMatchID int) (*MatchDetails, error)
func (*Client) MatchesPage ¶
func (client *Client) MatchesPage(ctx context.Context, httpClient HTTPExecutor, page int, limit int) (*MatchesResponse, error)
func (*Client) PlayerRecruitment ¶
func (client *Client) PlayerRecruitment(ctx context.Context, httpClient HTTPExecutor, opts RecruitmentOpts) ([]PlayerRecruitment, error)
func (*Client) PlayerResults ¶
func (client *Client) PlayerResults(ctx context.Context, httpClient HTTPExecutor, playerID string, opts Recursive) ([]PlayerResult, error)
func (*Client) PlayerTransfers ¶
func (client *Client) PlayerTransfers(ctx context.Context, httpClient HTTPExecutor, playerID int, opts BaseOpts) ([]PlayerTransfer, error)
func (*Client) TeamMatches ¶
func (client *Client) TeamMatches(ctx context.Context, httpClient HTTPExecutor, teamID int, opts Recursive) ([]TeamResult, error)
func (*Client) TeamRecruitment ¶
func (client *Client) TeamRecruitment(ctx context.Context, httpClient HTTPExecutor, opts RecruitmentOpts) ([]TeamRecruitment, error)
func (*Client) TeamResults ¶
func (client *Client) TeamResults(ctx context.Context, httpClient HTTPExecutor, teamID int, opts Recursive) ([]TeamResult, error)
func (*Client) TeamTransfers ¶
func (client *Client) TeamTransfers(ctx context.Context, httpClient HTTPExecutor, teamID int, opts Recursive) ([]TeamTransfer, error)
func (*Client) Whitelists ¶
type Competition ¶
type Competition struct {
Category string `json:"category"`
Description string `json:"description"`
ID int `json:"id"`
Name string `json:"name"`
Archived bool `json:"archived"`
Type string `json:"type"`
Urls struct {
Matches string `json:"matches"`
Results string `json:"results"`
Self string `json:"self"`
Teams string `json:"teams"`
} `json:"urls"`
}
type CompetitionDetails ¶
type CompetitionDetails struct {
Category string `json:"category"`
Description string `json:"description"`
ID int `json:"id"`
Name string `json:"name"`
Pool []string `json:"pool"`
Archived bool `json:"archived"`
Type string `json:"type"`
Teams struct {
Max int `json:"max"`
Signedup int `json:"signedup"`
} `json:"teams"`
Urls struct {
Matches string `json:"matches"`
Results string `json:"results"`
Self string `json:"self"`
Teams string `json:"teams"`
} `json:"urls"`
}
type CompetitionInfo ¶
type CompetitionMatch ¶
type CompetitionMatch struct {
Clan1 CompetitionMatchClan `json:"clan1"`
Clan2 CompetitionMatchClan `json:"clan2"`
Competition struct {
Category string `json:"category"`
ID int `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
URL string `json:"url"`
} `json:"competition"`
Defaultwin bool `json:"defaultwin"`
Division struct {
ID int `json:"id"`
Name string `json:"name"`
Tier int `json:"tier"`
} `json:"division"`
ID int `json:"id"`
Maps []string `json:"maps"`
Result struct {
R1 int `json:"r1"`
R2 int `json:"r2"`
} `json:"result"`
Round string `json:"round"`
Time interface{} `json:"time"`
Week int `json:"week"`
SkillContrib int `json:"skill_contrib"`
}
type CompetitionMatchClan ¶
type CompetitionOpts ¶
type CompetitionOpts struct {
Recursive
Archived ArchivedState `url:"archived,omitempty"` // 1 Returns only archived competitions, 0 returns non-archived competitions.
Name string `url:"name,omitempty"`
Description string `url:"description,omitempty"`
Category string `url:"category,omitempty"`
CompType string `url:"comp_type,omitempty"`
TeamType string `url:"team_type,omitempty"`
Competition string `url:"competition,omitempty"`
}
type CompetitionResult ¶
type CompetitionResult struct {
Clan1 Clan `json:"clan1"`
Clan2 Clan `json:"clan2"`
Competition CompetitionInfo `json:"competition"`
Defaultwin bool `json:"defaultwin"`
Division Division `json:"division"`
ID int `json:"id"`
Maps []string `json:"maps"`
R1 int `json:"r1"`
R2 int `json:"r2"`
Round string `json:"round"`
Time interface{} `json:"time"`
Week int `json:"week"`
}
type CompetitionTable ¶
type CompetitionTable struct {
CompetitionID int `json:"competition_id"`
TeamID int `json:"id"`
Drop bool `json:"drop"`
DivisionID int `json:"division_id"`
DivisionName string `json:"division_name"`
Country string `json:"country"`
Name string `json:"name"`
MapsPlayed int `json:"maps_played"`
MapsWon int `json:"maps_won"`
GcWon int `json:"gc_won"`
GcLost int `json:"gc_lost"`
MapsLost int `json:"maps_lost"`
PenaltyPoints int `json:"penalty_points"`
Score int `json:"score"`
Ach int `json:"ach"`
Byes int `json:"byes"`
SeededPoints int `json:"seeded_points"`
}
type CompetitionTeam ¶
type Demo ¶
type Demo struct {
ID int `json:"id"`
Time int `json:"time"`
Match int `json:"match"`
DownloadURL string `json:"download_url"`
Stv bool `json:"stv"`
FirstPerson bool `json:"first_person"`
Downloads int `json:"downloads"`
Owner int `json:"owner"`
OwnerName string `json:"owner_name"`
Pruned bool `json:"pruned"`
File string `json:"file"`
Extension string `json:"extension"`
}
type DemoPage ¶
type DemoPage struct {
CurrentPage int `json:"current_page"`
Data []Demo `json:"data"`
FirstPageURL string `json:"first_page_url"`
From int `json:"from"`
LastPage int `json:"last_page"`
LastPageURL string `json:"last_page_url"`
Links []links `json:"links"`
NextPageURL *string `json:"next_page_url"`
Path string `json:"path"`
PerPage int `json:"per_page"`
PrevPageURL *string `json:"prev_page_url"`
To int `json:"to"`
Total int `json:"total"`
}
type Match ¶
type Match struct {
Clan1 MatchClan `json:"clan1"`
Clan2 MatchClan `json:"clan2"`
Competition MatchCompetition `json:"competition"`
Submitted int `json:"submitted"`
Defaultwin bool `json:"defaultwin"`
Division Division `json:"division"`
ID int `json:"id"`
Maps []string `json:"maps"`
R1 int `json:"r1"`
R2 int `json:"r2"`
Round string `json:"round"`
Time int `json:"time"`
Week int `json:"week"`
Urls struct {
Self string `json:"self"`
API string `json:"api"`
} `json:"urls"`
}
type MatchCompetition ¶
type MatchDetails ¶
type MatchDetails struct {
Clan1 MatchClan `json:"clan1"`
Clan2 MatchClan `json:"clan2"`
Competition MatchCompetition `json:"competition"`
Defaultwin bool `json:"defaultwin"`
Division interface{} `json:"division"`
ID int `json:"id"`
Maps []string `json:"maps"`
R1 int `json:"r1"`
R2 int `json:"r2"`
Round string `json:"round"`
Time int `json:"time"`
Submitted int `json:"submitted"`
Week int `json:"week"`
Urls struct {
Self string `json:"self"`
API string `json:"api"`
} `json:"urls"`
Players []interface{} `json:"players"`
ByeWeek bool `json:"bye_week"`
Demos []interface{} `json:"demos"`
MapResults []MatchMapResult `json:"map_results"`
}
type MatchMapResult ¶
type MatchesOpts ¶
type MatchesOpts struct {
BaseOpts
Clan1 int `url:"clan1,omitempty"` // Team TeamID of the blu team.
Clan2 int `url:"clan2,omitempty"` // Team TeamID of the red team.
Vs int `url:"vs,omitempty"` // Team TeamID of either team.
Scheduled int `url:"scheduled,omitempty"` // If set to 1, returns matches that have yet to be played. If set to 0, returns matches that are over.
Competition int `url:"competition,omitempty"` // Limit your search to a specific competition. Expects a competition TeamID.
From int `url:"from,omitempty"` // UNIX timestamp that limits results to everything after the timestamp.
To int `url:"to,omitempty"` // UNIX timestamp that limits results to everything before the time.
Division string `url:"division,omitempty"` // Name of the division in which the competition was played.
TeamType string `url:"team_type,omitempty"` // Name of the type of team.
Round string `url:"round,omitempty"` // Name of the current round.
Players []string `url:"players,omitempty"` // A list of ETF2L user TeamID's. Returns only matches in which any of the provided players participated.
}
type MatchesResponse ¶
type MatchesResponse struct {
Pager pagedMatches `json:"results"`
Status Status `json:"status"`
}
type PagedResult ¶
type Player ¶
type Player struct {
Bans []BanReason `json:"bans"`
Classes PlayerClasses `json:"classes"`
Country string `json:"country"`
ID int `json:"id"`
Name string `json:"name"`
Registered int `json:"registered"`
Steam SteamPlayer `json:"steam"`
Teams []PlayerTeam `json:"teams"`
Title string `json:"title"`
Urls struct {
Results string `json:"results"`
Self string `json:"self"`
Transfers string `json:"transfers"`
} `json:"urls"`
}
type PlayerClasses ¶
type PlayerClasses []string
func (*PlayerClasses) UnmarshalJSON ¶
func (f *PlayerClasses) UnmarshalJSON(data []byte) error
type PlayerRecruitment ¶
type PlayerRecruitment struct {
Classes PlayerClasses `json:"classes"`
Comments RecruitmentComments `json:"comments"`
ID int `json:"id"`
Name string `json:"name"`
Skill string `json:"skill"`
Steam SteamPlayer `json:"steam"`
Type string `json:"type"`
Urls struct {
Player string `json:"player"`
Recruitment string `json:"recruitment"`
} `json:"urls"`
}
type PlayerResponse ¶
type PlayerResult ¶
type PlayerResult struct {
Clan1 PlayerResultClan `json:"clan1"`
Clan2 PlayerResultClan `json:"clan2"`
Competition MatchCompetition `json:"competition"`
Defaultwin bool `json:"defaultwin"`
Division Division `json:"division"`
Result int `json:"result"`
Maps []string `json:"maps"`
Merced bool `json:"merced"`
R1 int `json:"r1"`
R2 int `json:"r2"`
Round string `json:"round"`
Time int `json:"time"`
Week int `json:"week"`
}
type PlayerResultClan ¶
type PlayerTeam ¶
type PlayerTeam struct {
Competitions map[string]TeamCompetition `json:"competitions"`
Country string `json:"country"`
Homepage string `json:"homepage"`
ID int `json:"id"`
Irc IRC `json:"irc"`
Name string `json:"name"`
Server *string `json:"server"`
Steam SteamGroup `json:"steam"`
Tag string `json:"tag"`
Type string `json:"teamType"`
Urls URLs `json:"urls"`
}
type PlayerTransfer ¶
type PlayerTransfer struct {
By struct {
Country string `json:"country"`
ID int `json:"id"`
Name string `json:"name"`
Steam SteamPlayer `json:"steam"`
URL string `json:"url"`
} `json:"by"`
Team struct {
ID int `json:"id"`
Name string `json:"name"`
Steam struct {
Avatar string `json:"avatar"`
Group string `json:"group"`
} `json:"steam"`
Type string `json:"type"`
URL string `json:"url"`
} `json:"team"`
Time int `json:"time"`
Type string `json:"type"`
}
type RecruitmentComments ¶
type RecruitmentOpts ¶
type RecruitmentOpts struct {
BaseOpts
// Returns only recruitment posts of a specific country.
Country string `url:"country,omitempty"`
// Returns only recruitment posts of a specific class. Can be provided as string or as a list.
// In order to search for multiple classes, provide the argument in an array/list format.
Class []string `url:"class,omitempty"`
// Returns only recruitment posts for a certain skill level. Can be provided as string or as a list.
// In order to search for multiple skill levels, provide the argument in an array/list format.
Skill []string `url:"skill,omitempty"`
// Limit recruitment posts by team type.
Type string `url:"type,omitempty"`
// Limit recruitment posts by ETF2L user id. Is the creator of the post.
User int `url:"user,omitempty"`
}
type SteamGroup ¶
type SteamPlayer ¶
type TablesResponse ¶
type TablesResponse struct {
Tables map[string]CompetitionTable
}
type Team ¶
type Team struct {
Competitions map[string]TeamCompetition `json:"competitions"`
Country string `json:"country"`
Homepage string `json:"homepage"`
ID int `json:"id"`
Irc struct {
Channel string `json:"channel"`
Network string `json:"network"`
} `json:"irc"`
Name string `json:"name"`
Server string `json:"server"`
Steam SteamGroup `json:"steam"`
Tag string `json:"tag"`
Urls struct {
Matches string `json:"matches"`
Results string `json:"results"`
Self string `json:"self"`
Transfers string `json:"transfers"`
} `json:"urls"`
Players []TeamPlayer `json:"players"`
NameChanges []TeamNameChange `json:"name_changes"`
}
type TeamCompetition ¶
type TeamMatchesOpts ¶
type TeamMatchesOpts struct {
Recursive
// Team TeamID of the blu team.
Clan1 int `url:"clan1,omitempty"`
// Team TeamID of the red team.
Clan2 int `url:"clan2,omitempty"`
// Team TeamID of either team.
Vs int `url:"vs,omitempty"`
// If set to 1, returns matches that have yet to be played. If set to 0, returns matches that are over.
Scheduled int `url:"scheduled,omitempty"`
// Limit your search to a specific competition. Expects a competition TeamID.
Competition int `url:"competition,omitempty"`
// UNIX timestamp that limits results to everything after the timestamp.
From int `url:"from,omitempty"`
// UNIX timestamp that limits results to everything before the time.
To int `url:"to,omitempty"`
// Name of the division in which the competition was played.
Division string `url:"division,omitempty"`
// Name of the type of team.
TeamType string `url:"team_type,omitempty"`
// Name of the current round.
Round string `url:"round,omitempty"`
// A list of ETF2L user TeamID's. Returns only matches in which any of the provided players participated.
Players []int `url:"players,omitempty"`
}
type TeamNameChange ¶
type TeamPlayer ¶
type TeamRecruitment ¶
type TeamRecruitment struct {
Classes PlayerClasses `json:"classes"`
Comments RecruitmentComments `json:"comments"`
ID int `json:"id"`
Name string `json:"name"`
Skill string `json:"skill"`
Steam SteamPlayer `json:"steam"`
Type string `json:"type"`
Urls struct {
Team string `json:"team"`
Recruitment string `json:"recruitment"`
} `json:"urls"`
}
type TeamResult ¶
type TeamResult struct {
Clan1 Clan `json:"clan1"`
Clan2 Clan `json:"clan2"`
Competition CompetitionInfo `json:"competition"`
Defaultwin bool `json:"defaultwin"`
Division Division `json:"division"`
Result int `json:"result"`
Maps []string `json:"maps"`
R1 int `json:"r1"`
R2 int `json:"r2"`
Round string `json:"round"`
Time int `json:"time"`
Week int `json:"week"`
}
type TeamTransfer ¶
type TeamTransfer struct {
Who TransferPlayerInfo `json:"who"`
By TransferPlayerInfo `json:"by"`
Team struct {
ID int `json:"id"`
Name string `json:"name"`
Steam struct {
Avatar string `json:"avatar"`
Group string `json:"group"`
} `json:"steam"`
Type string `json:"type"`
URL string `json:"url"`
} `json:"team"`
Time int `json:"time"`
Type string `json:"type"`
}
type TransferPlayerInfo ¶
type TransferPlayerInfo struct {
Country string `json:"country"`
ID int `json:"id"`
Name string `json:"name"`
Steam SteamPlayer `json:"steam"`
URL string `json:"url"`
}
Click to show internal directories.
Click to hide internal directories.