models

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BootStrapData

type BootStrapData struct {
	GameSettings Setting           `json:"game_settings"`
	Players      []Player          `json:"elements"`
	Teams        []Team            `json:"teams"`
	Positions    []Position        `json:"element_types"`
	Stats        []PlayerStatTypes `json:"element_stats"`
}

type Fixture

type Fixture struct {
	Id                   int           `json:"id"`
	Code                 int           `json:"code"`
	PulseId              int           `json:"pulse_id"`
	TeamH                int           `json:"team_h"`
	TeamHScore           *int          `json:"team_h_score"`
	TeamHDifficult       int           `json:"team_h_difficulty"`
	TeamA                int           `json:"team_a"`
	TeamAScore           *int          `json:"team_a_score"`
	TeamADifficult       int           `json:"team_a_difficulty"`
	Event                int           `json:"event"`
	Finished             bool          `json:"finished"`
	Minutes              int           `json:"minutes"`
	ProvisionalStartTime bool          `json:"provisional_start_time"`
	KickoffTime          string        `json:"kickoff_time"`
	Stats                []FixtureStat `json:"stats"`
}

type FixtureStat

type FixtureStat struct {
	Identifier string               `json:"identifier"`
	A          []FixtureStatElement `json:"a"`
	H          []FixtureStatElement `json:"h"`
}

type FixtureStatElement

type FixtureStatElement struct {
	Value   int `json:"value"`
	Element int `json:"element"`
}

type Player

type Player struct {
	ID                            int     `json:"id"`
	FirstName                     string  `json:"first_name"`
	SecondName                    string  `json:"second_name"`
	WebName                       string  `json:"web_name"`
	News                          string  `json:"news"`
	Team                          int     `json:"team"`
	ElementType                   int     `json:"element_type"`
	NowCost                       int     `json:"now_cost"`
	SelectedByPercent             string  `json:"selected_by_percent"`
	TotalPoints                   int     `json:"total_points"`
	Minutes                       int     `json:"minutes"`
	GoalsScored                   int     `json:"goals_scored"`
	Assists                       int     `json:"assists"`
	CleanSheets                   int     `json:"clean_sheets"`
	GoalsConceded                 int     `json:"goals_conceded"`
	OwnGoals                      int     `json:"own_goals"`
	PenaltiesSaved                int     `json:"penalties_saved"`
	PenaltiesMissed               int     `json:"penalties_missed"`
	YellowCards                   int     `json:"yellow_cards"`
	RedCards                      int     `json:"red_cards"`
	Saves                         int     `json:"saves"`
	Bonus                         int     `json:"bonus"`
	Bps                           int     `json:"bps"`
	Influence                     string  `json:"influence"`
	Creativity                    string  `json:"creativity"`
	Threat                        string  `json:"threat"`
	IctIndex                      string  `json:"ict_index"`
	ExpectedGoals                 string  `json:"expected_goals"`
	ExpectedAssists               string  `json:"expected_assists"`
	ExpectedGoalInvolvements      string  `json:"expected_goal_involvements"`
	ExpectedGoalsConceded         string  `json:"expected_goals_conceded"`
	ExpectedGoalsPer90            float64 `json:"expected_goals_per_90"`
	SavesPer90                    float64 `json:"saves_per_90"`
	ExpectedAssistsPer90          float64 `json:"expected_assists_per_90"`
	ExpectedGoalInvolvementsPer90 float64 `json:"expected_goal_involvements_per_90"`
	ExpectedGoalsConcededPer90    float64 `json:"expected_goals_conceded_per_90"`
	GoalsConcededPer90            float64 `json:"goals_conceded_per_90"`
	NowCostRank                   int     `json:"now_cost_rank"`
	NowCostRankType               int     `json:"now_cost_rank_type"`
	Form                          string  `json:"form"`
	FormRank                      int     `json:"form_rank"`
	FormRankType                  int     `json:"form_rank_type"`
	PointsPerGameRank             int     `json:"points_per_game_rank"`
	PointsPerGameRankType         int     `json:"points_per_game_rank_type"`
	SelectedRank                  int     `json:"selected_rank"`
	SelectedRankType              int     `json:"selected_rank_type"`
	StartsPer90                   float64 `json:"starts_per_90"`
	CleanSheetsPer90              float64 `json:"clean_sheets_per_90"`
}

type PlayerDetail

type PlayerDetail struct {
	Fixtures []UpcomingFixture
	History  []PlayerMatchHisoricalStat
	Seasons  []PlayerPastSeasonStat
}

type PlayerMatchHisoricalStat

type PlayerMatchHisoricalStat struct {
	Element                  int    `json:"element"`
	Fixture                  int    `json:"fixture"`
	Team                     int    `json:"team"`
	TotalPoints              int    `json:"total_points"`
	MinutesPlayed            int    `json:"minutes"`
	GoalsScored              int    `json:"goals_scored"`
	Assists                  int    `json:"assists"`
	CleanSheets              int    `json:"clean_sheets"`
	GoalsConceded            int    `json:"goals_conceded"`
	OwnGoals                 int    `json:"own_goals"`
	PenaltiesSaved           int    `json:"penalties_saved"`
	PenaltiesMissed          int    `json:"penalties_missed"`
	YellowCards              int    `json:"yellow_cards"`
	RedCards                 int    `json:"red_cards"`
	Saves                    int    `json:"saves"`
	Bonus                    int    `json:"bonus"`
	Bps                      int    `json:"bps"`
	Influence                string `json:"influence"`
	Creativity               string `json:"creativity"`
	Threat                   string `json:"threat"`
	IctIndex                 string `json:"ict_index"`
	Starts                   int    `json:"starts"`
	ExpectedGoals            string `json:"expected_goals"`
	ExpectedAssists          string `json:"expected_assists"`
	ExpectedGoalInvolvements string `json:"expected_goal_involvements"`
	ExpectedGoalsConceded    string `json:"expected_goals_conceded"`
	Value                    int    `json:"value"`
	TransfersBalance         int    `json:"transfers_balance"`
	Selected                 int    `json:"selected"`
	TransfersIn              int    `json:"transfers_in"`
	TransfersOut             int    `json:"transfers_out"`
}

type PlayerPastSeasonStat

type PlayerPastSeasonStat struct {
	SeasonName               string `json:"season_name"`
	ElementCode              int    `json:"element_code"`
	StartCost                int    `json:"start_cost"`
	EndCost                  int    `json:"end_cost"`
	TotalPoints              int    `json:"total_points"`
	Minutes                  int    `json:"minutes"`
	GoalsScored              int    `json:"goals_scored"`
	Assists                  int    `json:"assists"`
	CleanSheets              int    `json:"clean_sheets"`
	GoalsConceded            int    `json:"goals_conceded"`
	OwnGoals                 int    `json:"own_goals"`
	PenaltiesSaved           int    `json:"penalties_saved"`
	PenaltiesMissed          int    `json:"penalties_missed"`
	YellowCards              int    `json:"yellow_cards"`
	RedCards                 int    `json:"red_cards"`
	Saves                    int    `json:"saves"`
	Bonus                    int    `json:"bonus"`
	Bps                      int    `json:"bps"`
	Influence                string `json:"influence"`
	Creativity               string `json:"creativity"`
	Threat                   string `json:"threat"`
	IctIndex                 string `json:"ict_index"`
	Starts                   int    `json:"starts"`
	ExpectedGoals            string `json:"expected_goals"`
	ExpectedAssists          string `json:"expected_assists"`
	ExpectedGoalInvolvements string `json:"expected_goal_involvements"`
	ExpectedGoalsConceded    string `json:"expected_goals_conceded"`
}

type PlayerScore

type PlayerScore struct {
	PlayerId      int
	ElementTypeId int
	Score         int
}

type PlayerStatTypes

type PlayerStatTypes struct {
	Label string `json:"label"`
	Name  string `json:"name"`
}

type Position

type Position struct {
	ID                 int    `json:"id"`
	PluralName         string `json:"plural_name"`
	PluralNameShort    string `json:"plural_name_short"`
	SingularName       string `json:"singular_name"`
	SingularNameShort  string `json:"singular_name_short"`
	SquadSelect        int    `json:"squad_select"`
	SquadMinPlay       int    `json:"squad_min_play"`
	SquadMaxPlay       int    `json:"squad_max_play"`
	UiShirtSpecific    bool   `json:"ui_shirt_specific"`
	SubPositionsLocked []int  `json:"sub_positions_locked"`
	ElementCount       int    `json:"element_count"`
}

type Setting

type Setting struct {
	LeagueJoinPrivateMax         int      `json:"league_join_private_max"`
	LeagueJoinPublicMax          int      `json:"league_join_public_max"`
	LeagueMaxSizePublicClassic   int      `json:"league_max_size_public_classic"`
	LeagueMaxSizePublicH2H       int      `json:"league_max_size_public_h2h"`
	LeagueMaxSizePrivateH2H      int      `json:"league_max_size_private_h2h"`
	LeagueMaxKoRoundsPrivateH2H  int      `json:"league_max_ko_rounds_private_h2h"`
	LeaguePrefixPublic           string   `json:"league_prefix_public"`
	LeaguePointsH2HWin           int      `json:"league_points_h2h_win"`
	LeaguePointsH2HLose          int      `json:"league_points_h2h_lose"`
	LeaguePointsH2HDraw          int      `json:"league_points_h2h_draw"`
	LeagueKoFirstInsteadOfRandom bool     `json:"league_ko_first_instead_of_random"`
	CupStartEventID              int      `json:"cup_start_event_id"`
	CupStopEventID               int      `json:"cup_stop_event_id"`
	CupQualifyingMethod          string   `json:"cup_qualifying_method"`
	CupType                      string   `json:"cup_type"`
	SquadSquadplay               int      `json:"squad_squadplay"`
	SquadSquadsize               int      `json:"squad_squadsize"`
	SquadTeamLimit               int      `json:"squad_team_limit"`
	SquadTotalSpend              int      `json:"squad_total_spend"`
	UiCurrencyMultiplier         int      `json:"ui_currency_multiplier"`
	UiUseSpecialShirts           bool     `json:"ui_use_special_shirts"`
	UiSpecialShirtExclusions     []string `json:"ui_special_shirt_exclusions"`
	StatsFormDays                int      `json:"stats_form_days"`
	SysViceCaptainEnabled        bool     `json:"sys_vice_captain_enabled"`
	TransfersCap                 int      `json:"transfers_cap"`
	TransfersSellOnFee           float64  `json:"transfers_sell_on_fee"`
	LeagueH2HTiebreakStats       []string `json:"league_h2h_tiebreak_stats"`
	Timezone                     string   `json:"timezone"`
}

type Team

type Team struct {
	ID                  int    `json:"id"`
	Name                string `json:"name"`
	ShortName           string `json:"short_name"`
	Strength            int    `json:"strength"`
	StrengthOverallHome int    `json:"strength_overall_home"`
	StrengthOverallAway int    `json:"strength_overall_away"`
	StrengthAttackHome  int    `json:"strength_attack_home"`
	StrengthAttackAway  int    `json:"strength_attack_away"`
	StrengthDefenceHome int    `json:"strength_defence_home"`
	StrengthDefenceAway int    `json:"strength_defence_away"`
	PulseID             int    `json:"pulse_id"`
	Form                string `json:"form"`
	Played              int    `json:"played"`
	Win                 int    `json:"win"`
	Draw                int    `json:"draw"`
	Loss                int    `json:"loss"`
	Points              int    `json:"points"`
	Code                int    `json:"code"`
	Position            int    `json:"position"`
	Unavailable         bool   `json:"unavailable"`
}

type UpcomingFixture

type UpcomingFixture struct {
	Id                   int    `json:"id"`
	Code                 int    `json:"code"`
	TeamH                int    `json:"team_h"`
	TeamHScore           *int   `json:"team_h_score"`
	TeamA                int    `json:"team_a"`
	TeamAScore           *int   `json:"team_a_score"`
	Event                int    `json:"event"`
	Finished             bool   `json:"finished"`
	Minutes              int    `json:"minutes"`
	ProvisionalStartTime bool   `json:"provisional_start_time"`
	KickoffTime          string `json:"kickoff_time"`
	EventName            string `json:"event_name"`
	IsHome               bool   `json:"is_home"`
	Difficulty           int    `json:"difficulty"`
}

Jump to

Keyboard shortcuts

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