UNPKG

scryfall-sdk

Version:

A Node.js SDK for https://scryfall.com/docs/api written in Typescript.

71 lines (70 loc) 2.11 kB
import { SYMBOL_CARDS } from "../IScry"; import MagicQuerier from "../util/MagicQuerier"; import { Card, SearchOptions } from "./Cards"; declare enum SetType { core = 0, expansion = 1, masters = 2, alchemy = 3, masterpiece = 4, arsenal = 5, from_the_vault = 6, spellbook = 7, premium_deck = 8, duel_deck = 9, draft_innovation = 10, treasure_chest = 11, commander = 12, planechase = 13, archenemy = 14, vanguard = 15, funny = 16, starter = 17, box = 18, promo = 19, token = 20, memorabilia = 21, minigame = 22 } type SetSearchOptions = Omit<SearchOptions, "page">; export declare class Set { object: "set"; id: string; code: string; mtgo_code?: string | null; arena_code?: string | null; tcgplayer_id?: number | null; name: string; set_type: keyof typeof SetType; released_at?: string | null; block_code?: string | null; block?: string | null; parent_set_code?: string | null; card_count: number; printed_size?: number | null; digital: boolean; foil_only: boolean; nonfoil_only: boolean; scryfall_uri: string; uri: string; icon_svg_uri: string; search_uri: string; static construct(set: Set): Set; private [SYMBOL_CARDS]?; getCards(options?: SetSearchOptions): Promise<Card[]>; search(query: string, options?: SetSearchOptions): Promise<import("../util/MagicEmitter").MagicArray<Card, never>>; } declare class Sets extends MagicQuerier { protected set Scry(scry: typeof import("../Scry")); all(): Promise<Set[]>; byCode(code: string): Promise<Set>; byId(id: string): Promise<Set>; byTcgPlayerId(id: number): Promise<Set>; /** * @param fuzzy This parameter only works if you've previously set a fuzzy comparer with `Scry.setFuzzySearch`. Otherwise it only returns exact matches. */ byName(name: string, fuzzy?: boolean): Promise<Set>; private querySet; } declare const _default: Sets; export default _default;