etf2l

package module
v0.0.0-...-f25528b Latest Latest
Warning

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

Go to latest
Published: May 8, 2025 License: MIT Imports: 15 Imported by: 1

README

ETF2L

This package provides a very simple golang wrapper around the ETF2L API V2. V1 is not supported whatsoever. The internal http client includes basic rate limiting support.

Documentation

Index

Constants

View Source
const (
	Active = iota
	Archived
)

Variables

View Source
var (
	ErrNotFound  = errors.New("Not found (404)")
	ErrEOF       = errors.New("End of results")
	ErrNoResults = errors.New("no rows in result set")
)

Functions

This section is empty.

Types

type ArchivedState

type ArchivedState int

type Ban

type Ban struct {
	Start     int             `json:"start"`
	End       int             `json:"end"`
	Name      string          `json:"name"`
	Steamid   string          `json:"steamid"`
	Steamid64 steamid.SteamID `json:"steamid64"`
	Profile   string          `json:"profile"`
	Expired   bool            `json:"expired"`
	Reason    string          `json:"reason"`
}

type BanOpts

type BanOpts struct {
	Recursive
	PlayerID int    `url:"player,omitempty"` // etf2l player id only, no steamid
	Status   string `url:"status,omitempty"` // 'active' or 'expired'
	Reason   string `url:"reason,omitempty"` // 'VAC`
}

type BanReason

type BanReason struct {
	Start  int    `json:"start"`
	End    int    `json:"end"`
	Reason string `json:"reason"`
}

type BaseOpts

type BaseOpts struct {
	Recursive bool `url:"-"`
}

func (BaseOpts) IsRecursive

func (opts BaseOpts) IsRecursive() bool

type Clan

type Clan struct {
	Country string `json:"country"`
	Drop    bool   `json:"drop"`
	ID      int    `json:"id"`
	Name    string `json:"name"`
	Steam   struct {
		Avatar string `json:"avatar"`
		Group  string `json:"group"`
	} `json:"steam"`
	URL string `json:"url"`
}

type Client

type Client struct {
	sync.RWMutex
}

func New

func New() *Client

func (*Client) Bans

func (client *Client) Bans(ctx context.Context, httpClient HTTPExecutor, opts BanOpts) ([]Ban, error)

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) Demos

func (client *Client) Demos(ctx context.Context, httpClient HTTPExecutor, opts Recursive) ([]Demo, error)

func (*Client) MatchDetails

func (client *Client) MatchDetails(ctx context.Context, httpClient HTTPExecutor, leagueMatchID int) (*MatchDetails, error)

func (*Client) Matches

func (client *Client) Matches(ctx context.Context, httpClient HTTPExecutor, opts Recursive) ([]Match, int, error)

func (*Client) MatchesPage

func (client *Client) MatchesPage(ctx context.Context, httpClient HTTPExecutor, page int, limit int) (*MatchesResponse, error)

func (*Client) Player

func (client *Client) Player(ctx context.Context, httpClient HTTPExecutor, playerID string) (*Player, 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) Team

func (client *Client) Team(ctx context.Context, httpClient HTTPExecutor, teamID int) (*Team, 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

func (client *Client) Whitelists(ctx context.Context, httpClient HTTPExecutor) (map[string]Whitelist, error)

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 CompetitionInfo struct {
	Category string `json:"category"`
	ID       int    `json:"id"`
	Name     string `json:"name"`
	Type     string `json:"type"`
	URL      string `json:"url"`
}

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 CompetitionMatchClan struct {
	Country string `json:"country"`
	Drop    bool   `json:"drop"`
	ID      int    `json:"id"`
	Name    string `json:"name"`
	Steam   struct {
		Avatar string `json:"avatar"`
		Group  string `json:"group"`
	} `json:"steam"`
	URL string `json:"url"`
}

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 CompetitionTeam struct {
	ID      int        `json:"id"`
	Country string     `json:"country"`
	Name    string     `json:"name"`
	Dropped int        `json:"dropped"`
	Steam   SteamGroup `json:"steam"`
	URL     string     `json:"url"`
}

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 DemoOpts

type DemoOpts struct {
	Recursive
	PlayerID string   `url:"player,omitempty"`
	Type     []string `url:"type,omitempty"` // stv, first_person
	Pruned   bool     `url:"pruned,omitempty"`
	From     int      `url:"from,omitempty"` // unixtime start
	To       int      `url:"to,omitempty"`   // unixtime end
}

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 Division

type Division struct {
	ID           int    `json:"id"`
	Name         string `json:"name"`
	SkillContrib int    `json:"skill_contrib"`
	Tier         int    `json:"tier"`
}

type HTTPExecutor

type HTTPExecutor interface {
	Do(req *http.Request) (*http.Response, error)
}

type IRC

type IRC struct {
	Channel string `json:"channel"`
	Network string `json:"network"`
}

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 MatchClan

type MatchClan struct {
	Country string `json:"country"`
	Drop    bool   `json:"drop"`
	ID      int    `json:"id"`
	Name    string `json:"name"`
	Steam   struct {
		Avatar string `json:"avatar"`
		Group  string `json:"group"`
	} `json:"steam"`
	URL string `json:"url"`
}

type MatchCompetition

type MatchCompetition struct {
	Category string `json:"category"`
	ID       int    `json:"id"`
	Name     string `json:"name"`
	Type     string `json:"type"`
	URL      string `json:"url"`
}

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 MatchMapResult struct {
	MatchOrder int    `json:"match_order"`
	Clan1      int    `json:"clan1"`
	Clan2      int    `json:"clan2"`
	Map        string `json:"map"`
	GoldenCap  bool   `json:"golden_cap"`
}

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"`
}

func (MatchesResponse) NextURL

func (resp MatchesResponse) NextURL(r Recursive) (string, error)

type Meta

type Meta struct {
	CurrentPage int     `json:"current_page"`
	From        int     `json:"from"`
	LastPage    int     `json:"last_page"`
	Links       []links `json:"links"`
	Path        string  `json:"path"`
	PerPage     int     `json:"per_page"`
	To          int     `json:"to"`
	Total       int     `json:"total"`
}

type PagedResult

type PagedResult interface {
	NextURL(r Recursive) (string, error)
}

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 PlayerResponse struct {
	Player Player `json:"player"`
	Status Status `json:"status"`
}

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 PlayerResultClan struct {
	Country string `json:"country"`
	Drop    bool   `json:"drop"`
	ID      int    `json:"id"`
	Name    string `json:"name"`
	Steam   struct {
		Avatar string `json:"avatar"`
		Group  string `json:"group"`
	} `json:"steam"`
	URL       string `json:"url"`
	WasInTeam bool   `json:"was_in_team"`
}

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 RecruitmentComments struct {
	Count int `json:"count"`
	Last  int `json:"last"`
}

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 Recursive

type Recursive interface {
	IsRecursive() bool
}

type Status

type Status struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type SteamGroup

type SteamGroup struct {
	Avatar     string `json:"avatar"`
	SteamGroup string `json:"steam_group"`
}

type SteamPlayer

type SteamPlayer struct {
	Avatar string          `json:"avatar"`
	ID     steamid.SID     `json:"id"`
	ID3    steamid.SID3    `json:"id3"`
	ID64   steamid.SteamID `json:"id64"`
}

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 TeamCompetition struct {
	Category    string   `json:"category"`
	Competition string   `json:"competition"`
	Division    Division `json:"division"`
	URL         string   `json:"url"`
}

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 TeamNameChange struct {
	From string `json:"from"`
	To   string `json:"to"`
	Time int    `json:"time"`
}

type TeamPlayer

type TeamPlayer struct {
	Country string      `json:"country"`
	ID      int         `json:"id"`
	Name    string      `json:"name"`
	Role    string      `json:"role"`
	Steam   SteamPlayer `json:"steam"`
	URL     string      `json:"url"`
}

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"`
}

type URLs

type URLs struct {
	Matches   string `json:"matches"`
	Results   string `json:"results"`
	Self      string `json:"self"`
	Transfers string `json:"transfers"`
}

type Whitelist

type Whitelist struct {
	Filename   string `json:"filename"`
	LastChange int    `json:"last_change"`
	URL        string `json:"url"`
}

Jump to

Keyboard shortcuts

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