Skip to content

NoistNT/Pokemon-API

Repository files navigation


    PokeWiki Logo  

Pokewiki

  An awesome RESTful API powering Pokewiki, a comprehensive Pokémon knowledge base!   
  View Demo   ·   Report Bug   ·   Request Feature  

About The Project


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.

Built With

TypeScript Node.js NestJS MongoDB Mongoose Zod

Getting Started

Follow these steps to set up your local development environment:

Prerequisites

  • Node.js and npm (or pnpm, yarn) installed on your system.

Installation

  1. Clone the repository:

    git clone https://github.com/NoistNT/Pokemon-API.git
  2. Install Dependencies

    npm

    npm install

    pnpm

    pnpm install

    yarn

    yarn install
  3. Run server

    npm start

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contact

LinkedIn Gmail