mtgjson

package
Version: v0.0.0-...-ba6ee8b Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LayoutAftermath = "aftermath"
	LayoutFlip      = "flip"
	LayoutMeld      = "meld"
	LayoutNormal    = "normal"
	LayoutSplit     = "split"
	LayoutTransform = "transform"

	FrameEffectExtendedArt = "extendedart"
	FrameEffectInverted    = "inverted"
	FrameEffectShowcase    = "showcase"

	PromoTypeBundle     = "bundle"
	PromoTypePrerelease = "prerelease"
	PromoTypePromoPack  = "promopack"

	BorderColorBorderless = "borderless"

	LanguageJapanese = "Japanese"

	SuffixLightMana = "†"
	SuffixSpecial   = "★"
	SuffixVariant   = "†"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AllPrintings

type AllPrintings struct {
	Data map[string]Set `json:"data"`
	Meta struct {
		Date    string `json:"date"`
		Version string `json:"version"`
	} `json:"meta"`
}

func LoadAllPrintings

func LoadAllPrintings(r io.Reader) (payload AllPrintings, err error)

type Card

type Card struct {
	Artist      string `json:"artist"`
	BorderColor string `json:"borderColor"`
	FlavorName  string `json:"flavorName"`
	FlavorText  string `json:"flavorText"`
	ForeignData []struct {
		Language string `json:"language"`
	} `json:"foreignData"`
	FrameEffects  []string          `json:"frameEffects"`
	HasFoil       bool              `json:"hasFoil"`
	HasNonFoil    bool              `json:"hasNonFoil"`
	Identifiers   map[string]string `json:"identifiers"`
	IsAlternative bool              `json:"isAlternative"`
	IsFullArt     bool              `json:"isFullArt"`
	IsReserved    bool              `json:"isReserved"`
	Layout        string            `json:"layout"`
	Name          string            `json:"name"`
	Number        string            `json:"number"`
	Printings     []string          `json:"printings"`
	PromoTypes    []string          `json:"promoTypes"`
	Rarity        string            `json:"rarity"`
	Side          string            `json:"side"`
	UUID          string            `json:"uuid"`
	Variations    []string          `json:"variations"`
	Watermark     string            `json:"watermark"`
}

func (*Card) HasFrameEffect

func (c *Card) HasFrameEffect(fe string) bool

func (*Card) HasPromoType

func (c *Card) HasPromoType(pt string) bool

func (*Card) HasUniqueLanguage

func (c *Card) HasUniqueLanguage(lang string) bool

type Set

type Set struct {
	BaseSetSize  int    `json:"baseSetSize"`
	Code         string `json:"code"`
	Cards        []Card `json:"cards"`
	IsOnlineOnly bool   `json:"isOnlineOnly"`
	KeyruneCode  string `json:"keyruneCode"`
	Name         string `json:"name"`
	ParentCode   string `json:"parentCode"`
	ReleaseDate  string `json:"releaseDate"`
	Type         string `json:"type"`
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL