185 lines
3.3 KiB
TypeScript
185 lines
3.3 KiB
TypeScript
// Generated by https://jsonformatter.org/json-to-typescript for Bundesliga api
|
|
export default interface Clubs {
|
|
player_statistic: PlayerStatistic;
|
|
}
|
|
|
|
export interface PlayerStatistic {
|
|
transfer_value: number;
|
|
player: Player;
|
|
stats: Stat[];
|
|
attendance: Attendance;
|
|
}
|
|
|
|
export interface Attendance {
|
|
forecast: Forecast;
|
|
details: Detail[];
|
|
}
|
|
|
|
export interface Detail {
|
|
key: Key;
|
|
args: DetailArgs;
|
|
}
|
|
|
|
export interface DetailArgs {
|
|
state: ArgsState;
|
|
}
|
|
|
|
export enum ArgsState {
|
|
Starter = "starter",
|
|
Unknown = "unknown",
|
|
}
|
|
|
|
export enum Key {
|
|
InitialStateInSquad = "initial_state_in_squad",
|
|
}
|
|
|
|
export enum Forecast {
|
|
Attending = "attending",
|
|
Unknown = "unknown",
|
|
}
|
|
|
|
export interface Player {
|
|
uid: string;
|
|
external_uid: string;
|
|
transfer_value: number;
|
|
nickname: string;
|
|
positions: string[];
|
|
team: Team;
|
|
is_locked: boolean;
|
|
is_eliminated: boolean;
|
|
is_available: boolean;
|
|
image_urls: ImageUrls;
|
|
statistics: Statistics;
|
|
statistics_path: string;
|
|
match_starts_in: number;
|
|
scores: Scores;
|
|
scoring_details: unknown[];
|
|
age: number;
|
|
next_opponent: NextOpponent;
|
|
}
|
|
|
|
export interface ImageUrls {
|
|
default: string;
|
|
"1x": string;
|
|
"2x": string;
|
|
"3x": string;
|
|
}
|
|
|
|
export interface NextOpponent {
|
|
team_code: string;
|
|
match_venue: string;
|
|
home_score: number;
|
|
away_score: number;
|
|
}
|
|
|
|
export interface Scores {
|
|
att: number;
|
|
def: number;
|
|
mid: number;
|
|
gk: number;
|
|
}
|
|
|
|
export interface Statistics {
|
|
total_points: number;
|
|
average_points: number;
|
|
best_value_rank: number;
|
|
form: number;
|
|
popularity: number;
|
|
last_match_points: number;
|
|
last_season_points: number;
|
|
}
|
|
|
|
export interface Team {
|
|
uid: string;
|
|
team_code: string;
|
|
image_urls: ImageUrls;
|
|
}
|
|
|
|
export interface Stat {
|
|
match_day: MatchDay;
|
|
score: Score;
|
|
best_value_rank: number;
|
|
pick_count: number;
|
|
match?: Match;
|
|
popularity?: number;
|
|
attendance?: Attendance;
|
|
}
|
|
|
|
export interface Match {
|
|
uid: string;
|
|
starts_at: Date;
|
|
starts_at_quality: StartsAtQuality;
|
|
home_team: Team;
|
|
away_team: Team;
|
|
result: Result;
|
|
status: Status;
|
|
}
|
|
|
|
export interface Result {
|
|
home: number;
|
|
away: number;
|
|
}
|
|
|
|
export enum StartsAtQuality {
|
|
Definite = "definite",
|
|
}
|
|
|
|
export interface Status {
|
|
state: StatusState;
|
|
args: StatusArgs;
|
|
}
|
|
|
|
export interface StatusArgs {
|
|
play_time?: PlayTime;
|
|
first_match_starts_in?: Date;
|
|
starts_at_quality?: StartsAtQuality;
|
|
}
|
|
|
|
export interface PlayTime {
|
|
regular_minutes: number;
|
|
additional_minutes: number;
|
|
}
|
|
|
|
export enum StatusState {
|
|
Finished = "finished",
|
|
NotStarted = "not_started",
|
|
}
|
|
|
|
export interface MatchDay {
|
|
uid: string;
|
|
name: string;
|
|
scored: boolean;
|
|
current: boolean;
|
|
passed: boolean;
|
|
}
|
|
|
|
export interface Score {
|
|
cumulative: Cumulative;
|
|
current: Cumulative;
|
|
}
|
|
|
|
export interface Cumulative {
|
|
points: number;
|
|
scoring_details: ScoringDetail[];
|
|
}
|
|
|
|
export interface ScoringDetail {
|
|
type: Type;
|
|
factor: number;
|
|
points: number;
|
|
}
|
|
|
|
export enum Type {
|
|
Assists = "assists",
|
|
GoalAttempts = "goal_attempts",
|
|
MoreThanTwoScoredGoals = "more_than_two_scored_goals",
|
|
PenaltiesConverted = "penalties_converted",
|
|
ScoredGoalsFromField = "scored_goals_from_field",
|
|
ShotAssists = "shot_assists",
|
|
TimeOnField = "time_on_field",
|
|
TwoScoredGoals = "two_scored_goals",
|
|
WinningGoal = "winning_goal",
|
|
WinningTeam = "winning_team",
|
|
WonDuels = "won_duels",
|
|
YellowCards = "yellow_cards",
|
|
}
|