This is a simple Pokemon API built using Node.js. It provides information about various Pokemon, including their names, types, abilities, and more. You can use this API to fetch Pokemon data for your applications or projects.
Before you start using the Pokemon API, make sure you have the following software installed:
- Node.js: Download and install Node.js from nodejs.org.
-
Clone this repository to your local machine:
git clone https://github.com/yourusername/pokemon-api-nodejs.git
-
Navigate to the project directory:
cd pokemon-api-nodejs
-
Install the required dependencies:
npm install
-
Start the server:
npm start
The Pokemon API server should now be running on http://localhost:3000
.
To use the Pokemon API, you can make HTTP requests to the various endpoints provided by the server. The API endpoints are documented below.
Retrieve information about all Pokemons.
- Endpoint:
/pokemons/
- Method: GET
- Parameters:
id
(integer): The ID of the Pokemon you want to retrieve.
Retrieve information about a specific Pokemon by its name.
- Endpoint:
/pokemons?name=string
- Method: GET
- Parameters:
name
(string): The name of the Pokemon you want to retrieve.
Retrieve information about a specific Pokemon by its ID.
- Endpoint:
/pokemon/:id
- Method: GET
- Parameters:
id
(integer): The ID of the Pokemon you want to retrieve.
Here are some example requests you can make to the Pokemon API:
-
Get information about Pokemon by ID:
GET /pokemons/25
-
Get information about Charizard by name:
GET /pokemons/charizard
-
Get Pokemons by type
GET /pokemons/types/poison
Contributions to this project are welcome. If you have any improvements or feature suggestions, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.