scryfall

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

README

scryfall

Tools for making apps using the scryfall API

Documentation

Index

Constants

View Source
const APIBaseURL = "https://api.scryfall.com/cards/"

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

type Card struct {
	ID              string        `json:"id"`
	OracleID        string        `json:"oracle_id"`
	MultiverseIDs   []int         `json:"multiverse_ids"`
	MtgoID          int           `json:"mtgo_id"`
	MtgoFoilID      int           `json:"mtgo_foil_id"`
	TcgplayerID     int           `json:"tcgplayer_id"`
	CardmarketID    int           `json:"cardmarket_id"`
	Name            string        `json:"name"`
	Lang            string        `json:"lang"`
	ReleasedAt      string        `json:"released_at"`
	URI             string        `json:"uri"`
	ScryfallURI     string        `json:"scryfall_uri"`
	Layout          string        `json:"layout"`
	HighresImage    bool          `json:"highres_image"`
	ImageStatus     string        `json:"image_status"`
	ImageURIs       ImageURIs     `json:"image_uris"`
	ManaCost        string        `json:"mana_cost"`
	CMC             float64       `json:"cmc"`
	TypeLine        string        `json:"type_line"`
	OracleText      string        `json:"oracle_text"`
	Power           string        `json:"power"`
	Toughness       string        `json:"toughness"`
	Loyalty         string        `json:"loyalty"`
	Colors          []string      `json:"colors"`
	ColorIdentity   []string      `json:"color_identity"`
	Keywords        []string      `json:"keywords"`
	ProducedMana    []string      `json:"produced_mana"`
	AllParts        []RelatedCard `json:"all_parts"`
	CardFaces       []CardFace    `json:"card_faces"`
	Legality        Legalities    `json:"legalities"`
	Games           []string      `json:"games"`
	Reserved        bool          `json:"reserved"`
	Foil            bool          `json:"foil"`
	Nonfoil         bool          `json:"nonfoil"`
	Finishes        []string      `json:"finishes"`
	Oversized       bool          `json:"oversized"`
	Promo           bool          `json:"promo"`
	Reprint         bool          `json:"reprint"`
	Variation       bool          `json:"variation"`
	SetID           string        `json:"set_id"`
	Set             string        `json:"set"`
	SetName         string        `json:"set_name"`
	SetType         string        `json:"set_type"`
	SetURI          string        `json:"set_uri"`
	SetSearchURI    string        `json:"set_search_uri"`
	ScryfallSetURI  string        `json:"scryfall_set_uri"`
	RulingsURI      string        `json:"rulings_uri"`
	PrintsSearchURI string        `json:"prints_search_uri"`
	CollectorNumber string        `json:"collector_number"`
	Digital         bool          `json:"digital"`
	Rarity          string        `json:"rarity"`
	FlavorText      string        `json:"flavor_text"`
	CardBackID      string        `json:"card_back_id"`
	Artist          string        `json:"artist"`
	ArtistIDs       []string      `json:"artist_ids"`
	IllustrationID  string        `json:"illustration_id"`
	BorderColor     string        `json:"border_color"`
	Frame           string        `json:"frame"`
	FrameEffects    []string      `json:"frame_effects"`
	SecurityStamp   string        `json:"security_stamp"`
	FullArt         bool          `json:"full_art"`
	Textless        bool          `json:"textless"`
	Booster         bool          `json:"booster"`
	StorySpotlight  bool          `json:"story_spotlight"`
	EDHREC_RANK     int           `json:"edhrec_rank"`
	PennyRank       int           `json:"penny_rank"`
	Prices          Prices        `json:"prices"`
	RelatedURIs     RelatedURIs   `json:"related_uris"`
	PurchaseURIs    PurchaseURIs  `json:"purchase_uris"`
}

type CardFace

type CardFace struct {
	Name           string    `json:"name"`
	ManaCost       string    `json:"mana_cost"`
	TypeLine       string    `json:"type_line"`
	OracleText     string    `json:"oracle_text"`
	Colors         []string  `json:"colors"`
	Power          string    `json:"power"`
	Toughness      string    `json:"toughness"`
	Loyalty        string    `json:"loyalty"`
	FlavorText     string    `json:"flavor_text"`
	Artist         string    `json:"artist"`
	ArtistID       string    `json:"artist_id"`
	IllustrationID string    `json:"illustration_id"`
	ImageURIs      ImageURIs `json:"image_uris"`
}

type ImageURIs

type ImageURIs struct {
	Small      string `json:"small"`
	Normal     string `json:"normal"`
	Large      string `json:"large"`
	PNG        string `json:"png"`
	ArtCrop    string `json:"art_crop"`
	BorderCrop string `json:"border_crop"`
}

type Legalities

type Legalities struct {
	Standard        string `json:"standard"`
	Future          string `json:"future"`
	Historic        string `json:"historic"`
	Timeless        string `json:"timeless"`
	Gladiator       string `json:"gladiator"`
	Pioneer         string `json:"pioneer"`
	Modern          string `json:"modern"`
	Legacy          string `json:"legacy"`
	Pauper          string `json:"pauper"`
	Vintage         string `json:"vintage"`
	Penny           string `json:"penny"`
	Commander       string `json:"commander"`
	Oathbreaker     string `json:"oathbreaker"`
	Standardbrawl   string `json:"standardbrawl"`
	Brawl           string `json:"brawl"`
	Alchemy         string `json:"alchemy"`
	Paupercommander string `json:"paupercommander"`
	Duel            string `json:"duel"`
	Oldschool       string `json:"oldschool"`
	Premodern       string `json:"premodern"`
	Predh           string `json:"predh"`
}

type Prices

type Prices struct {
	USD       string `json:"usd"`
	USDFoil   string `json:"usd_foil"`
	USDEtched string `json:"usd_etched"`
	EUR       string `json:"eur"`
	EURFoil   string `json:"eur_foil"`
	Tix       string `json:"tix"`
}

type PurchaseURIs

type PurchaseURIs struct {
	Tcgplayer   string `json:"tcgplayer"`
	Cardmarket  string `json:"cardmarket"`
	Cardhoarder string `json:"cardhoarder"`
}

type RelatedCard

type RelatedCard struct {
	ID        string `json:"id"`
	Component string `json:"component"`
	Name      string `json:"name"`
	TypeLine  string `json:"type_line"`
	URI       string `json:"uri"`
}

type RelatedURIs

type RelatedURIs struct {
	Gatherer         string `json:"gatherer"`
	TCGPlayerArticle string `json:"tcgplayer_infinite_article"`
	TCGPlayerDecks   string `json:"tcgplayer_infinite_decks"`
	EDHREC           string `json:"edhrec"`
}

type Scryfall

type Scryfall struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(httpClient *http.Client) *Scryfall

func (*Scryfall) FindCardByID

func (scryfall *Scryfall) FindCardByID(id string) (*Card, error)

Jump to

Keyboard shortcuts

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