mtggoldfish-js

MTGGoldfish scrapper for Node.js.

Usage no npm install needed!

<script type="module">
  import mtggoldfishJs from 'https://cdn.skypack.dev/mtggoldfish-js';
</script>

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 set
  • paper (Boolean): true by default, false will return online prices
  • foil (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