This is the Pokémon TCG SDK Elixir implementation. It is a wrapper around the Pokémon TCG API of pokemontcg.io.
The package can be installed as:
- Add
pokemon
to your list of dependencies inmix.exs
:
```elixir
def deps do
[{:pokemon, "~> 1.0"}]
end
```
- Ensure
pokemon
is started before your application:
```elixir
def application do
[applications: [:pokemon]]
end
```
If you recieve a dependency issue on heroku from this package, create an elixir_buildpac.config in the root directory of your project with the following code:
erlang_version=19.0.2
elixir_version=1.3.2
Card
Set
Type
Supertype
Subtype
id
name
national_pokedex_number
image_url
subtype
supertype
ability
hp
number
artist
rarity
series
set
set_code
retreat_cost
text
types
attacks
weaknesses
resistances
code
name
series
total_cards
standard_legal
release_date
name
text
cost
name
text
damage
converted_energy_cost
type
value
card = Pokemon.Card.find("xy1-1")
cards = Pokemon.Card.where(set: "generations", superType: "pokemon")
cards = Pokemon.Card.all
cards = Pokemon.Card.where(page: 5, pageSize: 100)
set = Pokemon.Set.find("base1")
sets = Pokemon.Set.where(standardLegal: true)
sets = Pokemon.Set.all
types = Pokemon.Type.all
subtypes = Pokemon.Subtype.all
supertypes = Pokemon.Supertype.all
- 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