0.0.6 • Published 5 years ago
mtggoldfish-js v0.0.6
mtggoldfish-js
MTGGoldfish scrapper for Node.js.
Installation
$ npm install mtggoldfish-jsUsage
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 |