Skip to content

moriakaice/pokemon-tcg-sdk-javascript

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pokémon TCG SDK

pokemontcg-developers on discord 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

About

Pokemon TCG SDK - Javascript

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%