diff --git a/football/player.go b/football/player.go index 959341b..07a9b39 100644 --- a/football/player.go +++ b/football/player.go @@ -40,13 +40,19 @@ type CardSupply struct { 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 Membership struct { + Id graphql.Id `graphql:"id"` + StartDate time.Time `graphql:"startDate"` + EndDate *time.Time `graphql:"endDate"` + MembershipTeam struct { + TypeName string `graphql:"__typename"` + Club struct { + Slug string `graphql:"slug"` + } `graphql:"... on Club"` + NationalTeam struct { + Slug string `graphql:"slug"` + } `graphql:"... on NationalTeam"` + } `graphql:"membershipTeam"` } type Player struct { @@ -68,8 +74,8 @@ type Player struct { BirthDate time.Time `graphql:"birthDate"` CardPositions []types.Position `graphql:"cardPositions"` CardSupply []CardSupply `graphql:"cardSupply"` - ClubMemberships []ClubMembership `graphql:"clubMemberships"` Id graphql.Id `graphql:"id"` + Memberships []Membership `graphql:"memberships"` Slug string `graphql:"slug"` DisplayName string `graphql:"displayName"` FirstName string `graphql:"firstName"`