This is the Pokémon TCG SDK Javascript implementation. It is a wrapper around the Pokémon TCG API of pokemontcg.io.
npm install --save pokemontcgsdk
const pokemon = require('pokemontcgsdk')
pokemon.card.find('base1-4')
.then(result => {
console.log(result.card.name) // "Charizard"
})
Query cards by any property:
card.where({ supertype: 'pokemon', subtype: 'mega' })
.then(cards => {
console.log(cards[0].name) // "M Sceptile-EX"
})
Retrieve cards across multiple pages of results:
card.all({ name: 'blastoise', pageSize: 1 })
.on('data', card => {
console.log(card.name)
})
// Will print:
// Blastoise
// Blastoise-EX
// M Blastoise-EX
// ....
id
name
nationalPokedexNumber
imageUrl
subtype
supertype
ability
ancientTrait
hp
number
artist
rarity
series
set
setCode
retreatCost
text
types
attacks
weaknesses
resistances
code
name
series
totalCards
standardLegal
releaseDate
- es6 (babel)
- standardjs
- promises
Build tasks are in npm scripts:
npm run build
npm run watch
npm run test