sorare/shop_item.go

46 lines
1.6 KiB
Go
Raw Permalink Normal View History

2024-03-08 10:48:21 +00:00
package sorare
import (
"time"
)
2024-03-08 10:48:21 +00:00
type ShopItem struct {
TypeName string `graphql:"__typename"`
2024-03-08 10:48:21 +00:00
ShopItemInterface struct {
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"`
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"`
}