Documentation ¶
Index ¶
- Constants
- Variables
- type AllParts
- type Card
- func (c Card) IsArtifact() bool
- func (c Card) IsBasicLand() bool
- func (c Card) IsCreature() bool
- func (c Card) IsEnchantment() bool
- func (c Card) IsInstant() bool
- func (c Card) IsLand() bool
- func (c Card) IsLegendaryCreature() bool
- func (c Card) IsLegendaryPlaneswalker() bool
- func (c Card) IsSorcery() bool
- func (c Card) ParseManaCost() [][]string
- type CardFace
- type CardRepo
- type ImageUris
- type Legality
- type Preview
- type Prices
- type PurchaseUris
- type RelatedUris
- type RestCardRepo
Constants ¶
View Source
const ( UniqueCards = "cards" UniqueArt = "art" UniquePrints = "prints" )
View Source
const ( Standard = "standard" Future = "future" Historic = "historic" Gladiator = "gladiator" Pioneer = "pioneer" Explorer = "explorer" Modern = "modern" Legacy = "legacy" Pauper = "pauper" Vintage = "vintage" Penny = "penny" Commander = "commander" Brawl = "brawl" HistoricBrawl = "historicbrawl" Alchemy = "alchemy" PauperCommander = "paupercommander" Duel = "duel" Oldschool = "oldschool" Premodern = "premodern" )
Variables ¶
View Source
var LegalitiesKeysMap = map[string]string{ Standard: "Standard", Future: "Future", Historic: "Historic", Gladiator: "Gladiator", Pioneer: "Pioneer", Explorer: "Explorer", Modern: "Modern", Legacy: "Legacy", Pauper: "Pauper", Vintage: "Vintage", Penny: "Penny", Commander: "Commander", Brawl: "Brawl", HistoricBrawl: "Historic Brawl", Alchemy: "Alchemy", PauperCommander: "Pauper Commander", Duel: "Duel", Oldschool: "Oldschool", Premodern: "Premodern", }
View Source
var LegalitiesNameMap = map[string]string{ "Standard": Standard, "Future": Future, "Historic": Historic, "Gladiator": Gladiator, "Pioneer": Pioneer, "Explorer": Explorer, "Modern": Modern, "Legacy": Legacy, "Pauper": Pauper, "Vintage": Vintage, "Penny": Penny, "Commander": Commander, "Brawl": Brawl, "Historic Brawl": HistoricBrawl, "Alchemy": Alchemy, "Pauper Commander": PauperCommander, "Duel": Duel, "Oldschool": Oldschool, "Premodern": Premodern, }
Functions ¶
This section is empty.
Types ¶
type Card ¶
type Card struct { Object string `json:"object"` Id string `json:"id"` OracleId string `json:"oracle_id"` MultiverseIds []int `json:"multiverse_ids"` MtgoId int `json:"mtgo_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"` FlavorText string `json:"flavor_text"` OracleText string `json:"oracle_text"` Power string `json:"power"` Toughness string `json:"toughness"` Colors []string `json:"colors"` ColorIndicator []string `json:"color_indicator"` ColorIdentity []string `json:"color_identity"` Keywords []interface{} `json:"keywords"` ProducedMana []string `json:"produced_mana"` CardFaces []CardFace `json:"card_faces"` AllParts []AllParts `json:"all_parts"` Legalities map[string]Legality `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"` 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"` EdhrecRank int `json:"edhrec_rank"` Preview Preview `json:"preview"` Prices Prices `json:"prices"` RelatedUris RelatedUris `json:"related_uris"` PurchaseUris PurchaseUris `json:"purchase_uris"` }
func (Card) IsArtifact ¶
func (Card) IsBasicLand ¶
func (Card) IsCreature ¶
func (Card) IsEnchantment ¶
func (Card) IsLegendaryCreature ¶
func (Card) IsLegendaryPlaneswalker ¶
func (Card) ParseManaCost ¶
type CardFace ¶
type CardFace struct { Object string `json:"object"` Name string `json:"name"` FlavorName string `json:"flavor_name"` ManaCost string `json:"mana_cost"` TypeLine string `json:"type_line"` OracleText string `json:"oracle_text"` Colors []string `json:"colors"` ColorIndicator []string `json:"color_indicator"` Loyalty string `json:"loyalty"` Artist string `json:"artist"` ArtistId string `json:"artist_id"` IllustrationId string `json:"illustration_id"` ImageUris ImageUris `json:"image_uris"` Power string `json:"power"` Toughness string `json:"toughness"` }
type CardRepo ¶
type CardRepo interface {
ListCards(setID, uniqueness, next string) (*endpoint.Response[[]Card], error)
}
func NewRestCardRepo ¶
type Legality ¶
type Legality int
func LegalityFromString ¶
func (*Legality) MarshalJSON ¶
func (*Legality) UnmarshalJSON ¶
type PurchaseUris ¶
type RelatedUris ¶
type RestCardRepo ¶
type RestCardRepo struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.