mtgdb-wrapper

0.1.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    0
    • 0.2.0
  • 0.1.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i mtgdb-wrapper

Weekly Downloads

0

Version

0.1.0

License

none

Last publish

Collaborators

  • jcerise