Pokémon API for Java, 1st to 7th generation
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Implement remaining PokemonSpecies properties Dec 15, 2018
.gitignore Initial commit Dec 5, 2018
LICENSE Initial commit Dec 5, 2018
README.md Update README.md Dec 9, 2018
pom.xml Change Java version in pom.xml Dec 6, 2018

README.md

Codacy CodeFactor

Pokédex Java API

pokedex-java-api is the first wrapper for pokeapi.co written in pure Java.

Why should I use PDJ API?

  • Fully documented
  • Everything is treated as an object
  • Mantainable and readable code

Getting started

To get started, let's try to get the types of Bulbasaur:

public class Main {
    public static void main(String[] args) {
        Pokemon bulbasaur = Pokemon.fromName("bulbasaur");
        PokemonType[] types = bulbasaur.getTypes();
        for(PokemonType type : types) {
            System.out.println(type);
        }
    }
}

This will output:

GRASS
POISON

Every component of the API (such as Pokémons, abilities, etc) can be instantiated by using two static methods: fromName, which takes the name as a string, and fromId, which takes the identifier as a number.

This project is currently work in progress. Once finished, the JAR file will be released. At the moment you're free to clone this repository and use it as you wish. Credits to this project and to pokeapi.co are appreciated.