mtggoldfish-js
v0.0.6
Published
MTGGoldfish scrapper for Node.js
Downloads
6
Maintainers
Readme
mtggoldfish-js
MTGGoldfish scrapper for Node.js.
Installation
$ npm install mtggoldfish-js
Usage
const MTGGoldfish = require('mtggoldfish-js')
let goldfish = new MTGGoldfish()
Sets
goldfish.get.sets().then(sets => {})
or inside async function
let sets = await goldfish.get.sets()
Output is an array of objects. Each object in array contains set name
(String) and code
(String)
[{"name": "Alpha", "code": "LEA"}]
Cards
Function accepts following parameters:
code
(String) required: code of the required setpaper
(Boolean): true by default, false will return online pricesfoil
(Boolean): false by default, true will return foil prices
goldfish.get.cards('IKO').then(cards => {})
Output is an array of card objects. Each object contains name
(String) and price
(Float)
[{"name": "Black Lotus", "price": 28000}]
Version history
Version | Notes -|- 0.0.4 | Foil prices 0.0.3 | Parser improvements 0.0.1 | Initial release