structs

package
v2.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2018 License: MIT Imports: 2 Imported by: 4

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 CsMatchSummary

type CsMatchSummary struct {
	Home        int64 `json:"home"`
	Away        int64 `json:"away"`
	MatchLength int64 `json:"match_length"`
	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"`
	DamageGiven float64 `json:"dmg_given"`
	DamageTaken float64 `json:"dmg_taken"`
	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 CsPlayerStats

type CsPlayerStats 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 CsSeriesSummary

type CsSeriesSummary struct {
	Scoreboard map[string][]struct {
		PlayerID      int64   `json:"player_id"`
		MatchesPlayed int64   `json:"matches_played"`
		Kills         int64   `json:"kills"`
		Deaths        int64   `json:"deaths"`
		Assists       int64   `json:"assists"`
		Adr           float64 `json:"adr"`
	}
}

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 CsTeamStats

type CsTeamStats 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"`
	TopStats struct {
		Kills struct {
			PlayerAgainstStruct
			Kills int64 `json:"kills"`
		} `json:"kills"`
		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"`
	} `json:"top_stats"`
	TopMatches struct {
		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"`
	} `json:"top_matches"`
}

CsTeamStats 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 DotaHeroWithWinsStruct

type DotaHeroWithWinsStruct struct {
	Amount int64      `json:"amount"`
	Wins   int64      `json:"wins"`
	Hero   HeroStruct `json:"hero"`
}

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

type DotaItemStruct

type DotaItemStruct struct {
	Image struct {
		Default   string `json:"default"`
		Thumbnail string `json:"thumbnail"`
	} `json:"image"`
	Name string `json:"name"`
}

type DotaMatchSummary

type DotaMatchSummary 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"`
	} `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"`
				ByMobs DotaDmg `json:"by_mobs"`
			} `json:"given"`
			Taken struct {
				FromHeroes DotaDmg `json:"from_heroes"`
				FromMobs   DotaDmg `json:"from_mobs"`
			} `json:"taken"`
		} `json:"hero_dmg"`
		HeroHealing struct {
			Given struct {
				ByHero int64 `json:"by_hero"`
				ByMobs int64 `json:"by_mobs"`
			} `json:"given"`
			Taken struct {
				FromHeroes int64 `json:"from_heroes"`
				FromMobs   int64 `json:"from_mobs"`
			} `json:"taken"`
		} `json:"hero_healing"`
		Items struct {
			Inventory struct {
				Slot1 DotaItemStruct `json:"slot_1"`
				Slot2 DotaItemStruct `json:"slot_2"`
				Slot3 DotaItemStruct `json:"slot_3"`
				Slot4 DotaItemStruct `json:"slot_4"`
				Slot5 DotaItemStruct `json:"slot_5"`
				Slot6 DotaItemStruct `json:"slot_6"`
			} `json:"inventory"`
			Backpack struct {
				Slot1 DotaItemStruct `json:"slot_1"`
				Slot2 DotaItemStruct `json:"slot_2"`
				Slot3 DotaItemStruct `json:"slot_3"`
			} `json:"backpack"`
			Stash struct {
				Slot1 DotaItemStruct `json:"slot_1"`
				Slot2 DotaItemStruct `json:"slot_2"`
				Slot3 DotaItemStruct `json:"slot_3"`
				Slot4 DotaItemStruct `json:"slot_4"`
				Slot5 DotaItemStruct `json:"slot_5"`
				Slot6 DotaItemStruct `json:"slot_6"`
			} `json:"stash"`
		} `json:"items"`
	} `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 DotaPlayerStats

type DotaPlayerStats 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 DotaSeriesSummary

type DotaSeriesSummary struct {
	Scoreboard map[string][]struct {
		PlayerID      int64   `json:"player_id"`
		MatchesPlayed int64   `json:"matches_played"`
		Kills         int64   `json:"kills"`
		Deaths        int64   `json:"deaths"`
		Assists       int64   `json:"assists"`
		Gpm           float64 `json:"gpm"`
		Xpm           float64 `json:"xpm"`
		CreepKills    int64   `json:"creep_kills"`
		CreepDenies   int64   `json:"creep_denies"`
		HeroDmg       struct {
			Given struct {
				ByHero struct {
					HpRemoval   int64 `json:"hp_removal"`
					MagicalDmg  int64 `json:"magical_dmg"`
					PhysicalDmg int64 `json:"physical_dmg"`
					PureDmg     int64 `json:"pure_dmg"`
				} `json:"by_hero"`
				ByMobs struct {
					HpRemoval   int64 `json:"hp_removal"`
					MagicalDmg  int64 `json:"magical_dmg"`
					PhysicalDmg int64 `json:"physical_dmg"`
					PureDmg     int64 `json:"pure_dmg"`
				} `json:"by_mobs"`
			} `json:"given"`
			Taken struct {
				FromHeroes struct {
					HpRemoval   int64 `json:"hp_removal"`
					MagicalDmg  int64 `json:"magical_dmg"`
					PhysicalDmg int64 `json:"physical_dmg"`
					PureDmg     int64 `json:"pure_dmg"`
				} `json:"from_heroes"`
				FromMobs struct {
					HpRemoval   int64 `json:"hp_removal"`
					MagicalDmg  int64 `json:"magical_dmg"`
					PhysicalDmg int64 `json:"physical_dmg"`
					PureDmg     int64 `json:"pure_dmg"`
				} `json:"from_mobs"`
			} `json:"taken"`
		} `json:"hero_dmg"`
	} `json:"scoreboard"`
}

type DotaTeamStats

type DotaTeamStats 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 []DotaHeroWithWinsStruct `json:"most_picked"`
			MostBanned []DotaHeroWithWinsStruct `json:"most_banned"`
		} `json:"own"`
		Opponenents struct {
			MostPicked []DotaHeroWithWinsStruct `json:"most_picked"`
			MostBanned []DotaHeroWithWinsStruct `json:"most_banned"`
		} `json:"opponents"`
	} `json:"drafts"`
	TopStats struct {
		Kills struct {
			DotaPlayerAgainstStruct
			Kills int64 `json:"kills"`
		} `json:"kills"`
		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"`
	} `json:"top_stats"`
	TopMatches struct {
		AvgLength float64 `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"`
	} `json:"top_matches"`
}

DotaTeamStats 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 LolDmgStruct

type LolDmgStruct struct {
	Magic    int64 `json:"magic"`
	Physical int64 `json:"physical"`
	True     int64 `json:"true"`
}

type LolEventStruct

type LolEventStruct struct {
	Timestamp int64     `json:"timestamp"`
	Position  PosStruct `json:"position"`
	KillerId  int64     `json:"killer_id"`
}

type LolItemStruct

type LolItemStruct struct {
	Name       string `json:"name"`
	ExternalId int64  `json:"external_id"`
	Image      struct {
		Default   string `json:"default"`
		Thumbnail string `json:"thumbnail"`
	} `json:"image"`
}

type LolLaneEventStruct

type LolLaneEventStruct struct {
	Lane string `json:"lane"`
	LolEventStruct
}

type LolMatchSummary

type LolMatchSummary struct {
	MatchLength int64 `json:"match_length"`
	BlueRoster  struct {
		Id      int64             `json:"id"`
		Players []LolPlayerStruct `json:"players"`
	} `json:"blue_roster"`
	PurpleRoster struct {
		Id      int64             `json:"id"`
		Players []LolPlayerStruct `json:"players"`
	} `json:"purple_roster"`
	Firsts struct {
		FirstBlood struct {
			PlayerId  int64  `json:"player_id"`
			Timestamp int64  `json:"timestamp"`
			Team      string `json:"team"`
		} `json:"first_blood"`
		FirstTower struct {
			PlayerId  int64  `json:"player_id"`
			Timestamp int64  `json:"timestamp"`
			Team      string `json:"team"`
		} `json:"first_tower"`
		FirstInhibitor struct {
			PlayerId  int64  `json:"player_id"`
			Timestamp int64  `json:"timestamp"`
			Team      string `json:"team"`
		} `json:"first_inhibitor"`
		FirstBaron struct {
			PlayerId  int64  `json:"player_id"`
			Timestamp int64  `json:"timestamp"`
			Team      string `json:"team"`
		} `json:"first_baron"`
		FirstDragon struct {
			PlayerId  int64  `json:"player_id"`
			Timestamp int64  `json:"timestamp"`
			Team      string `json:"team"`
		} `json:"first_dragon"`
		FirstRiftHerald struct {
			PlayerId  int64  `json:"player_id"`
			Timestamp int64  `json:"timestamp"`
			Team      string `json:"team"`
		} `json:"first_rift_herald"`
	} `json:"firsts"`
	Wards []struct {
		EventType string `json:"event_type"`
		Type      string `json:"type"`
		PlayerId  int64  `json:"player_id"`
		Timestamp int64  `json:"timestamp"`
	} `json:"wards"`
	KillTimeline []struct {
		Timestamp int64     `json:"timestamp"`
		Position  PosStruct `json:"position"`
		KillerId  int64     `json:"killer_id"`
		VictimId  int64     `json:"victim_id"`
		Assists   []int64   `json:"assists"`
	} `json:"kill_timeline"`
	ObjectiveEvents struct {
		Towers []struct {
			Type    string  `json:"type"`
			Assists []int64 `json:"assists"`
			LolLaneEventStruct
		} `json:"towers"`
		Inihibitors []struct {
			LolLaneEventStruct
			Assists []int64 `json:"assists"`
		} `json:"inhibitors"`
		Barons  []LolEventStruct `json:"barons"`
		Dragons []struct {
			Type string `json:"type"`
			LolEventStruct
		} `json:"dragons"`
		RiftHeralds []LolEventStruct `json:"rift_heralds"`
	} `json:"objective_events"`
	Draft []struct {
		RosterId int64 `json:"roster_id"`
		Champion struct {
			Name       string `json:"name"`
			ExternalId int64  `json:"external_id"`
		} `json:"champion"`
		Order *int64 `json:"order"`
		Type  string `json:"type"`
	} `json:"draft"`
}

type LolPlayerAgainstStruct

type LolPlayerAgainstStruct struct {
	Value    float64 `json:"value"`
	PlayerId int64   `json:"player_id"`
	MatchId  int64   `json:"match_id"`
	Champion struct {
		Name string `json:"name"`
	} `json:"champion"`
	Against RosterStruct `json:"against"`
}

type LolPlayerStats

type LolPlayerStats struct {
	NrMatches int64 `json:"nr_matches"`
	NrWins    int64 `json:"nr_wins"`
	AvgStats  struct {
		Kills       float64 `json:"kills"`
		Deaths      float64 `json:"deaths"`
		Assists     float64 `json:"assists"`
		Gpm         float64 `json:"gpm"`
		Xpm         float64 `json:"xpm"`
		MinionKills struct {
			Total              float64 `json:"total"`
			NeutralMinions     float64 `json:"neutral_minions"`
			NeutralJungle      float64 `json:"neutral_jungle"`
			NeutralEnemyJungle float64 `json:"neutral_enemy_jungle"`
		} `json:"minion_kills"`
		Wards []struct {
			Placed    float64 `json:"placed"`
			Destroyed float64 `json:"destroyed"`
			Type      string  `json:"type"`
		} `json:"wards"`
	} `json:"avg_stats"`
	LargestCombo struct {
		Double              int64 `json:"double"`
		Triple              int64 `json:"triple"`
		Quadra              int64 `json:"quadra"`
		Penta               int64 `json:"penta"`
		Unreal              int64 `json:"unreal"`
		LargestKillingSpree int64 `json:"largest_killing_spree"`
		LargestMultiKill    int64 `json:"largest_multi_kill"`
		KillingSprees       int64 `json:"killing_sprees"`
	} `json:"largest_combos"`
	MostPlayedChampion []struct {
		Champion struct {
			Name string `json:"name"`
		} `json:"champion"`
		NrMatches  int64   `json:"nr_matches"`
		NrWins     int64   `json:"nr_wins"`
		AvgKills   float64 `json:"avg_kills"`
		AvgDeaths  float64 `json:"avg_deaths"`
		AvgAssists float64 `json:"avg_assists"`
		AvgGpm     float64 `json:"avg_gpm"`
		AvgXpm     float64 `json:"avg_xpm"`
	} `json:"most_played_champions"`
	SideStats struct {
		Purple struct {
			NrMatches int64 `json:"nr_matches"`
			NrWins    int64 `json:"nr_wins"`
		} `json:"purple"`
		Blue struct {
			NrMatches int64 `json:"nr_matches"`
			NrWins    int64 `json:"nr_wins"`
		} `json:"blue"`
	} `json:"side_stats"`
}

type LolPlayerStruct

type LolPlayerStruct struct {
	PlayerId   int64   `json:"player_id"`
	Role       string  `json:"role"`
	Lane       string  `json:"lane"`
	Kills      int64   `json:"kills"`
	Deaths     int64   `json:"deaths"`
	Assists    int64   `json:"assists"`
	GoldEarned int64   `json:"gold_earned"`
	GoldSpent  int64   `json:"gold_spent"`
	Gpm        float64 `json:"gpm"`
	TotalXp    int64   `json:"total_xp"`
	Xpm        float64 `json:"xpm"`
	Champion   struct {
		Name       string `json:"name"`
		ExternalId int64  `json:"external_id"`
	} `json:"champion"`
	KillCombos struct {
		Double              int64 `json:"double"`
		Triple              int64 `json:"triple"`
		Quadra              int64 `json:"quadra"`
		Penta               int64 `json:"penta"`
		Unreal              int64 `json:"unreal"`
		LargestKillingSpree int64 `json:"largest_killing_spree"`
		LargestMultiKill    int64 `json:"largest_multi_kill"`
		KillingSprees       int64 `json:"killing_sprees"`
	} `json:"kill_combos"`
	Items struct {
		Inventory struct {
			Slot1 LolItemStruct `json:"slot_1"`
			Slot2 LolItemStruct `json:"slot_2"`
			Slot3 LolItemStruct `json:"slot_3"`
			Slot4 LolItemStruct `json:"slot_4"`
			Slot5 LolItemStruct `json:"slot_5"`
			Slot6 LolItemStruct `json:"slot_6"`
			Slot7 LolItemStruct `json:"slot_7"`
		} `json:"inventory"`
	} `json:"items"`
	Damage struct {
		Total        LolDmgStruct `json:"total"`
		ToHeroes     LolDmgStruct `json:"to_heroes"`
		DamageTaken  LolDmgStruct `json:"damage_taken"`
		LargestCrit  int64        `json:"largest_crit"`
		ToObjectives int64        `json:"to_objectives"`
		ToTurrets    int64        `json:"to_turrets"`
	} `json:"damage"`
	Support struct {
		AmountHealed     int64 `json:"amount_healed"`
		UnitsHealed      int64 `json:"units_healed"`
		CrowdControlTime int64 `json:"crowd_control_time"`
	} `json:"support"`
	MinionKills struct {
		Total              int64 `json:"total"`
		NeutralJungle      int64 `json:"neutral_jungle"`
		NeutralEnemyJungle int64 `json:"neutral_enemy_jungle"`
	} `json:"minion_kills"`
	Wards []struct {
		Type      string `json:"type"`
		Destroyed int64  `json:"destroyed"`
		Placed    int64  `json:"placed"`
	} `json:"wards"`
	ChampionSpells map[string]struct {
		Name string `json:"name"`
	} `json:"champion_spells"`
	Masteries []struct {
		Name string `json:"name"`
		Rank int64  `json:"rank"`
	} `json:"masteries"`
	Runes []struct {
		Name string `json:"name"`
		Rank int64  `json:"rank"`
	} `json:"runes"`
	RunesReforged struct {
		PrimaryPath struct {
			Path struct {
				Name       string `json:"name"`
				ExternalId int64  `json:"external_id"`
			} `json:"path"`
			Keystone struct {
				Name       string `json:"name"`
				ExternalId int64  `json:"external_id"`
			} `json:"keystone"`
			Rune1 struct {
				Name       string `json:"name"`
				ExternalId int64  `json:"external_id"`
			} `json:"rune_1"`
			Rune2 struct {
				Name       string `json:"name"`
				ExternalId int64  `json:"external_id"`
			} `json:"rune_2"`
			Rune3 struct {
				Name       string `json:"name"`
				ExternalId int64  `json:"external_id"`
			} `json:"rune_3"`
		} `json:"primary_path"`
		SecondaryPath struct {
			Path struct {
				Name       string `json:"name"`
				ExternalId int64  `json:"external_id"`
			} `json:"path"`
			Rune1 struct {
				Name       string `json:"name"`
				ExternalId int64  `json:"external_id"`
			} `json:"rune_1"`
			Rune2 struct {
				Name       string `json:"name"`
				ExternalId int64  `json:"external_id"`
			} `json:"rune_2"`
		} `json:"secondary_path"`
	} `json:"runes_reforged"`
	Skillups []struct {
		Time        int64  `json:"time"`
		AbilitySlot int64  `json:"ability_slot"`
		Type        string `json:"type"`
	} `json:"skillups"`
}

type LolSeriesSummary

type LolSeriesSummary struct {
	Scoreboard map[string][]struct {
		PlayerID      int64   `json:"player_id"`
		MatchesPlayed int64   `json:"matches_played"`
		Kills         int64   `json:"kills"`
		Deaths        int64   `json:"deaths"`
		Assists       int64   `json:"assists"`
		GoldEarned    int64   `json:"gold_earned"`
		GoldSpent     int64   `json:"gold_spent"`
		TotalXp       int64   `json:"total_xp"`
		Xpm           float64 `json:"xpm"`
		Gpm           float64 `json:"gpm"`
		KillCombos    struct {
			Double              int64 `json:"double"`
			Triple              int64 `json:"triple"`
			Quadra              int64 `json:"quadra"`
			Penta               int64 `json:"penta"`
			Unreal              int64 `json:"unreal"`
			LargestKillingSpree int64 `json:"largest_killing_spree"`
			LargestMultiKill    int64 `json:"largest_multi_kill"`
			KillingSprees       int64 `json:"killing_sprees"`
		} `json:"kill_combos"`
		MinionKills struct {
			Total              int64 `json:"total"`
			NeutralJungle      int64 `json:"neutral_jungle"`
			NeutralEnemyJungle int64 `json:"neutral_enemy_jungle"`
		} `json:"minion_kills"`
		Damage struct {
			Total struct {
				Magic    int64 `json:"magic"`
				Physical int64 `json:"physical"`
				True     int64 `json:"true"`
			} `json:"total"`
			ToHeroes struct {
				Magic    int64 `json:"magic"`
				Physical int64 `json:"physical"`
				True     int64 `json:"true"`
			} `json:"to_heroes"`
			DamageTaken struct {
				Magic    int64 `json:"magic"`
				Physical int64 `json:"physical"`
				True     int64 `json:"true"`
			} `json:"damage_taken"`
			LargestCrit  int64 `json:"largest_crit"`
			ToObjectives int64 `json:"to_objectives"`
			ToTurrets    int64 `json:"to_turrets"`
		} `json:"damage"`
		Support struct {
			AmountHealed     int64 `json:"amount_healed"`
			UnitsHealed      int64 `json:"units_healed"`
			CrowdControlTime int64 `json:"crowd_control_time"`
		} `json:"support"`
	}
}

type LolTeamAgainstStruct

type LolTeamAgainstStruct struct {
	Value   float64      `json:"value"`
	MatchId int64        `json:"match_id"`
	Against RosterStruct `json:"against"`
}

type LolTeamStats

type LolTeamStats struct {
	NrMatches int64 `json:"nr_matches"`
	NrWins    int64 `json:"nr_wins"`
	SideStats struct {
		Purple struct {
			NrMatches int64 `json:"nr_matches"`
			NrWins    int64 `json:"nr_wins"`
		} `json:"purple"`
		Blue struct {
			NrMatches int64 `json:"nr_matches"`
			NrWins    int64 `json:"nr_wins"`
		} `json:"blue"`
	} `json:"side_stats"`
	Champions []struct {
		NrMatches int64 `json:"nr_matches"`
		NrWins    int64 `json:"nr_wins"`
		Champions struct {
			Name string `json:"name"`
		} `json:"champion"`
	} `json:"champions"`
	TopStats struct {
		Kills               LolPlayerAgainstStruct  `json:"kills"`
		Gpm                 LolPlayerAgainstStruct  `json:"gpm"`
		Xpm                 LolPlayerAgainstStruct  `json:"xpm"`
		DoubleKills         *LolPlayerAgainstStruct `json:"double_kills"`
		TripleKills         *LolPlayerAgainstStruct `json:"triple_kills"`
		QuadraKills         *LolPlayerAgainstStruct `json:"quadra_kills"`
		PentaKills          *LolPlayerAgainstStruct `json:"Penta_kills"`
		UnrealKills         *LolPlayerAgainstStruct `json:"Unreal_kills"`
		LargestKillingSpree *LolPlayerAgainstStruct `json:"largest_killing_spree"`
		LargestMultiKill    *LolPlayerAgainstStruct `json:"largest_multi_kill"`
	} `json:"top_stats"`
	TopMatches struct {
		Kpm struct {
			Avg     float64 `json:"avg"` // Only lol
			Highest struct {
				LolTeamAgainstStruct
			} `json:"highest"`
			Lowest struct {
				LolTeamAgainstStruct
			} `json:"lowest"`
		} `json:"kpm"`
		Length struct {
			Avg     float64 `json:"avg"`
			Longest struct {
				Won  LolTeamAgainstStruct `json:"won"`
				Lost LolTeamAgainstStruct `json:"lost"`
			} `json:"longest"`
			Shortest struct {
				Won  LolTeamAgainstStruct `json:"won"`
				Lost LolTeamAgainstStruct `json:"lost"`
			} `json:"shortest"`
		} `json:"length"`
	} `json:"top_matches"`
}

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.

func (*MatchStruct) UnmarshalJSON

func (m *MatchStruct) UnmarshalJSON(data []byte) error

We need to unmarshal match_summary into the game-specific struct

type MatchSummaryStruct

type MatchSummaryStruct interface{}

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 interface{}

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.

func (*PlayerStatsStruct) UnmarshalJSON

func (p *PlayerStatsStruct) UnmarshalJSON(data []byte) error

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"`
	Roles               []RoleStruct               `json:"roles"`
	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 RoleStruct

type RoleStruct struct {
	Name string  `json:"name"`
	From string  `json:"from"`
	To   *string `json:"to"`
}

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 map[string]int64

SeedingStruct represents the seeding of all 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"`
	TournamentId    int64                   `json:"tournament_id,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"`
	Summary         SeriesSummary           `json:"summary"`
}

SeriesStruct represents a Series of Matches.

func (*SeriesStruct) UnmarshalJSON

func (s *SeriesStruct) UnmarshalJSON(data []byte) error

We need to unmarshal summary into the game-specific struct

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 SeriesSummary

type SeriesSummary interface{}

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 TeamPlayByPlayStats

type TeamPlayByPlayStats interface{}

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 TeamPlayByPlayStats `json:"play_by_play"`
}

TeamStatsStruct holds performance statistics about a particular Team.

func (*TeamStatsStruct) UnmarshalJSON

func (t *TeamStatsStruct) UnmarshalJSON(data []byte) error

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"`
	HasPbpStats      bool                   `json:"has_pbpstats"`
	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