mtggoldfish-js

0.0.6 • Public • Published

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

Package Sidebar

Install

npm i mtggoldfish-js

Weekly Downloads

4

Version

0.0.6

License

ISC

Unpacked Size

4.73 kB

Total Files

8

Last publish

Collaborators

  • etonomick