Documentation
¶
Index ¶
- func NormalizeName(name string) string
- func ReplaceUnicode(name string) string
- func TCGCardURL(c *Card) string
- func TCGEditionURL(c *Card, e *Edition) string
- func TCGName(name string, id int) string
- func TCGSet(setId, set string) string
- func TCGSlug(name string) string
- func TranslateID(id int) string
- type Card
- type Edition
- type Price
- type Reader
- type Search
- type Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeName ¶
func ReplaceUnicode ¶
func TCGCardURL ¶
func TCGEditionURL ¶
func TranslateID ¶
Types ¶
type Card ¶
type Card struct {
Name string `json:"name"`
Id string `json:"id"`
Href string `json:"url,omitempty"`
StoreUrl string `json:"store_url"`
Types []string `json:"types,omitempty"`
Supertypes []string `json:"supertypes,omitempty"`
Subtypes []string `json:"subtypes,omitempty"`
Colors []string `json:"colors,omitempty"`
ConvertedCost int `json:"cmc"`
ManaCost string `json:"cost"`
Text string `json:"text"`
Power string `json:"power,omitempty"`
Toughness string `json:"toughness,omitempty"`
Loyalty int `json:"loyalty,omitempty"`
FormatMap map[string]string `json:"formats"`
Editions []Edition `json:"editions,omitempty"`
}
func (*Card) Multicolor ¶
func (*Card) MultiverseIds ¶
type Edition ¶
type Edition struct {
Set string `json:"set"`
SetId string `json:"set_id"`
CardId string `json:"-"`
Watermark string `json:"watermark,omitempty"`
Rarity string `json:"rarity"`
Border string `json:"-"`
Artist string `json:"artist"`
MultiverseId int `json:"multiverse_id"`
Flavor string `json:"flavor,omitempty"`
Number string `json:"number"`
Layout string `json:"layout"`
Price *Price `json:"price,omitempty"`
Href string `json:"url,omitempty"`
ImageUrl string `json:"image_url,omitempty"`
SetUrl string `json:"set_url,omitempty"`
StoreUrl string `json:"store_url"`
HTMLUrl string `json:"html_url"`
}
type Reader ¶
type Reader interface {
GetCards(context.Context, Search) ([]Card, error)
GetCardsByName(context.Context, string) ([]Card, error)
GetCard(context.Context, string) (Card, error)
GetRandomCardID(context.Context) (string, error)
GetSets(context.Context) ([]Set, error)
GetSet(context.Context, string) (Set, error)
GetColors(context.Context) ([]string, error)
GetSupertypes(context.Context) ([]string, error)
GetSubtypes(context.Context) ([]string, error)
GetTypes(context.Context) ([]string, error)
}
Click to show internal directories.
Click to hide internal directories.