Documentation
¶
Index ¶
- func NewCountriesQuery(c *graphql.Client) *graphql.Query[[]Country, graphql.SlugsParams]
- func NewCountryQuery(c *graphql.Client) *graphql.Query[Country, graphql.SlugParams]
- type Country
- type CurrentUser
- type ShopItem
- type ShopItemType
- type ShopItemsParams
- type Sorare
- func (s *Sorare) Authenticate(ctx context.Context, email string, password string, audience string, ...) error
- func (s *Sorare) Debug() *Sorare
- func (s *Sorare) GetCurrentToken() graphql.JwtToken
- func (s *Sorare) GetRawQuery(query interface{}, variables map[string]interface{}) (string, error)
- func (s *Sorare) Query(ctx context.Context, query interface{}, variables map[string]interface{}) error
- func (s *Sorare) SetDefaultSettlementCurrencies(currencies []types.SupportedCurrency)
- func (s *Sorare) SetJWTToken(token graphql.JwtToken, audience string)
- type User
- type UserBuyingTokenAuctionsParams
- type UserTokensParams
- type Users
- func (u *Users) BoughtSingleSaleTokenOffers(userSlug string) *graphql.PaginatedQuery[tokens.TokenOffer, UserTokensParams]
- func (u *Users) BuyingTokenAuctions(userSlug string) *graphql.Query[[]tokens.TokenAuction, UserBuyingTokenAuctionsParams]
- func (u *Users) EndedWithNoBuyerSingleSaleTokenOffers(userSlug string) *graphql.PaginatedQuery[tokens.TokenOffer, UserTokensParams]
- func (u *Users) FootballCards(userSlug string) *graphql.PaginatedQuery[football.Card, football.CardsParams]
- func (u *Users) LiveSingleSaleTokenOffers(userSlug string) *graphql.PaginatedQuery[tokens.TokenOffer, UserTokensParams]
- func (u *Users) LostTokenAuctions(userSlug string) *graphql.PaginatedQuery[tokens.TokenAuction, UserTokensParams]
- func (u *Users) SingleSaleTokenOffers(userSlug string) *graphql.PaginatedQuery[tokens.TokenOffer, UserTokensParams]
- func (u *Users) SoldSingleSaleTokenOffers(userSlug string) *graphql.PaginatedQuery[tokens.TokenOffer, UserTokensParams]
- func (u *Users) TokenAuctions(userSlug string) *graphql.PaginatedQuery[tokens.TokenAuction, UserTokensParams]
- func (u *Users) WonTokenAuctions(userSlug string) *graphql.PaginatedQuery[tokens.TokenAuction, UserTokensParams]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCountriesQuery ¶
func NewCountryQuery ¶
Types ¶
type Country ¶
type Country struct { Id graphql.Id `graphql:"id"` Code string `graphql:"code"` Slug string `graphql:"slug"` ThreeLetterCode string `graphql:"threeLetterCode"` SubscriptionsCount int `graphql:"subscriptionsCount"` FlagFlat64Url string `graphql:"flagFlat64:flagUrl(shape:\"flat\", size:64)"` FlagFlat32Url string `graphql:"flagFlat32:flagUrl(shape:\"flat\", size:32)"` FlagRound64Url string `graphql:"flagRound64:flagUrl(shape:\"round\", size:64)"` FlagRound32Url string `graphql:"flatRound32:flagUrl(shape:\"round\", size:32)"` }
type CurrentUser ¶
type CurrentUser struct { ApiKey string `graphql:"apiKey"` AvailableBalance decimal.Decimal `graphql:"availableBalance"` AvailableBalanceForWithdrawal decimal.Decimal `graphql:"availableBalanceForWithdrawal"` BankBalance decimal.Decimal `graphql:"bankBalance"` BankMappedEthereumAddress string `graphql:"bankMappedEthereumAddress"` BankMappedEthereumAddressApprovedBank bool `graphql:"bankMappedEthereumAddressApprovedBank"` BetaTester bool `graphql:"betaTester"` BlockchainCardsInLineups []string `graphql:"blockchainCardsInLineups"` BlockedUntil time.Time `graphql:"blockedUntil"` CoinBalance int `graphql:"coinBalance"` Confirmed bool `graphql:"confirmed"` ConfirmedDevice bool `graphql:"confirmedDevice"` DepositedEth bool `graphql:"depositedEth"` Email string `graphql:"email"` FiatEnabled bool `graphql:"fiatEnabled"` FootballLast30DaysLineupsCount int `graphql:"footballLast30DaysLineupsCount"` FromPath string `graphql:"fromPath"` // contains filtered or unexported fields }
type ShopItem ¶
type ShopItem struct { ShopItemInterface struct { Id string `graphql:"id"` Name string `graphql:"name"` Price int `graphql:"price"` } `graphql:"... on ShopItemInterface"` JerseyShopItem struct { CurrentStockCount int `graphql:"currentStockCount"` InitialStockCount int `graphql:"initialStockCount"` LimitPerUser int `graphql:"limitPerUser"` } `graphql:"... on JerseyShopItem"` }
type ShopItemType ¶
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 ¶
type ShopItemsParams struct { Types []ShopItemType `graphql:"types"` UnlockedOnly bool `graphql:"unlockedOnly"` }
type Sorare ¶
type Sorare struct { Client *graphql.Client Football *football.Football Users *Users Country *graphql.Query[Country, graphql.SlugParams] Countries *graphql.Query[[]Country, graphql.SlugsParams] Tokens *tokens.Tokens ShopItems *graphql.PaginatedQuery[ShopItem, ShopItemsParams] Mutations *mutations.Mutations Subscriptions *subscriptions.Subscriptions // contains filtered or unexported fields }
func (*Sorare) Authenticate ¶
func (*Sorare) GetCurrentToken ¶
func (*Sorare) GetRawQuery ¶
func (*Sorare) SetDefaultSettlementCurrencies ¶
func (s *Sorare) SetDefaultSettlementCurrencies(currencies []types.SupportedCurrency)
type User ¶
type User struct { AvatarUrl string `graphql:"avatarUrl"` // contains filtered or unexported fields }
type UserTokensParams ¶
type UserTokensParams struct { SortByEndDate *types.SortingOption `graphql:"sortByEndDate"` Sport []types.Sport `graphql:"sport"` }
type Users ¶
type Users struct { User *graphql.Query[User, graphql.SlugParams] UserById *graphql.Query[User, graphql.IdParams] Users *graphql.Query[[]User, graphql.SlugsParams] CurrentUser *graphql.Query[CurrentUser, graphql.EmptyParams] // contains filtered or unexported fields }
func (*Users) BoughtSingleSaleTokenOffers ¶
func (u *Users) BoughtSingleSaleTokenOffers( userSlug string, ) *graphql.PaginatedQuery[tokens.TokenOffer, UserTokensParams]
func (*Users) BuyingTokenAuctions ¶
func (u *Users) BuyingTokenAuctions( userSlug string, ) *graphql.Query[[]tokens.TokenAuction, UserBuyingTokenAuctionsParams]
func (*Users) EndedWithNoBuyerSingleSaleTokenOffers ¶
func (u *Users) EndedWithNoBuyerSingleSaleTokenOffers( userSlug string, ) *graphql.PaginatedQuery[tokens.TokenOffer, UserTokensParams]
func (*Users) FootballCards ¶
func (u *Users) FootballCards( userSlug string, ) *graphql.PaginatedQuery[football.Card, football.CardsParams]
func (*Users) LiveSingleSaleTokenOffers ¶
func (u *Users) LiveSingleSaleTokenOffers( userSlug string, ) *graphql.PaginatedQuery[tokens.TokenOffer, UserTokensParams]
func (*Users) LostTokenAuctions ¶
func (u *Users) LostTokenAuctions( userSlug string, ) *graphql.PaginatedQuery[tokens.TokenAuction, UserTokensParams]
func (*Users) SingleSaleTokenOffers ¶
func (u *Users) SingleSaleTokenOffers( userSlug string, ) *graphql.PaginatedQuery[tokens.TokenOffer, UserTokensParams]
func (*Users) SoldSingleSaleTokenOffers ¶
func (u *Users) SoldSingleSaleTokenOffers( userSlug string, ) *graphql.PaginatedQuery[tokens.TokenOffer, UserTokensParams]
func (*Users) TokenAuctions ¶
func (u *Users) TokenAuctions( userSlug string, ) *graphql.PaginatedQuery[tokens.TokenAuction, UserTokensParams]
func (*Users) WonTokenAuctions ¶
func (u *Users) WonTokenAuctions( userSlug string, ) *graphql.PaginatedQuery[tokens.TokenAuction, UserTokensParams]
Click to show internal directories.
Click to hide internal directories.