Skip to content
Pokemon TCG SDK - Javascript
Branch: master
Clone or download
Pull request Compare This branch is 15 commits ahead, 23 commits behind MagicTheGathering:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
src
test-src
.babelrc
.gitignore
.travis.yml
LICENSE
README.md
package.json

README.md

Pokémon TCG SDK

pokemontcg-developers on discord npm version Build Status

This is the Pokémon TCG SDK Javascript implementation. It is a wrapper around the Pokémon TCG API of pokemontcg.io.

Installation

npm install --save pokemontcgsdk

Usage

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
// ....

Properties

Card

id
name
nationalPokedexNumber
imageUrl
subtype
supertype
ability
ancientTrait
hp
number
artist
rarity
series
set
setCode
retreatCost
text
types
attacks
weaknesses
resistances

Set

code
name
series
totalCards
standardLegal
releaseDate

Development

Build tasks are in npm scripts:

npm run build
npm run watch
npm run test
You can’t perform that action at this time.