GithubHelp home page GithubHelp logo

chirivulpes / scryfall-sdk Goto Github PK

View Code? Open in Web Editor NEW
94.0 4.0 13.0 561 KB

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

License: MIT License

TypeScript 99.73% JavaScript 0.27%
scryfall scryfall-sdk scryfall-api typescript magic-the-gathering mtg mtg-cards mtg-api

scryfall-sdk's Introduction

scryfall-sdk

npm GitHub issues Travis

A Node.js SDK for Scryfall written in Typescript.

As of October 23rd, 2023, all features described in the Scryfall documentation are supported. If you see something that isn't supported, make an issue!

Installation

npm install scryfall-sdk

Using a node.js version older than v18?

Install the axios dependency alongside scryfall-sdk and it will automatically use it.

Basic Example Usage

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:

Contributing

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

MIT License

Copyright 2017-2022 Chiri Vulpes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.