Pokémon TCG SDK
This is the Pokémon TCG SDK Elixir implementation. It is a wrapper around the Pokémon TCG API of pokemontcg.io.
Installation
The package can be installed as:
-
Add
pokemonto your list of dependencies inmix.exs:
```elixir
def deps do
[{:pokemon, "~> 1.0"}]
end
```-
Ensure
pokemonis started before your application:
```elixir
def application do
[applications: [:pokemon]]
end
```Modules
Card
Set
Type
Supertype
SubtypeProperties Per Class
Card
id
name
national_pokedex_number
image_url
subtype
supertype
ability
hp
number
artist
rarity
series
set
set_code
retreat_cost
text
types
attacks
weaknesses
resistancesSet
code
name
series
total_cards
standard_legal
release_dateAbility
name
textAttack
cost
name
text
damage
converted_energy_costTypeValue
type
valueFunctions Available
Find a card by id
card = Pokemon.Card.find("xy1-1")Filter Cards via query parameters
cards = Pokemon.Card.where(set: "generations", superType: "pokemon")Find all cards (will take awhile)
cards = Pokemon.Card.allGet all cards, but only a specific page of data
cards = Pokemon.Card.where(page: 5, pageSize: 100)Find a set by code
set = Pokemon.Set.find("base1")Filter sets via query parameters
sets = Pokemon.Set.where(standardLegal: true)Get all Sets
sets = Pokemon.Set.allGet all Types
types = Pokemon.Type.allGet all Subtypes
subtypes = Pokemon.Subtype.allGet all Supertypes
supertypes = Pokemon.Supertype.allContributing
- Fork it ( https://github.com/[my-github-username]/pokemon-tcg-sdk-elixir/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