A Node.js SDK for Scryfall written in Typescript.
As of February 2nd, 2023, all features described in the Scryfall documentation are supported. If you see something that isn't supported, make an issue!
npm install scryfall-sdk
Install the axios
dependency alongside scryfall-sdk and it will automatically use it.
import * as Scry from "scryfall-sdk";
// ...in some function somewhere...
const chalice = await Scry.Cards.byName("Chalice of the Void");
console.log(chalice.name, chalice.set); // "Chalice of the Void", "a25"
const prints = await chalice.getPrints();
console.log(prints.length); // 7
This module supports all features of Scryfall, along with automatically paginating through results, downloading bulk data streams, etc. There's also documentation on every single part of the SDK:
Thanks for wanting to help out! Here's the setup you'll have to do:
git clone https://github.com/ChiriVulpes/scryfall-sdk
cd scryfall-sdk
npm install
You can now make changes to the repository.
To compile, then test:
gulp build
To compile and then test on every file change:
gulp watch