0.0.6 • Published 4 years ago

mtggoldfish-js v0.0.6

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

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

VersionNotes
0.0.4Foil prices
0.0.3Parser improvements
0.0.1Initial release
0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago