structs

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package structs contains the structs AbiosGaming/sdk uses to unmarshal JSON.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenStruct

type AccessTokenStruct struct {
	AccessToken string `json:"access_token"`
	TokenType   string `json:"token_type"`
	ExpiresIn   int64  `json:"expires_in"`
}

AccessTokenStruct holds information about an access token.

type BracketPositionStruct

type BracketPositionStruct struct {
	Part    string        `json:"part,omitempty"`
	Col     int64         `json:"col"`
	Offset  int64         `json:"offset"`
	Seeding SeedingStruct `json:"seeding,omitempty"`
}

BracketPosition represents a Series position in a Substages bracket.

type CasterStruct

type CasterStruct struct {
	Name    string        `json:"name,omitempty"`
	Type    *int64        `json:"type,omitempty"`
	Url     string        `json:"url,omitempty"`
	Stream  StreamStruct  `json:"stream,omitempty"`
	Country CountryStruct `json:"country,omitempty"`
}

CasterStruct represents an individual shoutcaster, casting a Series.

type CountryImagesStruct

type CountryImagesStruct struct {
	Default   string `json:"default,omitempty"`
	Thumbnail string `json:"thumbnail,omitempty"`
}

CountryImagesStruct represents the different keys for images a CountryStruct can contain

type CountryStruct

type CountryStruct struct {
	Name      string              `json:"name,omitempty"`
	ShortName string              `json:"short_name,omitempty"`
	Images    CountryImagesStruct `json:"images,omitempty"`
}

CountryStruct hold information about a country, nationality or language * associated with a resource.

type CsMatchSummaryStruct

type CsMatchSummaryStruct struct {
	Home       int64 `json:"home"`
	Away       int64 `json:"away"`
	ScoreBoard struct {
		Home []CsScoreBoardEntry `json:"home"`
		Away []CsScoreBoardEntry `json:"away"`
	} `json:"scoreboard"`
	Rounds []struct {
		RoundNr    int64  `json:"round_nr"`
		TSide      int64  `json:"t_side"`
		CtSide     int64  `json:"ct_side"`
		Winner     int64  `json:"winner"`
		WinReason  string `json:"win_reason"`
		BombEvents []struct {
			Type       string    `json:"type"`
			PlayerId   int64     `json:"player_id"`
			RoundClock int64     `json:"round_clock"`
			Pos        PosStruct `json:"pos"`
		} `json:"bomb_events"`
		Kills []struct {
			RoundClock int64 `json:"round_clock"`
			Damage     int64 `json:"damage"`
			Attacker   struct {
				PlayerId int64     `json:"player_id"`
				Pos      PosStruct `json:"pos"`
			} `json:"attacker"`
			Victim struct {
				PlayerId int64     `json:"player_id"`
				Pos      PosStruct `json:"pos"`
			} `json:"victim"`
			Assists  *int64       `json:"assist"`
			Weapon   WeaponStruct `json:"weapon"`
			HitGroup string       `json:"hit_group"`
		} `json:"kills"`
		PlayerStats struct {
			TSide  []RoundPlayerStatsStruct `json:"t_side"`
			CtSide []RoundPlayerStatsStruct `json:"ct_side"`
		} `json:"player_stats"`
	} `json:"rounds"`
}

CsMatchSummaryStruct is the summarization of a CS:GO match.

type CsPlayerPerformanceStruct

type CsPlayerPerformanceStruct struct {
	Kills    float64 `json:"kills"`
	Assists  float64 `json:"assists"`
	Deaths   float64 `json:"deaths"`
	History  int64   `json:"history"`
	Accuracy struct {
		General  float64 `json:"general"`
		Headshot float64 `json:"head_shot"`
	} `json:"accuracy"`
}

CsPlayerPerformanceStruct holds some general data about a players performance. This struct is re-used for different levels data (e.g per_map and over_all).

type CsPlayerPlayByPlayStatsStruct

type CsPlayerPlayByPlayStatsStruct struct {
	Overall struct {
		CsPlayerPerformanceStruct
		Plants  float64 `json:"plants"`
		Defuses float64 `json:"defuses"`
	} `json:"over_all"`
	PerMap []struct {
		Map    MapStruct `json:"map"`
		CtSide struct {
			CsPlayerPerformanceStruct
			Defuses float64 `json:"defuses"`
		} `json:"ct_side"`
		TSide struct {
			CsPlayerPerformanceStruct
			Plants float64 `json:"plants"`
		} `json:"t_side"`
		Overall struct {
			CsPlayerPerformanceStruct
		} `json:"over_all"`
	} `json:"per_map"`
	PerWeapon []struct {
		Weapon        WeaponStruct `json:"weapon"`
		DmgGivenRound int64        `json:"dmg_given_round"`
		Accuracy      struct {
			General  float64 `json:"general"`
			Headshot float64 `json:"head_shot"`
		} `json:"accuracy"`
		History int64 `json:"history"`
	} `json:"per_weapon"`
}

CsPlayerByPlayStatsStruct holds play by play stats for cs players

type CsScoreBoardEntry

type CsScoreBoardEntry struct {
	PlayerId int64   `json:"player_id"`
	Kills    int64   `json:"kills"`
	Assists  int64   `json:"assists"`
	Deaths   int64   `json:"deaths"`
	Adr      float64 `json:"adr"`
}

CsScoreBoardEntry reflects a CS:GO scoreboard entry.

type CsTeamCommonStatsStruct

type CsTeamCommonStatsStruct struct {
	NrMatches      int64   `json:"nr_matches"`
	CtRounds       int64   `json:"ct_rounds"`
	CtWins         int64   `json:"ct_wins"`
	TRounds        int64   `json:"t_rounds"`
	TWins          int64   `json:"t_wins"`
	PistolRounds   int64   `json:"pistol_rounds"`
	PistolWins     int64   `json:"pistol_wins"`
	FirstKillRate  float64 `json:"first_kill_rate"`
	FirstDeathRate float64 `json:"first_death_rate"`
}

CsTeamCommonStatsStruct holds information common to multiple JSON objects.

type CsTeamPlayByPlayStatsStruct

type CsTeamPlayByPlayStatsStruct struct {
	Totals struct {
		Kills  int64 `json:"kills"`
		Deaths int64 `json:"deaths"`
		CsTeamCommonStatsStruct
	} `json:"totals"`
	Maps []struct {
		Map MapStruct `json:"map"`
		CsTeamCommonStatsStruct
	} `json:"maps"`
	Marksman []struct {
		PlayerId int64        `json:"player_id"`
		Adr      float64      `json:"adr"`
		Weapon   WeaponStruct `json:"weapon"`
	} `json:"marksman"`
}

CsTeamPlayByPlayStruct holds data about a team play by play stats for cs

type DefaultRosterStruct

type DefaultRosterStruct struct {
	From   string       `json:"from,omitempty"`
	To     *string      `json:"to,omitempty"`
	Roster RosterStruct `json:"roster,omitempty"`
}

DefaultRosterStruct represents the time period(s) when a Roster has been a Team's * main roster or line-up.

type DotaDmg

type DotaDmg struct {
	HpRemoval   int64 `json:"hp_removal"`
	MagicalDmg  int64 `json:"magical_dmg"`
	PhysicalDmg int64 `json:"physical_dmg"`
	PureDmg     int64 `json:"pure_dmg"`
}

DotaDmg is a collection of different types of damages given/taken in dota.

type DotaHeroWithAmountStruct

type DotaHeroWithAmountStruct struct {
	Amount int64      `json:"amount"`
	Hero   HeroStruct `json:"hero"`
}

DotaHeroWithAmountStruct holds information about a Dota Hero and an integer representing and amount (e.g amount of times picked).

type DotaMatchSummaryStruct

type DotaMatchSummaryStruct struct {
	RadiantRoster int64 `json:"radiant_roster"`
	DireRoster    int64 `json:"dire_roster"`
	MatchLength   int64 `json:"match_length"`
	DraftSeq      []struct {
		Order    int64      `json:"order"`
		Type     string     `json:"type"`
		RosterId int64      `json:"roster_id"`
		Hero     HeroStruct `json:"hero"`
	} `json:"draft_seq"`
	FirstBlood struct {
		Killer  int64   `json:"killer"`
		Victim  int64   `json:"victim"`
		AtTime  int64   `json:"at_time"`
		Assists []int64 `json:"assists"`
	} `json:"first_blood"`
	Kills []struct {
		Killer  int64   `json:"killer"`
		Victim  int64   `json:"victim"`
		AtTime  int64   `json:"at_time"`
		Assists []int64 `json:"assists"`
	} `json:"kills"`
	StructureDest []struct {
		Killer        int64  `json:"killer"`
		StructureType string `json:"structure_type"`
		StructurePos  string `json:"structure_pos"`
		AtTime        int64  `json:"at_time"`
	} `json:"structure_dest"`
	PlayerStats []struct {
		PlayerId    int64            `json:"player_id"`
		Hero        HeroStruct       `json:"hero"`
		Kills       int64            `json:"kills"`
		Deaths      int64            `json:"deaths"`
		Assists     int64            `json:"assists"`
		Gpm         float64          `json:"gpm"`
		Xpm         float64          `json:"xpm"`
		Levels      map[string]int64 `json:"levels"`
		CreepKills  int64            `json:"creep_kills"`
		CreepDenies int64            `json:"creep_denies"`
		HeroDmg     struct {
			Given struct {
				ByHero DotaDmg `json:"by_hero"`
				ByMob  DotaDmg `json:"by_mob"`
			} `json:"given"`
			Taken struct {
				FromHeroes DotaDmg `json:"from_heroes"`
				FromMobs   DotaDmg `json:"from_mobs"`
			} `json:"taken"`
		} `json:"hero_dmg"`
	} `json:"player_stats"`
	RoshanEvents []struct {
		Type   string `json:"type"`
		Killer int64  `json:"killer"`
		AtTime int64  `json:"at_time"`
	} `json:"roshan_events"`
}

DotaMatchSummaryStruct is the summarization of a Dota match.

type DotaPlayerAgainstStruct

type DotaPlayerAgainstStruct struct {
	PlayerAgainstStruct
	Hero HeroStruct `json:"hero"`
}

DotaPlayerAgainstStruct is a grouping of PlayerAgainstStruct and a HeroStruct

type DotaPlayerPerformanceStruct

type DotaPlayerPerformanceStruct struct {
	Matches        int64   `json:"matches"`
	Wins           int64   `json:"wins"`
	AvgKills       float64 `json:"avg_kills"`
	AvgDeaths      float64 `json:"avg_deaths"`
	AvgAssists     float64 `json:"avg_assists"`
	AvgCreepKills  float64 `json:"avg_creep_kills"`
	AvgCreepDenies float64 `json:"avg_creep_denies"`
	AvgGpm         float64 `json:"avg_gpm"`
	AvgXpm         float64 `json:"avg_xpm"`
}

DotaPlayerPerformanceStruct holds some data about a a players performance. This struct is re-used for different levels of data (e.g hero_stats and top_hero)

type DotaPlayerPlayByPlayStatsStruct

type DotaPlayerPlayByPlayStatsStruct struct {
	Stats     DotaPlayerPerformanceStruct `json:"stats"`
	HeroStats struct {
		Attribute struct {
			Strength     DotaPlayerPerformanceStruct `json:"strength"`
			Agility      DotaPlayerPerformanceStruct `json:"agility"`
			Intelligence DotaPlayerPerformanceStruct `json:"intelligence"`
		} `json:"attribute"`
		TopHeroes []struct {
			Hero HeroStruct `json:"hero"`
			DotaPlayerPerformanceStruct
		} `json:"top_heroes"`
	} `json:"hero_stats"`
	FactionStats struct {
		Radiant struct {
			Matches int64 `json:"matches"`
			Wins    int64 `json:"wins"`
		} `json:"radiant"`
		Dire struct {
			Matches int64 `json:"matches"`
			Wins    int64 `json:"wins"`
		} `json:"dire"`
	} `json:"faction_stats"`
}

DotaPlayerByPlayStatsStruct holds play by play stats for dota players

type DotaTeamPlayByPlayStatsStruct

type DotaTeamPlayByPlayStatsStruct struct {
	FactionStats struct {
		Radiant struct {
			Matches int64 `json:"matches"`
			Wins    int64 `json:"wins"`
		} `json:"radiant"`
		Dire struct {
			Matches int64 `json:"matches"`
			Wins    int64 `json:"wins"`
		} `json:"dire"`
	} `json:"faction_stats"`
	Drafts struct {
		Own struct {
			MostPicked []DotaHeroWithAmountStruct `json:"most_picked"`
			MostBanned []DotaHeroWithAmountStruct `json:"most_banned"`
		} `json:"own"`
		Opponenents struct {
			MostPicked []DotaHeroWithAmountStruct `json:"most_picked"`
			MostBanned []DotaHeroWithAmountStruct `json:"most_banned"`
		} `json:"opponents"`
	} `json:"drafts"`
}

DotaTeamPlayByPlayStatsStruct holds data about a teams play by play stats for dota

type ErrorStruct

type ErrorStruct struct {
	Error            string `json:"error,omitempty"`
	ErrorCode        int64  `json:"error_code,omitempty"`
	ErrorDescription string `json:"error_description,omitempty"`
}

ErrorStruct represents an error response from the API.

func (ErrorStruct) String

func (e ErrorStruct) String() (s string)

type ForfeitStruct

type ForfeitStruct map[string]bool

ForfeitStruct contains two items with roster ids as keys mapping to a boolean value * describing whether the roster has forfeited or not.

type GameImagesStruct

type GameImagesStruct struct {
	Square    string `json:"square,omitempty"`
	Circle    string `json:"circle,omitempty"`
	Rectangle string `json:"rectangle,omitempty"`
}

GameImagesStruct represents the different keys for images a GameStruct can contain

type GameStruct

type GameStruct struct {
	Id        int64            `json:"id,omitempty"`
	Title     string           `json:"title,omitempty"`
	LongTitle string           `json:"long_title,omitempty"`
	DeletedAt *string          `json:"deleted_at"` // Datettime
	Images    GameImagesStruct `json:"images,omitempty"`
	Color     string           `json:"color,omitempty"`
}

GameStruct represents the actual game being played in a Series

type GameStructPaginated

type GameStructPaginated struct {
	LastPage    int64        `json:"last_page,omitempty"`
	CurrentPage int64        `json:"current_page,omitempty"`
	Data        []GameStruct `json:"data,omitempty"`
}

GameStructPaginated holds a list of GameStruct as well as information about pages.

type HeroStruct

type HeroStruct struct {
	Name      string `json:"name"`
	Attribute string `json:"attribute"`
	Images    struct {
		Large string `json:"large"`
		Small string `json:"small"`
	} `json:"images"`
}

type IncidentStruct

type IncidentStruct struct {
	SeriesId   int64   `json:"series_id,omitempty"`
	MatchId    *int64  `json:"match_id,omitempty"`
	Comment    string  `json:"comment,omitempty"`
	CreatedAt  string  `json:"created_at,omitempty"`
	UpdatedAt  *string `json:"updated_at"`
	IncidentId int64   `json:"incident_id,omitempty"`
}

IncidentStruct represents an incident.

type IncidentStructPaginated

type IncidentStructPaginated struct {
	LastPage    int64            `json:"last_page,omitempty"`
	CurrentPage int64            `json:"current_page,omitempty"`
	Data        []IncidentStruct `json:"data"`
}

IncidentStructPaginated holds a list of IncidentStruct as well as information about pages

type LinksStruct

type LinksStruct struct {
	Website string `json:"website"`
	Youtube string `json:"youtube"`
}

LinksStruct holds information about links relevant to a Tournament.

type MapStruct

type MapStruct struct {
	Id   int64      `json:"id"`
	Name string     `json:"name,omitempty"`
	Game GameStruct `json:"game,omitempty"`
}

MapStruct represents the map being played in a Match

type MatchPerformanceStruct

type MatchPerformanceStruct struct {
	Winrate MatchWinrateStruct `json:"winrate,omitempty"`
}

MatchPerformanceStruct is associated with a Match and contains performance information about the Rosters with respect to the specific map.

type MatchStruct

type MatchStruct struct {
	Id           int64                  `json:"id,omitempty"`
	Order        int64                  `json:"order,omitempty"`
	Winner       *int64                 `json:"winner"`
	Map          *MapStruct             `json:"map,omitempty"`
	DeletedAt    *string                `json:"deleted_at"`
	Game         GameStruct             `json:"game"`
	HasPbpStats  bool                   `json:"has_pbpstats"`
	Scores       *ScoresStruct          `json:"scores"`
	Forfeit      ForfeitStruct          `json:"forfeit,omitempty"`
	Seeding      SeedingStruct          `json:"seeding,omitempty"`
	Rosters      []RosterStruct         `json:"rosters"`
	Performance  MatchPerformanceStruct `json:"performance,omitempty"`
	MatchSummary *MatchSummaryStruct    `json:"match_summary"` // Play by Play
}

MatchStruct represents an actual map being played between two rosters.

type MatchSummaryStruct

type MatchSummaryStruct struct {
	CsMatchSummaryStruct
	DotaMatchSummaryStruct
}

MatchSummaryStruct holds information about play by play statistics for a certain match.

type MatchWinrateOverallStruct

type MatchWinrateOverallStruct struct {
	History int64              `json:"history,omitempty"`
	Rosters map[string]float64 `json"-"`
}

MatchWinrateOverallStruct holds information about the summarized performance statistics.

func (*MatchWinrateOverallStruct) UnmarshalJSON

func (m *MatchWinrateOverallStruct) UnmarshalJSON(b []byte) (err error)

type MatchWinratePerMapStruct

type MatchWinratePerMapStruct struct {
	Map     MapStruct          `json:"map,omitempty"`
	History int64              `json:"history,omitempty"`
	Rosters map[string]float64 `json:"-"`
}

MatchWinratePerMapStruct breaks down the winrate statistics per Map.

func (*MatchWinratePerMapStruct) UnmarshalJSON

func (m *MatchWinratePerMapStruct) UnmarshalJSON(b []byte) (err error)

type MatchWinrateStruct

type MatchWinrateStruct struct {
	Overall *MatchWinrateOverallStruct `json:"over_all"`
	PerMap  []MatchWinratePerMapStruct `json:"per_map"`
}

MatchWinrateStruct holds the top-level keys for winrate statistics.

type MoneylineStruct

type MoneylineStruct struct {
	Home        float64  `json:"home"`
	HomeBetSlip *string  `json:"home_bet_slip"`
	Away        float64  `json:"away"`
	AwayBetSlip *string  `json:"away_bet_slip"`
	Draw        *float64 `json:"draw"`
	DrawBetSlip *string  `json:"draw_bet_slip"`
}

MoneylineStruct holds information about the mouneyline for a particular sportsbook.

type OrganisationStruct

type OrganisationStruct struct {
	Id    int64        `json:"id,omitempty"`
	Name  string       `json:"name,omitempty"`
	Teams []TeamStruct `json:"teams"`
}

OrganisationStruct represents a logical grouping of Teams across different Games

type OrganisationStructPaginated

type OrganisationStructPaginated struct {
	LastPage    int64                `json:"last_page,omitempty"`
	CurrentPage int64                `json:"current_page,omitempty"`
	Data        []OrganisationStruct `json:"data,omitempty"`
}

OrganisationStructPaginated holds a list of TeamStruct as well as information about pages.

type PlatformImagesStruct

type PlatformImagesStruct struct {
	Default string `json:"default,omitempty"`
}

PlatformImagesStruct represents the different keys for images a PlatformStruct can contain

type PlatformStruct

type PlatformStruct struct {
	Id     int64                `json:"id,omitempty"`
	Name   string               `json:"name,omitempty"`
	Color  string               `json:"color,omitempty"`
	Images PlatformImagesStruct `json:"images,omitempty"`
}

PlatformStruct represents a third party streaming platform.

type PlayerAgainstStruct

type PlayerAgainstStruct struct {
	PlayerId int64       `json:"player_id"`
	Against  *TeamStruct `json:"against"` // Declared as pointer to avoid invalid recursive type
	MatchId  int64       `json:"match_id"`
}

PlayerAgainstStruct is a collection of common data when examining specific stats. It is grouped with the specific stat in another struct.

type PlayerImagesStruct

type PlayerImagesStruct struct {
	Default   string `json:"default,omitempty"`
	Thumbnail string `json:"thumbnail,omitempty"`
	Fallback  bool   `json:"fallback"`
}

PlayerImagesStruct represents the different keys for images a PlayerStruct can contain

type PlayerPlayByPlayStatsStruct

type PlayerPlayByPlayStatsStruct struct {
	CsPlayerPlayByPlayStatsStruct
	DotaPlayerPlayByPlayStatsStruct
}

PlayByPlayStatsStruct holds information about play by play statistics for a certain player.

type PlayerStatsStruct

type PlayerStatsStruct struct {
	SinglePlayer *SinglePlayerStatsStruct     `json:"single_player,omitempty"` // Null when player does not play single player game. Otherwise format is equal to stats for a team
	PlayByPlay   *PlayerPlayByPlayStatsStruct `json:"play_by_play"`
}

PlayerStatsStruct hold performance statistics about a particular Player.

type PlayerStruct

type PlayerStruct struct {
	Id                  int64                      `json:"id,omitempty"`
	FirstName           string                     `json:"first_name"`
	LastName            string                     `json:"last_name"`
	Nickname            string                     `json:"nick_name,omitempty"`
	DeletedAt           *string                    `json:"deleted_at"`
	Images              PlayerImagesStruct         `json:"images,omitempty"`
	Country             *CountryStruct             `json:"country,omitempty"`
	Race                *RaceStruct                `json:"race,omitempty"`
	Team                *TeamStruct                `json:"team,omitempty"`
	PlayerStats         PlayerStatsStruct          `json:"player_stats,omitempty"`
	Rosters             []DefaultRosterStruct      `json:"rosters,omitempty"`
	Game                GameStruct                 `json:"game,omitempty"`
	SocialMediaAccounts []SocialMediaAccountStruct `json:"social_media_accounts,omitempty"`
}

PlayerStruct represents a player that competes in Series' and Matches.

type PlayerStructPaginated

type PlayerStructPaginated struct {
	LastPage    int64          `json:"last_page,omitempty"`
	CurrentPage int64          `json:"current_page,omitempty"`
	Data        []PlayerStruct `json"data,omitempty"`
}

PlayerStructPaginated holds a list of PlayerStruct as well as information about pages.

type PosStruct

type PosStruct struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
	Z float64 `json:"z"`
}

PosStruct hold x, y and z coordinates.

type PrizepoolStruct

type PrizepoolStruct struct {
	Total  string `json:"total,omitempty"`
	First  string `json:"first,omitempty"`
	Second string `json:"second,omitempty"`
	Third  string `json:"third,omitempty"`
}

PrizepoolStruct holds information about a Tournament's prizepool.

type RaceImagesStruct

type RaceImagesStruct struct {
	Default   string `json:"default,omitempty"`
	Thumbnail string `json:"thumbnail,omitempty"`
}

RaceImagesStruct represents the different keys for images a RaceStruct can contain

type RaceStruct

type RaceStruct struct {
	Id     int64            `json:"id,omitempty"`
	GameId int64            `json:"game_id,omitempty"`
	Name   string           `json:"name,omitempty"`
	Images RaceImagesStruct `json:"images,omitempty"`
}

RaceStruct represents a race, faction, class etc. in a Game.

type RosterStatsStruct

type RosterStatsStruct struct {
	Streak struct {
		Match struct {
			StreakScopeStruct // defined in stats.go
		} `json:"match,omitempty"`
	} `json:"streak,omitempty"`
	Winrate struct {
		Match struct {
			WinrateMatchScopeStruct // defined in stats.go
		} `json:"match,omitempty"`
	} `json:"winrate,omitempty"`
	Nemesis *struct {
		Match struct {
			Roster RosterStruct `json:"roster"`
			Losses int64        `json:"losses"`
		} `json:"match,omitempty"`
	} `json:"nemesis"`
	Dominating *struct {
		Match struct {
			Roster RosterStruct `json:"roster`
			Wins   int64        `json:"wins"`
		} `json:"match,omitempty"`
	} `json:"dominating"`
}

RosterStatsStruct hold performance information about a particular Roster.

type RosterStruct

type RosterStruct struct {
	Id          int64              `json:"id,omitempty"`
	Teams       []TeamStruct       `json:"teams,omitempty"`
	Players     []PlayerStruct     `json:"players,omitempty"`
	RosterStats *RosterStatsStruct `json:"roster_stats"`
	Game        GameStruct         `json:"game"`
}

RosterStruct represents a roster (or line-up) in a team game.

type RoundPlayerStatsStruct

type RoundPlayerStatsStruct struct {
	PlayerId int64   `json:"player_id"`
	DmgGiven float64 `json:"dmg_given"`
	DmgTaken float64 `json:"dmg_taken"`
	Kills    int64   `json:"kills"`
	Assists  int64   `json:"assists"`
	Died     bool    `json:"died"`
	Accuracy struct {
		General  float64 `json:"general"`
		Headshot float64 `json:"head_shot"`
	} `json:"accuracy"`
}

RoundPlayerStatsStruct reflects how well a player performed in a round.

type ScoresStruct

type ScoresStruct map[string]int64

ScoresStruct holds informaton about the scores of a particular Match or Series.

type SearchResultStruct

type SearchResultStruct struct {
	Id       int64   `json:"id,omitempty"`
	Matched  string  `json:"matched,omitempty"`
	AltLabel string  `json:"alt_label,omitempty"`
	Type     string  `json:"type,omitempty"`
	GameId   int64   `json:"game_id,omitempty"`
}

SearchResultStruct represents a result from the /search endpoint.

type SeedingStruct

type SeedingStruct struct {
	Top    *int64 `json:"1,omitempty"` // Value is a roster-id
	Bottom *int64 `json:"2,omitempty"` // Value is a roster-id
}

SeedingStruct represents the seeding of two competitors in the related Series.

type SeriesIncidentsStruct

type SeriesIncidentsStruct struct {
	SeriesIncidents []IncidentStruct `json:"series_incidents"`
	MatchIncidents  []IncidentStruct `json:"match_incidents"`
}

SeriesIncidentStruct holds information about all incidents associated with a Series and all it's Matches.

type SeriesPerformanceStruct

type SeriesPerformanceStruct struct {
	PastEncounters    []SeriesStruct            `json:"past_encounters,omitempty"`
	RecentPerformance map[string][]SeriesStruct `json:"recent_performance,omitempty"`
}

SeriesPerformanceStruct is associated with a Series and contains performance information about the Teams or Players participating in the Series.

type SeriesStruct

type SeriesStruct struct {
	Id              int64                   `json:"id,omitempty"`
	Title           string                  `json:"title,omitempty"`
	BestOf          int64                   `json:"bestOf,omitempty"`
	Tier            *int64                  `json:"tier"`
	Start           *string                 `json:"start"`
	End             *string                 `json:"end"`
	PostponedFrom   *string                 `json:"postponed_from"`
	DeletedAt       *string                 `json:"deleted_at"`
	Scores          *ScoresStruct           `json:"scores"`
	Forfeit         ForfeitStruct           `json:"forfeit,omitempty"`
	Streamed        bool                    `json:"streamed"`
	Seeding         SeedingStruct           `json:"seeding,omitempty"`
	Rosters         []RosterStruct          `json:"rosters,omitempty"`
	Game            GameStruct              `json:"game,omitempty"`
	Matches         []MatchStruct           `json:"matches,omitempty"`
	Casters         []CasterStruct          `json:"casters,omitempty"`
	SubstageId      int64                   `json:"substage_id,omitempty"`
	BracketPosition *BracketPositionStruct  `json:"bracket_pos"`
	Tournament      TournamentStruct        `json:"tournament,omitempty"`
	Performance     SeriesPerformanceStruct `json:"performance,omitempty"`
	SportsbookOdds  []SportsbookOddsStruct  `json:"sportsbook_odds"`
	Chain           *[]int64                `json:"chain"`
}

SeriesStruct represents a Series of Matches.

type SeriesStructPaginated

type SeriesStructPaginated struct {
	LastPage    int64          `json:"last_page,omitempty"`
	CurrentPage int64          `json:"current_page,omitempty"`
	Data        []SeriesStruct `json:"data,omitempty"`
}

SeriesStructPaginated holds a list of SeriesStruct as well as information about pages.

type SharedTeamPlayByPlayStatsStruct

type SharedTeamPlayByPlayStatsStruct struct {
	TopStats   SharedTopStatsStruct   `json:"top_stats"`
	TopMatches SharedTopMatchesStruct `json:"top_matches"`
}

SharedTeamPlayByPlayStatsStruct holds a merge of the shared top-level json objects

type SharedTopMatchesStruct

type SharedTopMatchesStruct struct {

	// Cs
	BiggestLoss struct {
		TeamAgainstStruct
		Rounds int64 `json:"rounds"`
	} `json:"biggest_loss"`
	BiggestWin struct {
		TeamAgainstStruct
		Rounds int64 `json:"rounds"`
	} `json:"biggest_win"`
	MostRounds struct {
		TeamAgainstStruct
		Rounds int64 `json:"rounds"`
	} `json:"most_rounds"`

	// Dota
	AvgLength int64 `json:"avg_length"`
	Longest   struct {
		Won struct {
			TeamAgainstStruct
			Length int64 `json:"length"`
		} `json:"won"`
		Lost struct {
			TeamAgainstStruct
			Length int64 `json:"length"`
		} `json:"lost"`
	} `json:"longest"`
	Shortest struct {
		Won struct {
			TeamAgainstStruct
			Length int64 `json:"length"`
		} `json:"won"`
		Lost struct {
			TeamAgainstStruct
			Length int64 `json:"length"`
		} `json:"lost"`
	} `json:"shortest"`
	AvgKpm float64 `json:"avg_kpm"`
	Kpm    struct {
		Highest struct {
			Kpm float64 `json:"kpm"`
			TeamAgainstStruct
		} `json:"highest"`
		Lowest struct {
			Kpm float64 `json:"kpm"`
			TeamAgainstStruct
		} `json:"lowest"`
	} `json:"kpm"`
}

SharedTopMatchesStruct holds all information that can be present in the top_matches key.

type SharedTopStatsStruct

type SharedTopStatsStruct struct {
	// CS & Dota
	Kills struct {
		DotaPlayerAgainstStruct       // DotaPlayerAgainst extends PlayerAgainst (which is all that is needed for CS)
		Kills                   int64 `json:"kills"`
	} `json:"kills"`

	// CS
	Adr struct {
		PlayerAgainstStruct
		Adr float64 `json:"adr"`
	} `json:"adr"`
	Assists struct {
		PlayerAgainstStruct
		Assists int64 `json:"assists"`
	} `json:"assists"`
	Plants struct {
		PlayerAgainstStruct
		Plants int64 `json:"plants"`
	} `json:"plants"`
	Defuses struct {
		PlayerAgainstStruct
		Defuses int64 `json:"defuses"`
	} `json:"defuses"`

	// Dota
	Gpm struct {
		DotaPlayerAgainstStruct
		Gpm float64 `json:"gpm"`
	} `json:"gpm"`
	Xpm struct {
		DotaPlayerAgainstStruct
		Xpm float64 `json:"xpm"`
	} `json:"xpm"`
	DmgGiven struct {
		DotaPlayerAgainstStruct
		DmgGiven float64 `json:"dmg_given"`
	} `json:"dmg_given"`
	CreepKills struct {
		DotaPlayerAgainstStruct
		LastHits int64 `json:"last_hits"`
	} `json:"creep_kills"`
	CreepDenies struct {
		DotaPlayerAgainstStruct
		Denies int64 `json:"denies"`
	} `json:"creep_denies"`
}

SharedTopStatsStruct holds all information that can be present in the top_stats key.

type SinglePlayerStatsStruct

type SinglePlayerStatsStruct struct {
	Streak struct {
		Series struct {
			StreakScopeStruct // defined in stats.go
		} `json:"series,omitempty"`
		Match struct {
			StreakScopeStruct // defined in stats.go
		} `json:"match,omitempty"`
	} `json:"streak,omitempty"`
	Winrate struct {
		Series struct {
			WinrateSeriesScopeStruct // defined in stats.go
		} `json:"series,omitempty"`
		Match struct {
			WinrateMatchScopeStruct // defined in stats.go
		} `json:"match,omitempty"`
	} `json:"winrate,omitempty"`
	Nemesis *struct {
		Series struct {
			Competitor PlayerStruct `json:"competitor,omitempty"` // defined in stats.go
			Losses     int64        `json:"losses"`
		} `json:"series,omitempty"`
		Match struct {
			Competitor PlayerStruct `json:"competitor,omitempty"` // defined in stats.go
			Losses     int64        `json:"losses"`
		} `json:"match,omitempty"`
	} `json:"nemesis,omitempty"`
	Dominating *struct {
		Series struct {
			Competitor PlayerStruct `json:"competitor,omitempty"` // defined in stats.go
			Wins       int64        `json:"wins"`
		} `json:"series,omitempty"`
		Match struct {
			Competitor PlayerStruct `json:"competitor,omitempty"` // defined in stats.go
			Wins       int64        `json:"wins"`
		} `json:"match,omitempty"`
	} `json:"dominating,omitempty"`
}

SinglePlayerStatsStruct hold information for players playing single-player games. For team games see the players corresponding Team and TeamStats.

type SocialMediaAccountStruct

type SocialMediaAccountStruct struct {
	Name string `json:"name,omitemtpy"`
	Slug string `json:"slug,omitempty"`
	Url  string `json:"url,omitmepty"`
}

SocialMediaAccountStruct represents a social media account for a Player or Team

type SportsbookOddsStruct

type SportsbookOddsStruct struct {
	Sportsbook string          `json:"sportsbook"`
	Link       string          `json:"link"`
	Moneyline  MoneylineStruct `json:"moneyline"`
}

SportsbookOddsStruct is a top-level struct holding information about sportsbook odds.

type StageStruct

type StageStruct struct {
	Id        int64            `json:"id,omitempty"`
	Title     string           `json:"title,omitempty"`
	DeletedAt *string          `json:"deleted_at"`
	Substages []SubstageStruct `json:"substages"`
}

StageStruct represents a phase in a Tournament and a higher level grouping of Substages.

type StandingsStruct

type StandingsStruct struct {
	RosterId int64  `json:"roster_id"`
	Points   *int64 `json:"points"`
	Wins     int64  `json:"wins"`
	Draws    int64  `json:"draws"`
	Losses   int64  `json:"losses"`
}

StandsStruct represents the current standings in a substage.

type StreakScopeStruct

type StreakScopeStruct struct {
	Current int64 `json:"current"`
	Best    int64 `json:"best"`
	Worst   int64 `json:"worst"`
}

StreakScopeStruct is the second-level object holding streak statistics.

type StreamImagesStruct

type StreamImagesStruct struct {
	Preview  string `json:"preview,omitempty"`
}

StreamImagesStruct represents the different keys for images a StreamStruct can contain

type StreamStruct

type StreamStruct struct {
	Id          int64              `json:"id,omitempty"`
	Username    string             `json:"username,omitempty"`
	DisplayName string             `json:"display_name,omitempty"`
	StatusText  string             `json:"status_text,omitempty"`
	ViewerCount int64              `json:"viewer_count"`
	Online      int64              `json:"online"`
	LastOnline  string             `json:"last_online,omitempty"`
	Images      StreamImagesStruct `json:"images,omitempty"`
	Url         string             `json:"url,omitempty"`
	Platform    PlatformStruct     `json:"platform,omitempty"`
}

StreamStruct represents a broadcast on a third party platform.

type SubstageRulesStruct

type SubstageRulesStruct struct {
	Advance struct {
		Number     *int64 `json:"number"`
		SubstageId *int64 `json:"substage_id"`
	} `json:"advance"`
	Descend struct {
		Number     *int64 `json:"number"`
		SubstageId *int64 `json:"substage_id"`
	} `json:"descend"`
	Points struct {
		Win   *int64 `json:"win"`
		Draw  *int64 `json:"draw"`
		Loss  *int64 `json:"loss"`
		Scope string `json:"scope"`
	}
}

SubstageRulesStruct hold information about the rules for a particular substage.

type SubstageStruct

type SubstageStruct struct {
	TournamentId int64               `json:"tournament_id,omitempty"`
	StageId      int64               `json:"stage_id,omitempty"`
	Id           int64               `json:"id,omitempty"`
	Title        string              `json:"title,omitempty"`
	Tier         int64               `json:"tier"`
	Type         int64               `json:"type"`
	Order        int64               `json:"order"`
	Rules        SubstageRulesStruct `json:"rules"`
	Standing     []StandingsStruct   `json:"standings"`
	Series       []SeriesStruct      `json:"series,omitempty"`
	Rosters      []RosterStruct      `json:"rosters,omitempty"`
	DeletedAt    *string             `json:"deleted_at"`
}

SubstageStruct is the lowest structure of a Tournament and is a grouping of Series.

type TeamAgainstStruct

type TeamAgainstStruct struct {
	MatchId int64       `json:"match_id"`
	Against *TeamStruct `json:"against"` // Declared as pointer to avoid invalid recursive type
}

TeamAgainstStruct is a collection of common data when examining specific stats. It is grouped with the specific stat in another struct.

type TeamImagesStruct

type TeamImagesStruct struct {
	Default   string `json:"default,omitempty"`
	Thumbnail string `json:"thumbnail,omitempty"`
	Fallback  bool   `json:"fallback"`
}

TeamImagesStruct represents the different keys for images a TeamStruct can contain

type TeamPlayByPlayStatsStruct

TeamPlayByPlayStatsStruct is a grouping of structure for TeamPlayByPlay stats for different games.

type TeamStatsStruct

type TeamStatsStruct struct {
	Streak struct {
		Series struct {
			StreakScopeStruct // defined in stats.go
		} `json:"series,omitempty"`
		Match struct {
			StreakScopeStruct // defined in stats.go
		} `json:"match,omitempty"`
	} `json:"streak,omitempty"`
	Winrate struct {
		Series struct {
			WinrateSeriesScopeStruct // defined in stats.go
		} `json:"series,omitempty"`
		Match struct {
			WinrateMatchScopeStruct // defined in stats.go
		} `json:"match,omitempty"`
	} `json:"winrate,omitempty"`
	Nemesis *struct {
		Series struct {
			Competitor TeamStruct `json:"competitor,omitempty"` // defined in stats.go
			Losses     int64      `json:"losses"`
		} `json:"series,omitempty"`
		Match struct {
			Competitor TeamStruct `json:"competitor,omitempty"` // defined in stats.go
			Losses     int64      `json:"losses"`
		} `json:"match,omitempty"`
	} `json:"nemesis,omitempty"`
	Dominating *struct {
		Series struct {
			Competitor TeamStruct `json:"competitor,omitempty"` // defined in stats.go
			Wins       int64      `json:"wins"`
		} `json:"series,omitempty"`
		Match struct {
			Competitor TeamStruct `json:"competitor,omitempty"` // defined in stats.go
			Wins       int64      `json:"wins"`
		} `json:"match,omitempty"`
	} `json:"dominating,omitempty"`
	PlayByPlay TeamPlayByPlayStatsStruct `json:"play_by_play"`
}

TeamStatsStruct holds performance statistics about a particular Team.

type TeamStruct

type TeamStruct struct {
	Id                  int64                      `json:"id,omitempty"`
	Name                string                     `json:"name,omitempty"`
	ShortName           string                     `json:"short_name,omitempty"`
	DeletedAt           *string                    `json:"deleted_at"`
	Images              TeamImagesStruct           `json:"images,omitempty"`
	Country             *CountryStruct             `json:"country"`
	TeamStats           TeamStatsStruct            `json:"team_stats,omitempty"`
	Players             *[]PlayerStruct            `json:"players,omitempty"`
	Rosters             []DefaultRosterStruct      `json:"rosters,omitempty"`
	UpcomingSeries      []SeriesStruct             `json:"upcoming_series"`
	RecentSeries        []SeriesStruct             `json:"recent_series"`
	Game                GameStruct                 `json:"game,omitempty"`
	SocialMediaAccounts []SocialMediaAccountStruct `json:"social_media_accounts,omitempty"`
}

TeamStruct represents a team that competes in Series' and Matches.

type TeamStructPaginated

type TeamStructPaginated struct {
	LastPage    int64        `json:"last_page,omitempty"`
	CurrentPage int64        `json:"current_page,omitempty"`
	Data        []TeamStruct `json:"data,omitempty"`
}

TeamStructPaginated holds a list of TeamStruct as well as information about pages.

type TournamentImagesStruct

type TournamentImagesStruct struct {
	Default   string `json:"default,omitempty"`
	Thumbnail string `json:"thumbnail,omitempty"`
	Banner    string `json:"banner,omitempty"`
	Square    string `json:"square,omitempty"`
	Fallback  bool   `json:"fallback"`
}

TournamentImagesStruct represents the different keys for images a TournamentStruct can contain

type TournamentStruct

type TournamentStruct struct {
	Id               int64                  `json:"id,omitempty"`
	Title            string                 `json:"title,omitempty"`
	ShortTitle       string                 `json:"short_title,omitempty"`
	Country          CountryStruct          `json:"country,omitempty"`
	City             string                 `json:"city,omitempty"`
	Tier             int64                  `json:"tier"`
	Description      string                 `json:"description,omitempty"`
	ShortDescription string                 `json:"short_description,omitempty"`
	Format           string                 `json:"format,omitempty"`
	Start            *string                `json:"start"`      // Datettime
	End              *string                `json:"end"`        // Datettime
	DeletedAt        *string                `json:"deleted_at"` // Datettime
	Url              string                 `json:"url,omitempty"`
	Images           TournamentImagesStruct `json:"images,omitempty"`
	PrizepoolString  PrizepoolStruct        `json:"prizepool_string,omitempty"`
	Links            LinksStruct            `json:"links,omitempty"`
	NextSeries       *SeriesStruct          `json:"next_series"`
	Series           []SeriesStruct         `json:"series,omitempty"`  // Optional
	Stages           []StageStruct          `json:"stages,omitempty"`  // Optional
	Rosters          []RosterStruct         `json:"rosters,omitempty"` // Optional
	Game             GameStruct             `json:"game,omitempty"`
	Casters          []CasterStruct         `json:"casters"`
}

TournamentStruct represents a tournament (i.e a structured group of Series').

type TournamentStructPaginated

type TournamentStructPaginated struct {
	LastPage    int64              `json:"last_page,omitempty"`
	CurrentPage int64              `json:"current_page,omitempty"`
	Data        []TournamentStruct `json:"data,omitempty"`
}

TournamentStructPaginated holds a list of TournamentStruct as well as information about pages

type WeaponStruct

type WeaponStruct struct {
	Images struct {
		Small string `json:"small"`
	} `json:"images"`
	Name string `json:"name"`
}

WeaponStruct holds information about a CS:GO weapon.

type WinrateMatchScopeStruct

type WinrateMatchScopeStruct struct {
	Rate    float64               `json:"rate"`
	History int64                 `json:"history"`
	PerMap  []WinratePerMapStruct `json:"per_map"`
}

WinrateScopeStruct is a second-level object holding winrate statistics for matches.

type WinratePerFormatStruct

type WinratePerFormatStruct struct {
	BestOf  int64   `json:"best_of"`
	Rate    float64 `json:"rate"`
	History int64   `json:"history"`
}

WinratePerFormatStruct holds the innermost JSON about winrates related to a specific format.

type WinratePerMapStruct

type WinratePerMapStruct struct {
	Map     MapStruct `json:"map,omitempty"`
	Rate    float64   `json:"rate"`
	History int64     `json:"history"`
}

WinratePerMapStruct holds the innermost JSON about winrates related to a single map.

type WinrateSeriesScopeStruct

type WinrateSeriesScopeStruct struct {
	Rate      float64                  `json:"rate"`
	History   int64                    `json:"history"`
	PerFormat []WinratePerFormatStruct `json:"per_format"`
}

WinrateScopeStruct is a second-level object holding winrate statistics for series'.

Jump to

Keyboard shortcuts

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