Documentation
¶
Index ¶
- func DownloadAllPrintings(w io.Writer) error
- func ReadCardsGOB(dir string, cb func(Card)) error
- func WriteAllPrintingsGOB(w io.Writer, p AllPrintings) error
- func WriteCardGOB(dir string, card Card) error
- func WriteCardsGOB(dir string, cards []Card) error
- type AllPrintings
- type Availability
- type BorderColor
- type Card
- type Color
- type Colors
- type Data
- type ForeignData
- type FrameEffect
- type ID
- type Keywords
- type Layout
- type LeadershipSkills
- type Legalities
- type PurchaseURLs
- type Rarity
- type Ruling
- type SetID
- type Time
- type UUID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadAllPrintings ¶
func ReadCardsGOB ¶ added in v0.2.0
func WriteAllPrintingsGOB ¶
func WriteAllPrintingsGOB(w io.Writer, p AllPrintings) error
func WriteCardGOB ¶ added in v0.2.0
func WriteCardsGOB ¶ added in v0.2.0
Types ¶
type AllPrintings ¶
func ReadAllPrintingsGOB ¶
func ReadAllPrintingsGOB(r io.Reader) (AllPrintings, error)
func ReadAllPrintingsJSON ¶
func ReadAllPrintingsJSON(r io.Reader) (AllPrintings, error)
func (AllPrintings) Cards ¶
func (p AllPrintings) Cards() []Card
func (AllPrintings) FilterOnlineOnly ¶
func (p AllPrintings) FilterOnlineOnly(o bool) AllPrintings
func (AllPrintings) SetIDs ¶
func (p AllPrintings) SetIDs() []SetID
type Availability ¶
type Availability []string
func (Availability) Paper ¶
func (a Availability) Paper() bool
type BorderColor ¶
type BorderColor string
type Card ¶
type Card struct {
UUID UUID `json:"uuid"`
Identifiers ID `json:"identifiers"`
Name string `json:"name"`
SetCode SetID `json:"setCode"`
Availability Availability `json:"availability"`
Artist string `json:"artist"`
ASCII string `json:"asciiName"`
BorderColor BorderColor `json:"borderColor"`
ColorIdentity Colors `json:"colorIdentity"`
ColorIndicator Colors `json:"colorIndicator"`
Colors Colors `json:"colors"`
ConvertedManaCost float64 `json:"convertedManaCost"`
FaceConvertedManaCost float64 `json:"faceConvertedManaCost"`
FaceName string `json:"faceName"`
FlavorName string `json:"flavorName"`
FlavorText string `json:"flavorText"`
FrameEffects []FrameEffect `json:"frameEffects"`
FrameVersion string `json:"frameVersion"`
Hand string `json:"hand"`
HasContentWarning bool `json:"hasContentWarning"`
HasFoil bool `json:"hasFoil"`
HasAlternativeDeckLimit bool `json:"hasAlternativeDeckLimit"`
HasNonFoil bool `json:"hasNonFoil"`
IsAlternative bool `json:"isAlternative"`
IsFullArt bool `json:"isFullArt"`
IsOnlineOnly bool `json:"isOnlineOnly"`
IsOversized bool `json:"isOversized"`
IsPromo bool `json:"isPromo"`
IsReprint bool `json:"isReprint"`
IsReserved bool `json:"isReserved"`
IsStarter bool `json:"isStarter"`
IsStorySpotlight bool `json:"isStorySpotlight"`
IsTextless bool `json:"isTextless"`
IsTimeshifted bool `json:"isTimeshifted"`
Keywords Keywords `json:"keywords"`
Layout Layout `json:"layout"`
Life string `json:"life"`
Loyalty string `json:"loyalty"`
ManaCost string `json:"manaCost"`
Number string `json:"number"`
OriginalReleaseDate Time `json:"originalReleaseDate"`
OriginalText string `json:"originalText"`
OriginalType string `json:"originalType"`
OtherFaceIds []UUID `json:"otherFaceIds"`
Power string `json:"power"`
Printings []SetID `json:"printings"`
PromoTypes []string `json:"promoTypes"`
Rarity Rarity `json:"rarity"`
Side string `json:"side"`
Subtypes []string `json:"subtypes"`
Supertypes []string `json:"supertypes"`
Text string `json:"text"`
Toughness string `json:"toughness"`
Type string `json:"type"`
Types []string `json:"types"`
Variations []UUID `json:"variations"`
Watermark string `json:"watermark"`
PurchaseURLs PurchaseURLs `json:"purchaseUrls"`
LeadershipSkills LeadershipSkills `json:"leadershipSkills"`
Legalities Legalities `json:"legalities"`
Rulings []Ruling `json:"rulings"`
EDHRECRank int `json:"edhrecRank"`
ForeignData []ForeignData `json:"foreignData"`
}
type Data ¶
type Data struct {
Type string `json:"type"`
ReleaseDate Time `json:"releaseDate"`
Code string `json:"code"`
Name string `json:"name"`
KeyruneCode string `json:"keyruneCode"`
Block string `json:"block"`
TCGPlayerGroupId int64 `json:"tcgPlayerGroupId"`
MCMID int `json:"mcmid"`
MCMName string `json:"mcmName"`
TotalSetSize int `json:"totalSetSize"`
BaseSetSize int `json:"baseSetSize"`
IsNonFoilOnly bool `json:"isNonFoilOnly"`
IsFoilOnly bool `json:"isFoilOnly"`
IsOnlineOnly bool `json:"isOnlineOnly"`
Cards []Card `json:"cards"`
}
type ForeignData ¶ added in v0.1.5
type FrameEffect ¶
type FrameEffect string
type ID ¶
type ID struct {
CardKingdomFoilId string `json:"cardKingdomFoilId"`
CardKingdomId string `json:"cardKingdomId"`
McmId string `json:"mcmId"`
McmMetaId string `json:"mcmMetaId"`
MtgArenaId string `json:"mtgArenaId"`
MtgoFoilId string `json:"mtgoFoilId"`
MtgoId string `json:"mtgoId"`
MtgjsonV4Id string `json:"mtgjsonV4Id"`
MultiverseId string `json:"multiverseId"`
ScryfallId string `json:"scryfallId"`
ScryfallOracleId string `json:"scryfallOracleId"`
ScryfallIllustrationId string `json:"scryfallIllustrationId"`
TcgplayerProductId string `json:"tcgplayerProductId"`
}
type LeadershipSkills ¶ added in v0.1.5
type Legalities ¶ added in v0.1.5
type Legalities struct {
Brawl string `json:"brawl"`
Commander string `json:"commander"`
Duel string `json:"duel"`
Future string `json:"future"`
Frontier string `json:"frontier"`
Historic string `json:"historic"`
Legacy string `json:"legacy"`
Modern string `json:"modern"`
Pauper string `json:"pauper"`
Penny string `json:"penny"`
Pioneer string `json:"pioneer"`
Standard string `json:"standard"`
Vintage string `json:"vintage"`
}
type PurchaseURLs ¶ added in v0.1.5
Click to show internal directories.
Click to hide internal directories.