Getting Started

Basic info on the creatures and the database.

Preliminaries

In order to be able to efficiently follow this guide, it is assumed that the reader is moderately familiar with HTML/CSS and JavaScript programming.

What is a Pokémon?

Pokémon is a series of portable video games originally developed by Game Freaks and Nintendo in 1996. The eponymous Pokémon are a collection of over 700 fictional creatures Pokemon Trainers befriend and fight other Trainers with.

Each Pokémon has a set of different attributes which are logged in an in-game digital encyclopedia named the Pokédex. The attributes which we are concerned with for the purposes of this tutorial are:

  1. Pokémon Name - (Pikachu)
  2. National Dex Number - (25)
  3. Pokémon Type - (Electric)
  4. Pokémon Genus - (Electric Mouse)
  5. and the Pokémon's in-game description.

We will use the PokéAPI to dynamically generate a Pokédex entry using a web page.

What is the PokéAPI?

Basic documentation for the PokéAPI is found here.

The PokéAPI contains a plethora of information on the Pokémon games. The API contains exterior GET methods which allow app developers to access API information and use it as a database. An example of a method response is shown below.

As one can see, the response from the /Pokemon-Species method is overwhelming. The API contains information on all versions of each game in the series, which includes each different language the games were ported due on release. Many Pokémon, such as Eevee, have been around for more than twenty years. These Pokémon also have extended responses, while the newer Pokémon have fewer indexed information.

Pokédex Demo Code

On this page, there is a demo Pokédex set up and ready for use. Let's take a quick look at its code:

On the following pages, we will go over this code piece by piece. On the next page, we'll talk about the GET request portion of the code, and how to make these requests to the PokéAPI using AJAX.