mtgjson

package
v0.0.0-...-882b071 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

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

	BorderColorBorderless = "borderless"

	LanguageJapanese = "Japanese"

	SuffixLightMana = "†"
	SuffixSpecial   = "★"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

type Card struct {
	Name       string `json:"name"`
	HasNonFoil bool   `json:"hasNonFoil"`
	UUID       string `json:"uuid"`

	Artist                 string   `json:"artist"`
	BorderColor            string   `json:"borderColor"`
	FrameEffect            string   `json:"frameEffect"`
	FrameEffects           []string `json:"frameEffects"`
	Layout                 string   `json:"layout"`
	Names                  []string `json:"names"`
	Number                 string   `json:"number"`
	Type                   string   `json:"type"`
	IsAlternative          bool     `json:"isAlternative"`
	IsDateStamped          bool     `json:"isDateStamped"`
	IsPromo                bool     `json:"isPromo"`
	IsFullArt              bool     `json:"isFullArt"`
	IsStarter              bool     `json:"isStarter"`
	ScryfallId             string   `json:"scryfallId"`
	ScryfallIllustrationId string   `json:"scryfallIllustrationId"`
	ScryfallOracleId       string   `json:"scryfallOracleId"`
	Variations             []string `json:"variations"`
	FlavorText             string   `json:"flavorText"`
	ForeignData            []struct {
		Language string `json:"language"`
	} `json:"foreignData"`
}

func (*Card) HasFrameEffect

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

type MTGDB

type MTGDB map[string]Set

func LoadAllPrintings

func LoadAllPrintings(allPrintingsPath string) (MTGDB, error)

Load a MTGJSON AllPrinting.json file and return a MTGDB map.

func LoadAllPrintingsFromReader

func LoadAllPrintingsFromReader(r io.Reader) (MTGDB, error)

type Set

type Set struct {
	Name         string `json:"name"`
	IsOnlineOnly bool   `json:"isOnlineOnly"`
	Type         string `json:"type"`
	BaseSetSize  int    `json:"baseSetSize"`
	TotalSetSize int    `json:"totalSetSize"`
	Cards        []Card `json:"cards"`
	ReleaseDate  string `json:"releaseDate"`
}

Jump to

Keyboard shortcuts

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