# mtgdb-wrapper

> A simple wrapper for the MtgDB JSON API located at api.mtgdb.info

Latest version **0.1.0** (published 2014-04-29) · 0 weekly downloads

## Install

```sh
npm install mtgdb-wrapper
pnpm add mtgdb-wrapper
yarn add mtgdb-wrapper
bun add mtgdb-wrapper
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2014-04-29 |
| First published | 2014-04-29 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jeremy Cerise |
| Maintainers | jcerise |
| Keywords | mtgdb |

## Links

- npm: https://www.npmjs.com/package/mtgdb-wrapper
- Repository: https://github.com/jcerise/mtgdb-wrapper
- Issues: https://github.com/jcerise/mtgdb-wrapper/issues
- npm.io page: https://npm.io/package/mtgdb-wrapper

## Dependencies (1)

- [restler](https://npm.io/package/restler.md) ^3.2.2

## Recent versions

- 0.1.0 (latest) — 2014-04-29
- 0.2.0 (0.2.0) — 2014-05-11

## README

mtgdb-wrapper
=============

A simple wrapper for the MtgDB API Project (found here: http://api.mtgdb.info/)

## Installation

	npm install mtgdb-wrapper --save

## Usage

	var mtgDb = require('mtgdb-wrapper');

	//Get card by ID
	mtgdb.getSingleCard(380449, function(card) {
		//Launch the Fleet
		console.log(card);
	});

	//Get random card
	mtgdb.getRandomCard(function(card) {
		//Random card
		console.log(card);
	});

	//Get cards by name
	mtgdb.getCardByName('Circle of Protection: Red', {}, function(cards) {
		//Array containing all versions of card called 'Circle of Protection: Red'
		console.log(cards);
	});

	//Get cards by name from a specific set
	mtgdb.getCardByName('Circle of Protection: Red', {set : 'Fifth Edition'}, function(cards) {
		//Array containing Circle of Protection: Red card object from Fifth Edition
		console.log(cards);
	});

## Tests

	npm test

## Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style.
Add unit tests for any new or changed functionality. Lint and test your code.

## Release History

* 0.1.0 Initial release

---
_Source: https://npm.io/package/mtgdb-wrapper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
