Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mariomh8/scryfall-api

A Javascript library for https://scryfall.com/docs/api written in Typescript.
https://github.com/mariomh8/scryfall-api

bun magic-the-gathering mtg scryfall typescript

Last synced: about 2 months ago
JSON representation

A Javascript library for https://scryfall.com/docs/api written in Typescript.

Awesome Lists containing this project

README

        

![banner.png](.idea%2Fbanner.png)


scryfall-api


A Javascript library for scryfall.com written in Typescript.



npm


GitHub issues

## Table of Contents

- [Installation](#installation)
- [Documentation](#documentation)
- [Contributing](#contributing)

## Installation

```bash
npm install --save scryfall-api
```

**Using bun**

```bash
bun add scryfall-api
```

## Documentation

In the documentation below, requiring the package is assumed.

```ts
import scryfall from 'scryfall-api';

scryfall.Cards.byName('Black Lotus').then(console.log);
```

**With CommonJS**

```js
const scryfall = require('scryfall-api');

scryfall.Cards.byName('Black Lotus').then(console.log);
```

**If you only need Cards**

```ts
import { Cards } from 'scryfall-api';

Cards.byName('Black Lotus').then(console.log);
```

Link to [full documentation.](./DOCUMENTATION.md)

## Contributing

This project uses [Bun](https://bun.sh) as a runtime, test runner and bundler.

Thanks for wanting to help out! Here's the setup you'll have to do:

Clone the project

```bash
git clone [email protected]:MarioMH8/scryfall-api.git
```

Go to the project directory

```bash
cd scryfall-api
```

Install dependencies

```bash
bun install
```

Compile the project

```bash
bun run build
```

## MIT License

[Copyright 2021-2024 MarioMH](./LICENSE)