![PokeWiki Logo](/NoistNT/Pokemon-API/raw/main/assets/logo.webp)
An awesome RESTful API powering Pokewiki, a comprehensive Pokémon knowledge base!
View Demo
·
Report Bug
·
Request Feature
This RESTful API provides comprehensive access to Pokémon data, empowering developers to:
1. Fetch Pokémon:
- List All: Retrieve a comprehensive list of all available Pokémon.
- By Name: Search for a specific Pokémon by providing its name.
- By ID: Access data for a particular Pokémon using its unique identifier.
2. Manage Pokémon (CRUD Operations):
- Create: Add a new Pokémon to the database, adhering to the specified data format.
- Update: Modify existing Pokémon data, providing the updated information.
- Remove: Delete a Pokémon from the database by its ID.
Technical Specifications:
- Framework: NestJS
- Programming Language: TypeScript
- Database: MongoDB
- ORM: Mongoose
- Data Validation: Zod
- Endpoints:
Method | URL | Description |
---|---|---|
GET | /pokemon | Retrieves a list of all Pokémon. |
GET | /pokemon/:id | Fetches a Pokémon by ID. |
GET | /pokemon/:name | Searches for a Pokémon by name. |
POST | /pokemon | Creates a new Pokémon. |
PUT | /pokemon/:id | Updates an existing Pokémon. |
DELETE | /pokemon/:id | Deletes a Pokémon by ID. |
Data Validation:
This API employs Zod for robust data validation. Developers must adhere to the specified data format when creating, updating, or deleting Pokémon.
Follow these steps to set up your local development environment:
- Node.js and npm (or pnpm, yarn) installed on your system.
-
Clone the repository:
git clone https://github.com/NoistNT/Pokemon-API.git
-
Install Dependencies
npmnpm install
pnpm
pnpm install
yarn
yarn install
-
Run server
npm start
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request