Skip to content

Node.js module that fetches AllSets.json from http://mtgjson.com and caches it so you are always sure to have the newest version.

Notifications You must be signed in to change notification settings

freeall/mtgjson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mtgjson

Fetches AllSets.json from http://mtgjson.com and caches it so you are always sure to have the newest version.

Includes AllSets.json to make loading time faster. This module follow the versioning of mtgjson.com.

Note - the JSON data is collected by @Sembiance, https://github.com/Sembiance/mtgjson.

Installation

npm install mtgjson

Usage

var mtgjson = require('mtgjson');

mtgjson(function(err, data) {
	if (err) return console.log(err);

	console.log(data.LEA.cards); // Prints out all cards from the Limited Edition Alpha (LEA) set
});

License

MIT

About

Node.js module that fetches AllSets.json from http://mtgjson.com and caches it so you are always sure to have the newest version.

Resources

Stars

Watchers

Forks

Packages