From 5624a0760756ce4ca21df7005fb7543d704c5ab3 Mon Sep 17 00:00:00 2001 From: Laurent Le Houerou Date: Thu, 18 Apr 2024 14:48:16 +0400 Subject: [PATCH] add stats to memberships --- football/player.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/football/player.go b/football/player.go index 07a9b39..24d2891 100644 --- a/football/player.go +++ b/football/player.go @@ -40,6 +40,20 @@ type CardSupply struct { Unique int `graphql:"unique"` } +type MembershipStats struct { + Season struct { + StartYear int `graphql:"startYear"` + } `graphql:"season"` + Appearances int `graphql:"appearances"` + Goals int `graphql:"goals"` + Assists int `graphql:"assists"` + YellowCards int `graphql:"yellowCards"` + RedCards int `graphql:"redCards"` + MinutesPlayed int `graphql:"minutesPlayed"` + SubstituteIn int `graphql:"substituteIn"` + SubstituteOut int `graphql:"substituteOut"` +} + type Membership struct { Id graphql.Id `graphql:"id"` StartDate time.Time `graphql:"startDate"` @@ -53,6 +67,7 @@ type Membership struct { Slug string `graphql:"slug"` } `graphql:"... on NationalTeam"` } `graphql:"membershipTeam"` + Stats []MembershipStats `graphql:"stats"` } type Player struct {