From 06c49983aa6c9d52ea69044668f4090f59db40de Mon Sep 17 00:00:00 2001 From: Laurent Le Houerou Date: Fri, 5 Apr 2024 22:01:48 +0400 Subject: [PATCH] add card supply & club memberships to player --- football/player.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/football/player.go b/football/player.go index a6e29e2..959341b 100644 --- a/football/player.go +++ b/football/player.go @@ -30,6 +30,25 @@ type Suspension struct { } `graphql:"competition"` } +type CardSupply struct { + Season struct { + StartYear int `graphql:"startYear"` + } `graphql:"season"` + Limited int `graphql:"limited"` + Rare int `graphql:"rare"` + SuperRare int `graphql:"superRare"` + Unique int `graphql:"unique"` +} + +type ClubMembership struct { + Id graphql.Id `graphql:"id"` + Club struct { + Slug string `graphql:"slug"` + } `graphql:"club"` + StartDate time.Time `graphql:"startDate"` + EndDate *time.Time `graphql:"endDate"` +} + type Player struct { ActiveClub struct { Slug string `graphql:"slug"` @@ -48,6 +67,8 @@ type Player struct { BestFoot string `graphql:"bestFoot"` BirthDate time.Time `graphql:"birthDate"` CardPositions []types.Position `graphql:"cardPositions"` + CardSupply []CardSupply `graphql:"cardSupply"` + ClubMemberships []ClubMembership `graphql:"clubMemberships"` Id graphql.Id `graphql:"id"` Slug string `graphql:"slug"` DisplayName string `graphql:"displayName"`