hsgd

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package hsgd contains types for the Hearthstone Game Data APIs

Index

Constants

View Source
const (
	CollectibilityCollectible   = Collectibility("1")
	CollectibilityUncollectible = Collectibility("0")
	CollectibilityBoth          = Collectibility("0,1")
)

Collectibility constants

View Source
const (
	SortManaCost = Sort("manaCost")
	SortAttack   = Sort("attack")
	SortHealth   = Sort("health")
	SortName     = Sort("name")
)

Sort constants

View Source
const (
	OrderAsc  = Order("asc")
	OrderDesc = Order("desc")
)

Order constants

View Source
const (
	MetadataTypeSets        = MetadataType("sets")
	MetadataTypeSetGroups   = MetadataType("setGroups")
	MetadataTypeTypes       = MetadataType("types")
	MetadataTypeRarities    = MetadataType("rarities")
	MetadataTypeClasses     = MetadataType("classes")
	MetadataTypeMinionTypes = MetadataType("minionTypes")
	MetadataTypeKeywords    = MetadataType("keywords")
)

MetadataType constants

View Source
const (
	GameModeConstructed   = GameMode("constructed")
	GameModeBattlegrounds = GameMode("battlegrounds")
)

GameMode constants

View Source
const (
	TierHero = Tier("hero")
	Tier1    = Tier("1")
	Tier2    = Tier("2")
	Tier3    = Tier("3")
	Tier4    = Tier("4")
	Tier5    = Tier("5")
	Tier6    = Tier("6")
)

Tier constants

View Source
const (
	CardBackCategoryBase        = CardBackCategory("base")
	CardBackCategoryAchieve     = CardBackCategory("achieve")
	CardBackCategoryFireside    = CardBackCategory("fireside")
	CardBackCategoryHeroes      = CardBackCategory("heroes")
	CardBackCategorySeason      = CardBackCategory("season")
	CardBackCategoryLegend      = CardBackCategory("legend")
	CardBackCategoryEsports     = CardBackCategory("esports")
	CardBackCategoryGameLicense = CardBackCategory("game_license")
	CardBackCategoryPromotion   = CardBackCategory("promotion")
	CardBackCategoryPrePurchase = CardBackCategory("pre_purchase")
	CardBackCategoryBlizzard    = CardBackCategory("blizzard")
	CardBackCategoryGolden      = CardBackCategory("golden")
	CardBackCategoryEvents      = CardBackCategory("events")
)

CardBackCategory constants

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

type Card struct {
	ID            int    `json:"id"`
	Collectible   int    `json:"collectible"`
	Slug          string `json:"slug"`
	ClassID       int    `json:"classId"`
	MultiClassIds []int  `json:"multiClassIds"`
	CardTypeID    int    `json:"cardTypeId"`
	CardSetID     int    `json:"cardSetId"`
	RarityID      int    `json:"rarityId"`
	ArtistName    string `json:"artistName"`
	Health        int    `json:"health"`
	Attack        int    `json:"attack"`
	ManaCost      int    `json:"manaCost"`
	Name          string `json:"name"`
	Text          string `json:"text"`
	Image         string `json:"image"`
	ImageGold     string `json:"imageGold"`
	FlavorText    string `json:"flavorText"`
	CropImage     string `json:"cropImage"`
	ChildIds      []int  `json:"childIds"`
	KeywordIds    []int  `json:"keywordIds"`
	Battlegrounds struct {
		Tier      int    `json:"tier"`
		Hero      bool   `json:"hero"`
		UpgradeID int    `json:"upgradeId"`
		Image     string `json:"image"`
		ImageGold string `json:"imageGold"`
	} `json:"battlegrounds,omitempty"`
}

Card structure

type CardBack

type CardBack struct {
	ID           int    `json:"id"`
	SortCategory int    `json:"sortCategory"`
	Text         string `json:"text"`
	Name         string `json:"name"`
	Image        string `json:"image"`
	Slug         string `json:"slug"`
}

CardBack structure

type CardBackCategory

type CardBackCategory string

CardBackCategory - base, achieve, fireside, heroes, season, legend, esports, game_license, promotion, pre_purchase, blizzard, golden, events

func (CardBackCategory) String

func (cardBackCategory CardBackCategory) String() string

type CardBackSearch

type CardBackSearch struct {
	CardBacks []CardBack `json:"cardBacks"`
	CardCount int        `json:"cardCount"`
	PageCount int        `json:"pageCount"`
	Page      int        `json:"page"`
}

CardBackSearch structure

type CardBackSearchAllLocales

type CardBackSearchAllLocales struct {
	CardBacks []struct {
		ID           int `json:"id"`
		SortCategory int `json:"sortCategory"`
		Text         struct {
			DeDE string `json:"de_DE"`
			EnUS string `json:"en_US"`
			EsES string `json:"es_ES"`
			EsMX string `json:"es_MX"`
			FrFR string `json:"fr_FR"`
			ItIT string `json:"it_IT"`
			JaJP string `json:"ja_JP"`
			KoKR string `json:"ko_KR"`
			PlPL string `json:"pl_PL"`
			PtBR string `json:"pt_BR"`
			RuRU string `json:"ru_RU"`
			ThTH string `json:"th_TH"`
			ZhCN string `json:"zh_CN"`
			ZhTW string `json:"zh_TW"`
		} `json:"text"`
		Name struct {
			DeDE string `json:"de_DE"`
			EnUS string `json:"en_US"`
			EsES string `json:"es_ES"`
			EsMX string `json:"es_MX"`
			FrFR string `json:"fr_FR"`
			ItIT string `json:"it_IT"`
			JaJP string `json:"ja_JP"`
			KoKR string `json:"ko_KR"`
			PlPL string `json:"pl_PL"`
			PtBR string `json:"pt_BR"`
			RuRU string `json:"ru_RU"`
			ThTH string `json:"th_TH"`
			ZhCN string `json:"zh_CN"`
			ZhTW string `json:"zh_TW"`
		} `json:"name"`
		Image string `json:"image"`
		Slug  string `json:"slug"`
	} `json:"cardBacks"`
	CardCount int `json:"cardCount"`
	PageCount int `json:"pageCount"`
	Page      int `json:"page"`
}

CardBackSearchAllLocales structure

type CardSearch

type CardSearch struct {
	Cards     []Card `json:"cards"`
	CardCount int    `json:"cardCount"`
	PageCount int    `json:"pageCount"`
	Page      int    `json:"page"`
}

CardSearch structure

type Class

type Class struct {
	ID   interface{} `json:"id"`
	Slug string      `json:"slug"`
	Name string      `json:"name"`
}

Class structure

type Collectibility

type Collectibility string

Collectibility type

func (Collectibility) String

func (collectibility Collectibility) String() string

type Deck

type Deck struct {
	Version int    `json:"version"`
	Format  string `json:"format"`
	Hero    struct {
		ID            int    `json:"id"`
		Collectible   int    `json:"collectible"`
		Slug          string `json:"slug"`
		ClassID       int    `json:"classId"`
		MultiClassIds []int  `json:"multiClassIds"`
		CardTypeID    int    `json:"cardTypeId"`
		CardSetID     int    `json:"cardSetId"`
		RarityID      int    `json:"rarityId"`
		ArtistName    string `json:"artistName"`
		Health        int    `json:"health"`
		ManaCost      int    `json:"manaCost"`
		Name          string `json:"name"`
		Text          string `json:"text"`
		Image         string `json:"image"`
		ImageGold     string `json:"imageGold"`
		FlavorText    string `json:"flavorText"`
		CropImage     string `json:"cropImage"`
		ChildIds      []int  `json:"childIds"`
	} `json:"hero"`
	HeroPower struct {
		ID            int    `json:"id"`
		Collectible   int    `json:"collectible"`
		Slug          string `json:"slug"`
		ClassID       int    `json:"classId"`
		MultiClassIds []int  `json:"multiClassIds"`
		CardTypeID    int    `json:"cardTypeId"`
		CardSetID     int    `json:"cardSetId"`
		RarityID      int    `json:"rarityId"`
		ArtistName    string `json:"artistName"`
		ManaCost      int    `json:"manaCost"`
		Name          string `json:"name"`
		Text          string `json:"text"`
		Image         string `json:"image"`
		ImageGold     string `json:"imageGold"`
		FlavorText    string `json:"flavorText"`
		CropImage     string `json:"cropImage"`
	} `json:"heroPower"`
	Class struct {
		ID   int    `json:"id"`
		Slug string `json:"slug"`
		Name string `json:"name"`
	} `json:"class"`
	Cards []struct {
		ID            int    `json:"id"`
		Collectible   int    `json:"collectible"`
		Slug          string `json:"slug"`
		ClassID       int    `json:"classId"`
		MultiClassIds []int  `json:"multiClassIds"`
		CardTypeID    int    `json:"cardTypeId"`
		CardSetID     int    `json:"cardSetId"`
		RarityID      int    `json:"rarityId"`
		ArtistName    string `json:"artistName"`
		Health        int    `json:"health,omitempty"`
		Attack        int    `json:"attack,omitempty"`
		ManaCost      int    `json:"manaCost"`
		Name          string `json:"name"`
		Text          string `json:"text"`
		Image         string `json:"image"`
		ImageGold     string `json:"imageGold"`
		FlavorText    string `json:"flavorText"`
		CropImage     string `json:"cropImage"`
		KeywordIds    []int  `json:"keywordIds,omitempty"`
		Armor         int    `json:"armor,omitempty"`
		ChildIds      []int  `json:"childIds,omitempty"`
		MinionTypeID  int    `json:"minionTypeId,omitempty"`
		Durability    int    `json:"durability,omitempty"`
	} `json:"cards"`
	CardCount int `json:"cardCount"`
}

Deck structure

type GameMode

type GameMode string

GameMode - constructed or battlegrounds

func (GameMode) String

func (gameMode GameMode) String() string

type Keyword

type Keyword struct {
	ID      int    `json:"id"`
	Slug    string `json:"slug"`
	Name    string `json:"name"`
	RefText string `json:"refText"`
	Text    string `json:"text"`
}

Keyword structure

type Metadata

type Metadata struct {
	Sets             []Set        `json:"sets"`
	SetGroups        []SetGroup   `json:"setGroups"`
	Types            []Type       `json:"types"`
	Rarities         []Rarity     `json:"rarities"`
	Classes          []Class      `json:"classes"`
	MinionTypes      []MinionType `json:"minionTypes"`
	Keywords         []Keyword    `json:"keywords"`
	FilterableFields []string     `json:"filterableFields"`
	NumericFields    []string     `json:"numericFields"`
}

Metadata structure

type MetadataType

type MetadataType string

MetadataType - sets, setGroups, types, rarities, classes, minionTypes, and keywords

func (MetadataType) String

func (metadataType MetadataType) String() string

type MinionType

type MinionType struct {
	ID   int    `json:"id"`
	Slug string `json:"slug"`
	Name string `json:"name"`
}

MinionType structure

type Order

type Order string

Order - asc or desc

func (Order) String

func (order Order) String() string

type Rarity

type Rarity struct {
	ID           int    `json:"id"`
	Slug         string `json:"slug"`
	CraftingCost []int  `json:"craftingCost"`
	DustValue    []int  `json:"dustValue"`
	Name         string `json:"name"`
}

Rarity structure

type Set

type Set struct {
	ID                          int    `json:"id"`
	Slug                        string `json:"slug"`
	ReleaseDate                 string `json:"releaseDate,omitempty"`
	Name                        string `json:"name"`
	CollectibleCount            int    `json:"collectibleCount"`
	CollectibleRevealedCount    int    `json:"collectibleRevealedCount"`
	NonCollectibleCount         int    `json:"nonCollectibleCount"`
	NonCollectibleRevealedCount int    `json:"nonCollectibleRevealedCount"`
	Type                        string `json:"type,omitempty"`
}

Set structure

type SetGroup

type SetGroup struct {
	Slug      string   `json:"slug"`
	Year      int      `json:"year,omitempty"`
	CardSets  []string `json:"cardSets"`
	Name      string   `json:"name"`
	Standard  bool     `json:"standard,omitempty"`
	Icon      string   `json:"icon,omitempty"`
	YearRange string   `json:"yearRange,omitempty"`
}

SetGroup structure

type Sort

type Sort string

Sort - manaCost, attack, health, or name

func (Sort) String

func (sort Sort) String() string

type Tier

type Tier string

Tier - hero, 1, 2, 3, 4, 5, or 6

func (Tier) String

func (tier Tier) String() string

type Type

type Type struct {
	ID   int    `json:"id"`
	Slug string `json:"slug"`
	Name string `json:"name"`
}

Type structure

Jump to

Keyboard shortcuts

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