scryfall-client
Version:
A module for making requests to scryfall
103 lines (102 loc) • 3.31 kB
TypeScript
import { Color, ImageUris, Legalities, Prices } from "./constants";
import CardFaceResponse from "./card-face";
import RelatedComponentResponse from "./related-card";
type Rarity = "common" | "uncommon" | "rare" | "mythic";
type GameKind = "paper" | "arena" | "mtgo";
type LanguageCode = "en" | "es" | "fr" | "de" | "it" | "pt" | "ja" | "ko" | "ru" | "zhs" | "zht" | "he" | "la" | "grc" | "ar" | "sa" | "px";
type Layout = "normal" | "split" | "flip" | "transform" | "meld" | "leveler" | "saga" | "adventure" | "planar" | "scheme" | "vanguard" | "token" | "double_faced_token" | "emblem" | "augment" | "host" | "art_series" | "double_sided";
type Finish = "foil" | "nonfoil" | "etched" | "glossy";
type Frame = "1993" | "1997" | "2003" | "2015" | "future";
type FrameEffect = "legendary" | "miracle" | "nyxtouched" | "draft" | "devoid" | "tombstone" | "colorshifted" | "inverted" | "sunmoondfc" | "compasslanddfc" | "originpwdfc" | "mooneldrazidfc" | "moonreversemoondfc" | "showcase" | "extendedart" | "companion";
export default interface CardApiResponse extends CardFaceResponse {
object: "card";
arena_id?: number;
id: string;
lang: LanguageCode;
mtgo_id?: number;
mtgo_foil_id?: number;
multiverse_ids?: string;
tcgplayer_id?: number;
oracle_id?: string;
prints_search_uri: string;
rulings_uri: string;
scryfall_uri: string;
uri: string;
all_parts?: RelatedComponentResponse[];
card_faces?: CardFaceResponse[];
cmc: number;
colors?: Color[];
color_identity: Color[];
color_indicator?: Color[];
edhrec_rank?: number;
foil: boolean;
hand_modifier?: string;
keywords: string[];
layout: Layout;
legalities: Legalities;
life_modifier?: string;
loyalty?: string;
mana_cost: string;
name: string;
nonfoil: boolean;
oracle_text?: string;
oversized: boolean;
power?: string;
reserved: boolean;
toughness?: string;
type_line: string;
artist?: string;
booster?: boolean;
border_color: "black" | "borderless" | "gold" | "silver" | "white";
content_warning?: boolean;
card_back_id: string;
collector_number: string;
digital: boolean;
finishes: Finish[];
flavor_name?: string;
flavor_text?: string;
frame_effects?: FrameEffect[];
frame: Frame;
full_art: boolean;
games: GameKind[];
highres_image: boolean;
illustration_id?: string;
image_uris?: ImageUris;
prices: Prices;
printed_name?: string;
printed_text?: string;
printed_type_line?: string;
promo: boolean;
promo_types?: string[];
purchase_uris: {
tcgplayer: string;
cardmarket: string;
cardhoarder: string;
};
rarity: Rarity;
related_uris: {
gatherer: string;
tcgplayer_decks: string;
edhrec: string;
mtgtop8: string;
};
released_at: string;
reprint: boolean;
scryfall_set_uri: string;
set_name: string;
set_search_uri: string;
set_type: string;
set_uri: string;
set: string;
story_spotlight: boolean;
textless: boolean;
variation: boolean;
variation_of?: string;
watermark?: string;
preview?: {
previewed_at: string;
source_uri: string;
source: string;
};
}
export {};