2024-03-08 10:48:21 +00:00
|
|
|
package sorare
|
|
|
|
|
2024-04-16 11:00:57 +00:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
2024-03-08 10:48:21 +00:00
|
|
|
type ShopItem struct {
|
2024-04-16 11:00:57 +00:00
|
|
|
TypeName string `graphql:"__typename"`
|
2024-03-08 10:48:21 +00:00
|
|
|
ShopItemInterface struct {
|
2024-04-16 11:00:57 +00:00
|
|
|
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"`
|
2024-03-08 10:48:21 +00:00
|
|
|
} `graphql:"... on ShopItemInterface"`
|
|
|
|
JerseyShopItem struct {
|
|
|
|
CurrentStockCount int `graphql:"currentStockCount"`
|
|
|
|
InitialStockCount int `graphql:"initialStockCount"`
|
|
|
|
} `graphql:"... on JerseyShopItem"`
|
2024-04-16 11:00:57 +00:00
|
|
|
LevelUpShopItem struct {
|
|
|
|
Rarity string `graphql:"rarity"`
|
|
|
|
} `graphql:"... on LevelUpShopItem"`
|
2024-03-08 10:48:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type ShopItemType string
|
|
|
|
|
|
|
|
const (
|
|
|
|
ShopItemTypeJersey ShopItemType = "JERSEY"
|
|
|
|
ShopItemTypeBanner ShopItemType = "BANNER"
|
|
|
|
ShopItemTypeLogo ShopItemType = "LOGO"
|
|
|
|
ShopItemTypeShield ShopItemType = "SHIELD"
|
|
|
|
ShopItemTypeLevelUp ShopItemType = "LEVEL_UP"
|
|
|
|
ShopItemTypeExtraSwap ShopItemType = "EXTRA_SWAP"
|
|
|
|
ShopItemTypeExtraTeamsCap ShopItemType = "EXTRA_TEAMS_CAP"
|
|
|
|
ShopItemTypeRecoveryKit ShopItemType = "RECOVERY_KIT"
|
|
|
|
ShopItemTypeXpRestore ShopItemType = "XP_RESTORE"
|
|
|
|
ShopItemTypeDeliverableWithNoVariant ShopItemType = "DELIVERABLE_WITH_NO_VARIANT"
|
|
|
|
)
|
|
|
|
|
|
|
|
type ShopItemsParams struct {
|
|
|
|
Types []ShopItemType `graphql:"types"`
|
|
|
|
UnlockedOnly bool `graphql:"unlockedOnly"`
|
|
|
|
}
|