api

package
v0.3.6-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountExperienceResponseBody

type AccountExperienceResponseBody struct {
	Version  uint16 `json:"Version"`
	PUUID    string `json:"Subject"`
	Progress struct {
		Level uint32 `json:"Level"`
		XP    uint64 `json:"XP"`
	} `json:"Progress"`
	History []struct {
		MatchID       string `json:"ID"`
		MatchStart    string `json:"MatchStart"` // ISO 8601 Date
		StartProgress struct {
			Level uint32 `json:"Level"`
			XP    uint64 `json:"XP"`
		} `json:"StartProgress"`
		EndProgress struct {
			Level uint32 `json:"Level"`
			XP    uint64 `json:"XP"`
		} `json:"EndProgress"`
		XPDelta   uint32 `json:"XPDelta"`
		XPSources struct {
			ID     string `json:"ID"`
			Amount uint32 `json:"Amount"`
		} `json:"XPSources"`
	} `json:"History"`
	LastGrantedFirstWin   string `json:"LastTimeGrantedFirstWin"`   // ISO 8601 Date
	NextFirstWinAvailable string `json:"NextTimeFirstWinAvailable"` // ISO 8601 Date
}

func GetAccountXP

func GetAccountXP(shard, puuid string) (*AccountExperienceResponseBody, error)

type CompetitiveUpdatesOptions

type CompetitiveUpdatesOptions struct {
	StartIndex uint16
	EndIndex   uint16
}

type CompetitiveUpdatesResponseBody

type CompetitiveUpdatesResponseBody struct {
	Version uint16 `json:"Version"`
	PUUID   string `json:"Subject"`
	Matches []struct {
		MatchID                      string `json:"MatchID"`
		MapID                        string `json:"MapID"`
		SeasonID                     string `json:"SeasonID"`
		MatchStartTime               uint64 `json:"MatchStartTime"`
		TierAfterUpdate              uint8  `json:"TierAfterUpdate"`
		TierBeforeUpdate             uint8  `json:"TierBeforeUpdate"`
		RankedRatingAfterUpdate      uint8  `json:"RankedRatingAfterUpdate"`
		RankedRatingBeforeUpdate     uint8  `json:"RankedRatingBeforeUpdate"`
		RankedRatingEarned           int8   `json:"RankedRatingEarned"`
		RankedRatingPerformanceBonus uint8  `json:"RankedRatingPerformanceBonus"`
		CompetitiveMovement          string `json:"CompetitiveMovement"`
		AFKPenalty                   int8   `json:"AFKPenalty"`
	} `json:"Matches"`
}

func GetCompetitiveUpdates

func GetCompetitiveUpdates(shard, puuid string, options *CompetitiveUpdatesOptions) (*CompetitiveUpdatesResponseBody, error)

type LeaderboardOptions

type LeaderboardOptions struct {
	StartIndex uint16
	Size       uint16
	Query      string
}

type LeaderboardResponseBody

type LeaderboardResponseBody struct {
	Deployment string `json:"Deployment"`
	QueueID    string `json:"QueueID"`
	SeasonID   string `json:"SeasonID"`
	Players    struct {
		PlayerCardID    string `json:"PlayerCardID"`
		TitleID         string `json:"TitleID"`
		IsBanned        bool   `json:"IsBanned"`
		IsAnonymized    bool   `json:"IsAnonymized"`
		PUUID           string `json:"puuid"`
		GameName        string `json:"gameName"`
		TagLine         string `json:"tagLine"`
		LeaderboardRank uint16 `json:"leaderboardRank"`
		RankedRating    uint16 `json:"rankedRating"`
		Wins            uint16 `json:"numberOfWins"`
		Tier            uint8  `json:"competitiveTier"`
	} `json:"Players"`
	TotalPlayers          uint16 `json:"totalPlayers"`
	ImmortalStartingPage  uint16 `json:"immortalStartingPage"`
	ImmortalStartingIndex uint16 `json:"immortalStartingIndex"`
	TopTierRRThreshold    uint16 `json:"topTierRRThreshold"`
	TierDetails           map[string]struct {
		RankedRatingThreshold uint16 `json:"rankedRatingThreshold"`
		StartingIndex         uint16 `json:"startingIndex"`
	} `json:"tierDetails"`
	StartIndex uint16 `json:"startIndex"`
	Query      string `json:"query"`
}

func GetLeaderboard

func GetLeaderboard(shard, seasonID string, options *LeaderboardOptions) (*LeaderboardResponseBody, error)

type MatchDetailsResponseBody

type MatchDetailsResponseBody struct {
	MatchInfo struct {
		MatchID                     string            `json:"matchId"`
		MapID                       string            `json:"mapID"`
		GamePodID                   string            `json:"gamePodId"`
		GameLoopZone                string            `json:"gameLoopZone"`
		GameServerAddress           string            `json:"gameServerAddress"`
		GameVersion                 string            `json:"gameVersion"`
		GameLengthMillis            uint32            `json:"gameLengthMillis"`
		GameStartMillis             uint64            `json:"gameStartMillis"`
		ProvisioningFlowID          string            `json:"provisioningFlowID"`
		IsCompleted                 bool              `json:"isCompleted"`
		CustomGameName              string            `json:"customGameName"`
		ForcePostProcessing         bool              `json:"forcePostProcessing"`
		QueueID                     string            `json:"queueID"`
		GameMode                    string            `json:"gameMode"`
		IsRanked                    bool              `json:"isRanked"`
		IsSampled                   bool              `json:"isMatchSampled"`
		SeasonID                    string            `json:"seasonId"`
		CompletionState             string            `json:"completionState"`
		PlatformType                string            `json:"platformType"`
		PremierMatchInfo            struct{}          `json:"premierMatchInfo"`
		PartyRRPenalties            map[string]uint16 `json:"partyRRPenalties"`
		ShouldMatchDisablePenalties bool              `json:"shouldMatchDisablePenalties"`
	} `json:"matchInfo"`
	Players []struct {
		PUUID        string `json:"subject"`
		GameName     string `json:"gameName"`
		TagLine      string `json:"tagLine"`
		PlatformInfo struct {
			PlatformType      string `json:"platformType"`
			PlatformOS        string `json:"platformOS"`
			PlatformOSVersion string `json:"platformOSVersion"`
			PlatformChipset   string `json:"platformChipset"`
		} `json:"platformInfo"`
		TeamID      string `json:"teamId"`
		CharacterID string `json:"characterId"`
		Stats       struct {
			Score          uint16 `json:"score"`
			RoundsPlayed   uint8  `json:"roundsPlayed"`
			Kills          uint8  `json:"kills"`
			Deaths         uint8  `json:"deaths"`
			Assists        uint8  `json:"assists"`
			PlaytimeMillis uint32 `json:"playtimeMillis"`
			AbilityCasts   struct {
				GrenadeCasts  uint8 `json:"grenadeCasts"`
				Ability1Casts uint8 `json:"ability1Casts"`
				Ability2Casts uint8 `json:"ability2Casts"`
				UltimateCasts uint8 `json:"ultimateCasts"`
			} `json:"abilityCasts"`
		} `json:"stats"`
		RoundDamage []struct {
			Round    uint8  `json:"round"`
			Receiver string `json:"receiver"`
			Damage   uint16 `json:"damage"`
		} `json:"roundDamage"`
		CompetitiveTier        uint8  `json:"competitiveTier"`
		IsObserver             bool   `json:"isObserver"`
		PlayerCard             string `json:"playerCard"`
		PlayerTitle            string `json:"playerTitle"`
		PreferredLevelBorder   string `json:"preferredLevelBorder"`
		AccountLevel           uint16 `json:"accountLevel"`
		SessionPlaytimeMinutes uint16 `json:"sessionPlaytimeMinutes"`
		XpModifications        []struct {
			Value float32 `json:"Value"`
			ID    string  `json:"ID"`
		} `json:"xpModifications"`
		BehaviorFactors struct {
			AFKRounds                   uint8   `json:"afkRounds"`
			Collisions                  float32 `json:"collisions"`
			CommsRatingRecovery         uint32  `json:"commsRatingRecovery"`
			DamageParticipationOutgoing uint32  `json:"damageParticipationOutgoing"`
			FriendlyFireIncoming        uint32  `json:"friendlyFireIncoming"`
			FriendlyFireOutgoing        uint32  `json:"friendlyFireOutgoing"`
			MouseMovement               uint32  `json:"mouseMovement"`
			StayedInSpawnRounds         uint32  `json:"stayedInSpawnRounds"`
		} `json:"behaviorFactors"`
	} `json:"players"`
	Bots    []struct{} `json:"bots"`
	Coaches []struct {
		PUUID  string `json:"subject"`
		TeamID string `json:"teamId"`
	} `json:"coaches"`
	Teams []struct {
		TeamID       string `json:"teamId"`
		Won          bool   `json:"won"`
		RoundsPlayed uint8  `json:"roundsPlayed"`
		RoundsWon    uint8  `json:"roundsWon"`
		NumPoints    uint8  `json:"numPoints"`
	} `json:"teams"`
	Rounds []struct {
		Number               uint8  `json:"roundNum"`
		Result               string `json:"roundResult"`
		Ceremony             string `json:"roundCeremony"`
		WinningTeam          string `json:"winningTeam"`
		SpikePlanter         string `json:"bombPlanter"`
		SpikeDefuser         string `json:"bombDefuser"`
		PlantRoundTime       uint32 `json:"plantRoundTime"`
		PlantPlayerLocations []struct {
			PUUID       string  `json:"subject"`
			ViewRadians float32 `json:"viewRadians"`
			Location    struct {
				X int32 `json:"x"`
				Y int32 `json:"y"`
			} `json:"location"`
		} `json:"plantPlayerLocations"`
		PlantLocation struct {
			X int32 `json:"x"`
			Y int32 `json:"y"`
		} `json:"plantLocation"`
		PlantSite             string `json:"plantSite"`
		DefuseRoundTime       uint32 `json:"defuseRoundTime"`
		DefusePlayerLocations []struct {
			PUUID       string  `json:"subject"`
			ViewRadians float32 `json:"viewRadians"`
			Location    struct {
				X int32 `json:"x"`
				Y int32 `json:"y"`
			} `json:"location"`
		} `json:"defusePlayerLocations"`
		DefuseLocation struct {
			X int32 `json:"x"`
			Y int32 `json:"y"`
		} `json:"defuseLocation"`
		PlayerStats []struct {
			PUUID string `json:"subject"`
			Kills []struct {
				GameTime       uint32 `json:"gameTime"`
				RoundTime      uint32 `json:"roundTime"`
				Killer         string `json:"killer"`
				Victim         string `json:"victim"`
				VictimLocation struct {
					X int32 `json:"x"`
					Y int32 `json:"y"`
				} `json:"victimLocation"`
				Assistants      []string `json:"assistants"`
				PlayerLocations []struct {
					PUUID       string  `json:"subject"`
					ViewRadians float32 `json:"viewRadians"`
					Location    struct {
						X int32 `json:"x"`
						Y int32 `json:"y"`
					} `json:"location"`
				} `json:"playerLocations"`
				FinishingDamage struct {
					Type                  string `json:"damageType"`
					Item                  string `json:"damageItem"`
					UsedSecondaryFireMode bool   `json:"isSecondaryFireMode"`
				} `json:"finishingDamage"`
			} `json:"kills"`
			Damages []struct {
				Receiver  string `json:"receiver"`
				Damage    uint16 `json:"damage"`
				Legshots  uint8  `json:"legshots"`
				Bodyshots uint8  `json:"bodyshots"`
				Headshots uint8  `json:"headshots"`
			} `json:"damage"`
			Score   uint16 `json:"score"`
			Economy struct {
				LoadoutValue     uint16 `json:"loadoutValue"`
				Weapon           string `json:"weapon"`
				Armor            string `json:"armor"`
				RemainingCredits uint16 `json:"remaining"`
				CreditsSpent     uint16 `json:"spent"`
			} `json:"economy"`
			WasAfk        bool `json:"wasAfk"`
			WasPenalized  bool `json:"wasPenalized"`
			StayedInSpawn bool `json:"stayedInSpawn"`
		} `json:"playerStats"`
		ResultCode      string `json:"roundResultCode"`
		PlayerEconomies []struct {
			PUUID            string `json:"subject"`
			LoadoutValue     uint16 `json:"loadoutValue"`
			Weapon           string `json:"weapon"`
			Armor            string `json:"armor"`
			RemainingCredits uint16 `json:"remaining"`
			CreditsSpent     uint16 `json:"spent"`
		} `json:"playerEconomies"`
		PlayerScores []struct {
			PUUID string `json:"subject"`
			Score uint16 `json:"score"`
		} `json:"playerScores"`
	} `json:"roundResults"`

	Kills []struct {
		GameTime       uint32 `json:"gameTime"`
		RoundTime      uint32 `json:"roundTime"`
		Killer         string `json:"killer"`
		Victim         string `json:"victim"`
		VictimLocation struct {
			X int32 `json:"x"`
			Y int32 `json:"y"`
		} `json:"victimLocation"`
		Assistants      []string `json:"assistants"`
		PlayerLocations []struct {
			PUUID       string  `json:"subject"`
			ViewRadians float32 `json:"viewRadians"`
			Location    struct {
				X int32 `json:"x"`
				Y int32 `json:"y"`
			} `json:"location"`
		} `json:"playerLocations"`
		FinishingDamage struct {
			Type                  string `json:"damageType"`
			Item                  string `json:"damageItem"`
			UsedSecondaryFireMode bool   `json:"isSecondaryFireMode"`
		} `json:"finishingDamage"`
		Round uint8 `json:"round"`
	} `json:"kills"`
}

func GetMatchDetails

func GetMatchDetails(shard, uuid string) (*MatchDetailsResponseBody, error)

type MatchHistoryOptions

type MatchHistoryOptions struct {
	StartIndex uint16
	EndIndex   uint16
	Queue      string
}

type MatchHistoryResponseBody

type MatchHistoryResponseBody struct {
	PUUID         string `json:"Subject"`
	StartingIndex uint16 `json:"BeginIndex"`
	EndingIndex   uint16 `json:"EndIndex"`
	Total         uint16 `json:"Total"`
	History       []struct {
		MatchID       string `json:"MatchID"`
		GameStartTime uint64 `json:"GameStartTime"`
		QueueID       string `json:"QueueID"`
	} `json:"History"`
}

func GetMatchHistory

func GetMatchHistory(shard, puuid string, options *MatchHistoryOptions) (*MatchHistoryResponseBody, error)

type NameServiceRequestBody

type NameServiceRequestBody []string

type NameServiceResponseBody

type NameServiceResponseBody struct {
	DisplayName string `json:"DisplayName"`
	Subject     string `json:"Subject"`
	GameName    string `json:"GameName"`
	TagLine     string `json:"TagLine"`
}

func GetNameService

func GetNameService(shard, subject string) (*NameServiceResponseBody, error)

type OwnedItemsResponseBody

type OwnedItemsResponseBody struct {
	EntitlementsByTypes []struct {
		ItemTypeID   string `json:"ItemTypeID"`
		Entitlements []struct {
			TypeID     string `json:"TypeID"`
			ItemID     string `json:"ItemID"`
			InstanceID string `json:"InstanceID"`
		} `json:"Entitlements"`
	} `json:"EntitlementsByTypes"`
}

func GetOwnedItems

func GetOwnedItems(shard, puuid, itemType string) (*OwnedItemsResponseBody, error)

type PlayerLoadoutResponseBody

type PlayerLoadoutResponseBody struct {
	PUUID   string `json:"Subject"`
	Version uint16 `json:"Version"`
	Guns    []struct {
		ID              string `json:"ID"`
		CharmInstanceID string `json:"CharmInstanceID"`
		CharmID         string `json:"CharmID"`
		CharmLevelID    string `json:"CharmLevelID"`
		SkinID          string `json:"SkinID"`
		SkinLevelID     string `json:"SkinLevelID"`
		ChromaID        string `json:"ChromaID"`
	} `json:"Guns"`
	Sprays []struct {
		EquipSlotID string `json:"EquipSlotID"`
		SprayID     string `json:"SprayID"`
	} `json:"Sprays"`
	Identity struct {
		PlayerCardID           string `json:"PlayerCardID"`
		PlayerTitleID          string `json:"PlayerTitleID"`
		AccountLevel           uint32 `json:"AccountLevel"`
		PreferredLevelBorderID string `json:"PreferredLevelBorderID"`
		HideAccountLevel       bool   `json:"HideAccountLevel"`
	} `json:"Identity"`
	Incognito bool `json:"Incognito"`
}

func GetPlayerLoadout

func GetPlayerLoadout(shard, puuid string) (*PlayerLoadoutResponseBody, error)

type PlayerMMRResponseBody

type PlayerMMRResponseBody struct {
	Version                     uint16 `json:"Version"`
	PUUID                       string `json:"Subject"`
	NewPlayerExperienceFinished bool   `json:"NewPlayerExperienceFinished"`
	QueueSkills                 map[string]struct {
		TotalGamesNeededForRating         uint8 `json:"TotalGamesNeededForRating"`
		TotalGamesNeededForLeaderboard    uint8 `json:"TotalGamesNeededForLeaderboard"`
		CurrentSeasonGamesNeededForRating uint8 `json:"CurrentSeasonGamesNeededForRating"`
		SeasonalInfoBySeasonID            map[string]struct {
			SeasonID                   string            `json:"SeasonID"`
			NumberOfWins               uint32            `json:"NumberOfWins"`
			NumberOfWinsWithPlacements uint32            `json:"NumberOfWinsWithPlacements"`
			NumberOfGames              uint32            `json:"NumberOfGames"`
			Rank                       uint8             `json:"Rank"`
			CapstoneWins               uint32            `json:"CapstoneWins"`
			LeaderboardRank            uint32            `json:"LeaderboardRank"`
			CompetitiveTier            uint8             `json:"CompetitiveTier"`
			RankedRating               uint8             `json:"RankedRating"`
			WinsByTier                 map[string]uint32 `json:"WinsByTier"`
			GamesNeededForRating       uint8             `json:"GamesNeededForRating"`
			TotalWinsNeededForRank     uint8             `json:"TotalWinsNeededForRank"`
		} `json:"SeasonalInfoBySeasonID"`
	} `json:"QueueSkills"`
	LatestCompetitiveUpdate struct {
		MatchID                      string `json:"MatchID"`
		MapID                        string `json:"MapID"`
		SeasonID                     string `json:"SeasonID"`
		MatchStartTime               uint64 `json:"MatchStartTime"`
		TierAfterUpdate              uint8  `json:"TierAfterUpdate"`
		TierBeforeUpdate             uint8  `json:"TierBeforeUpdate"`
		RankedRatingAfterUpdate      uint8  `json:"RankedRatingAfterUpdate"`
		RankedRatingBeforeUpdate     uint8  `json:"RankedRatingBeforeUpdate"`
		RankedRatingEarned           uint8  `json:"RankedRatingEarned"`
		RankedRatingPerformanceBonus uint8  `json:"RankedRatingPerformanceBonus"`
		CompetitiveMovement          string `json:"CompetitiveMovement"`
		AFKPenalty                   uint8  `json:"AFKPenalty"`
	} `json:"LatestCompetitiveUpdate"`
	IsLeaderboardAnonymized bool `json:"IsLeaderboardAnonymized"`
	IsActRankBadgeHidden    bool `json:"IsActRankBadgeHidden"`
}

func GetPlayerMMR

func GetPlayerMMR(shard, puuid string) (*PlayerMMRResponseBody, error)

type PricesResponseBody

type PricesResponseBody struct {
	Offers []struct {
		OfferID          string            `json:"OfferID"`
		IsDirectPurchase bool              `json:"IsDirectPurchase"`
		StartDate        string            `json:"StartDate"` // ISO 1806 Date
		Cost             map[string]uint32 `json:"Cost"`
		Rewards          []struct {
			ItemTypeID string `json:"ItemTypeID"`
			ItemID     string `json:"ItemID"`
			Quantity   uint8  `json:"Quantity"`
		} `json:"Rewards"`
	} `json:"Offers"`
}

func GetStorePrices

func GetStorePrices(shard string) (*PricesResponseBody, error)

type StoreFrontResponseBody

type StoreFrontResponseBody struct {
	FeaturedBundle struct {
		Bundle struct {
			ID          string `json:"ID"`
			DataAssetID string `json:"DataAssetID"`
			CurrencyID  string `json:"CurrencyID"`
			Items       []struct {
				Item struct {
					ItemTypeID string `json:"ItemTypeID"`
					ItemID     string `json:"ItemID"`
					Amount     uint8  `json:"Amount"`
				} `json:"Item"`
				CurrencyID      string  `json:"CurrencyID"`
				DiscountPercent float32 `json:"DiscountPercent"`
				DiscountPrice   uint32  `json:"DiscountPrice"`
				IsPromoItem     bool    `json:"IsPromoItem"`
			} `json:"Items"`
			ItemOffers []struct {
				BundleItemOfferID string `json:"BundleItemOfferID"`
				Offer             struct {
					OfferID          string           `json:"OfferID"`
					IsDirectPurchase bool             `json:"IsDirectPurchase"`
					StartDate        string           `json:"StartDate"` // ISO 8601 Date
					Cost             map[string]int32 `json:"Cost"`
					Rewards          []struct {
						ItemTypeID string `json:"ItemTypeID"`
						ItemID     string `json:"ItemID"`
						Quantity   uint16 `json:"Quantity"`
					} `json:"Rewards"`
				} `json:"Offer"`
				DiscountPercent float32           `json:"DiscountPercent"`
				DiscountedCost  map[string]uint32 `json:"DiscountedCost"`
			} `json:"ItemOffers"`
			TotalBaseCost              map[string]uint32 `json:"TotalBaseCost"`
			TotalDiscountedCost        map[string]uint32 `json:"TotalDiscountedCost"`
			TotalDiscountPercent       uint32            `json:"TotalDiscountPercent"`
			DurationRemainingInSeconds uint64            `json:"DurationRemainingInSeconds"`
			WholesaleOnly              bool              `json:"WholesaleOnly"`
		} `json:"Bundle"`
		Bundles []struct {
			ID          string `json:"ID"`
			DataAssetID string `json:"DataAssetID"`
			CurrencyID  string `json:"CurrencyID"`
			Items       []struct {
				Item struct {
					ItemTypeID string `json:"ItemTypeID"`
					ItemID     string `json:"ItemID"`
					Amount     uint8  `json:"Amount"`
				} `json:"Item"`
				BasePrice       uint32  `json:"BasePrice"`
				CurrencyID      string  `json:"CurrencyID"`
				DiscountPercent float32 `json:"DiscountPercent"`
				DiscountedPrice uint32  `json:"DiscountedPrice"`
				IsPromoItem     bool    `json:"IsPromoItem"`
			} `json:"Items"`
			ItemOffers []struct {
				BundleItemOfferID string `json:"BundleItemOfferID"`
				Offer             struct {
					OfferID          string           `json:"OfferID"`
					IsDirectPurchase bool             `json:"IsDirectPurchase"`
					StartDate        string           `json:"StartDate"` // ISO 8601 Date
					Cost             map[string]int32 `json:"Cost"`
					Rewards          []struct {
						ItemTypeID string `json:"ItemTypeID"`
						ItemID     string `json:"ItemID"`
						Quantity   uint16 `json:"Quantity"`
					} `json:"Rewards"`
				} `json:"Offer"`
				DiscountPercent float32           `json:"DiscountPercent"`
				DiscountedCost  map[string]uint32 `json:"DiscountedCost"`
			} `json:"ItemOffers"`
			TotalBaseCost              map[string]uint32 `json:"TotalBaseCost"`
			TotalDiscountedCost        map[string]uint32 `json:"TotalDiscountedCost"`
			TotalDiscountPercent       float32           `json:"TotalDiscountPercent"`
			DurationRemainingInSeconds uint64            `json:"DurationRemainingInSeconds"`
			WholesaleOnly              bool              `json:"WholesaleOnly"`
		} `json:"Bundles"`
		BundleRemainingDurationInSeconds uint32
	} `json:"FeaturedBundle"`
	SkinsPanelLayout struct {
		SingleItemOffers      []string `json:"SingleItemOffers"`
		SingleItemStoreOffers []struct {
			OfferID          string            `json:"OfferID"`
			IsDirectPurchase bool              `json:"IsDirectPurchase"`
			StartDate        string            `json:"StartDate"` // ISO 8601 Date
			Cost             map[string]uint32 `json:"Cost"`
			Rewards          []struct {
				ItemTypeID string `json:"ItemTypeID"`
				ItemID     string `json:"ItemID"`
				Quantity   uint8  `json:"Quantity"`
			} `json:"Rewards"`
		} `json:"SingleItemStoreOffers"`
		SingleItemOffersRemainingDurationInSeconds uint32 `json:"SingleItemOffersRemainingDurationInSeconds"`
	} `json:"SkinsPanelLayout"`
	UpgradeCurrencyStore struct {
		UpgradeCurrencyOffers []struct {
			OfferID          string `json:"OfferID"`
			StorefrontItemID string `json:"StorefrontItemID"`
			Offer            struct {
				OfferID          string            `json:"OfferID"`
				IsDirectPurchase bool              `json:"IsDirectPurchase"`
				StartDate        string            `json:"StartDate"` // ISO 8601 Date
				Cost             map[string]uint32 `json:"Cost"`
				Rewards          []struct {
					ItemTypeID string `json:"ItemTypeID"`
					ItemID     string `json:"ItemID"`
					Quantity   uint8  `json:"Quantity"`
				} `json:"Rewards"`
			} `json:"Offer"`
			DiscountedPercent float32 `json:"DiscountedPercent"`
		} `json:"UpgradeCurrencyOffers"`
	} `json:"UpgradeCurrencyStore"`
	AccessoryStore struct {
		AccessoryStoreOffers []struct {
			Offer struct {
				OfferID          string            `json:"OfferID"`
				IsDirectPurchase bool              `json:"IsDirectPurchase"`
				StartDate        string            `json:"StartDate"` // ISO 8601 Date
				Cost             map[string]uint32 `json:"Cost"`
				Rewards          []struct {
					ItemTypeID string `json:"ItemTypeID"`
					ItemID     string `json:"ItemID"`
					Quantity   uint8  `json:"Quantity"`
				} `json:"Rewards"`
			} `json:"Offer"`
			ContractID string `json:"ContractID"`
		} `json:"AccessoryStoreOffers"`
		AccessoryStoreRemainingDurationInSeconds uint32 `json:"AccessoryStoreRemainingDurationInSeconds"`
		StorefrontID                             string `json:"StorefrontID"`
	} `json:"AccessoryStore"`
	NightMarket struct {
		Offers []struct {
			BonusOfferID string `json:"BonusOfferID"`
			Offer        struct {
				OfferID          string            `json:"OfferID"`
				IsDirectPurchase bool              `json:"IsDirectPurchase"`
				StartDate        string            `json:"StartDate"` // ISO 8601 Date
				Cost             map[string]uint32 `json:"Cost"`
				Rewards          []struct {
					ItemTypeID string `json:"ItemTypeID"`
					ItemID     string `json:"ItemID"`
					Quantity   uint8  `json:"Quantity"`
				} `json:"Rewards"`
			} `json:"Offer"`
			DiscountPercent float32           `json:"DiscountPercent"`
			DiscountCosts   map[string]uint32 `json:"DiscountCosts"`
			IsSeen          bool              `json:"IsSeen"`
		} `json:"BonusStoreOffers"`
		NightMarketRemainingDurationInSeconds uint32 `json:"BonusStoreRemainingDurationInSeconds"`
	} `json:"BonusStore"`
}

func GetStorefront

func GetStorefront(shard, puuid string) (*StoreFrontResponseBody, error)

type UserInfoResponseBody

type UserInfoResponseBody struct {
	Country       string `json:"country"`
	PlayerUUID    string `json:"sub"`
	EmailVerified bool   `json:"email_verified"`
	CountryAt     uint64 `json:"country_at"`
	Password      struct {
		ChangedAt uint64 `json:"cng_at"`
		BeenReset bool   `json:"reset"`
		MustReset bool   `json:"must_reset"`
	} `json:"pw"`
	PhoneNumberVerified        bool     `json:"phone_number_verified"`
	AccountVerified            bool     `json:"account_verified"`
	FederatedIdentityProviders []string `json:"federated_identity_providers"`
	Locale                     string   `json:"player_locale"`
	Account                    struct {
		Type      uint16 `json:"type"`
		State     string `json:"state"`
		Adm       bool   `json:"adm"`
		GameName  string `json:"game_name"`
		TagLine   string `json:"tag_line"`
		CreatedAt uint64 `json:"created_at"`
	} `json:"acct"`
	Age uint8  `json:"age"`
	JTI string `json:"jti"`
}

func GetUserInfo

func GetUserInfo() (*UserInfoResponseBody, error)

type WalletResponseBody

type WalletResponseBody struct {
	Balances map[string]uint32 `json:"Balances"`
}

func GetWallet

func GetWallet(shard, puuid string) (*WalletResponseBody, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL