This is the Pokémon TCG SDK Ruby implementation. It is a wrapper around the Pokémon TCG API of pokemontcg.io.
Add this line to your application's Gemfile:
gem 'pokemon_tcg_sdk'
And then execute:
$ bundle
Or install it yourself as:
$ gem install pokemon_tcg_sdk
To configure your API Key:
Pokemon.configure do |config|
config.api_key = "xxxxxxxxx"
end
Card
Set
Type
Supertype
Subtype
Ability
AncientTrait
Attack
Resistance
Weakness
Legalities
Rarity
SetImages
CardImages
Tcgplayer
id
name
supertype
subtypes
level
hp
types
evolves_from
evolves_to
rules
ancient_trait
abilities
weaknesses
resistances
retreat_cost
converted_retreat_cost
set
number
artist
rarity
national_pokedex_numbers
legalities
regulation_mark
tcgplayer
cardmarket
images
flavor_text
id
name
series
printedTotal
total
legalities
ptcgo_code
release_date
updated_at
images
name
text
type
name
text
cost
name
text
damage
converted_energy_cost
type
value
type
value
small
large
logo
symbol
card = Pokemon::Card.find('xy1-1')
cards = Pokemon::Card.where(q: 'set.name:generations subtypes:mega')
cards = Pokemon::Card.all
cards = Pokemon::Card.where(page: 5, pageSize: 100)
set = Pokemon::Set.find('base1')
sets = Pokemon::Set.where(q: 'legalities.standard:legal')
sets = Pokemon::Set.all
types = Pokemon::Type.all
subtypes = Pokemon::Subtype.all
supertypes = Pokemon::Supertype.all
supertypes = Pokemon::Rarity.all
- Fork it ( https://github.com/[my-github-username]/pokemon-tcg-sdk-ruby/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request