UNPKG

scryfall-client

Version:
28 lines (27 loc) 1.13 kB
import SingularEntity from "./singular-entity"; import type List from "./list"; import type GenericScryfallResponse from "./generic-scryfall-response"; import type MagicSet from "./magic-set"; import type { ImageUris, Prices, Legalities } from "../types/api/constants"; import type CardApiResponse from "../types/api/card"; import type CardFaceApiResponse from "../types/api/card-face"; import type RelatedCardApiResponse from "../types/api/related-card"; interface Card extends CardApiResponse { card_faces: CardFaceApiResponse[]; } declare class Card extends SingularEntity { _tokens: RelatedCardApiResponse[]; _hasTokens: boolean; _isDoublesided: boolean; constructor(scryfallObject: CardApiResponse); getRulings(): Promise<List<GenericScryfallResponse>>; getSet(): Promise<MagicSet>; getPrints(): Promise<List<Card>>; isLegal(format: keyof Legalities): boolean; getImage(type?: keyof ImageUris): string; getBackImage(type?: keyof ImageUris): string; getPrice(type?: keyof Prices): string; getTokens(): Promise<Card[]>; getTaggerUrl(): string; } export default Card;