From b8981ad8ece9ec3ff25ad969de8a6c3a52a5817c Mon Sep 17 00:00:00 2001 From: Laurent Le Houerou Date: Tue, 16 Apr 2024 15:00:57 +0400 Subject: [PATCH] add info relative to levelups in shopitem --- shop_item.go | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/shop_item.go b/shop_item.go index 901c739..c1f7fc2 100644 --- a/shop_item.go +++ b/shop_item.go @@ -1,16 +1,27 @@ package sorare +import ( + "time" +) + type ShopItem struct { + TypeName string `graphql:"__typename"` ShopItemInterface struct { - Id string `graphql:"id"` - Name string `graphql:"name"` - Price int `graphql:"price"` + Id string `graphql:"id"` + Name string `graphql:"name"` + Price int `graphql:"price"` + MyBalance int `graphql:"myBalance"` + LimitPerUser int `graphql:"limitPerUser"` + MyLimitResetAt time.Time `graphql:"myLimitResetAt"` + MyPurchasesCount int `graphql:"myPurchasesCount"` } `graphql:"... on ShopItemInterface"` JerseyShopItem struct { CurrentStockCount int `graphql:"currentStockCount"` InitialStockCount int `graphql:"initialStockCount"` - LimitPerUser int `graphql:"limitPerUser"` } `graphql:"... on JerseyShopItem"` + LevelUpShopItem struct { + Rarity string `graphql:"rarity"` + } `graphql:"... on LevelUpShopItem"` } type ShopItemType string