Git Product home page Git Product logo

poke-evolution-chain's Introduction

poke-evolution-chain

# Poke Evolution Chain

This project aims to provide a solution for retrieving the evolution chain and variations of a Pokémon using the Poke API. It utilizes Node.js and Express to create a server that serves the evolution chain information as a JSON response.

## Prerequisites

- Node.js (version 20.3.0)
- npm (version 9.6.7)

## Getting Started

1. Clone the repository:

   ```shell
   git clone https://github.com/nitinmaram/poke-evolution-chain
  1. Install the dependencies:

    cd poke-evolution-chain
    npm install
  2. Start the server:

    npm start

    The server will be running at http://localhost:3000.

Usage

To retrieve the evolution chain information for a Pokémon, make a GET request to the following endpoint:

GET /evolution-chain/:pokemonName

Replace :pokemonName with the name of the Pokémon you want to retrieve the evolution chain for(eg. pikachu).

The server will respond with a JSON object representing the evolution chain and variations of the Pokémon.

API Reference

GET /evolution-chain/:pokemonName

Retrieves the evolution chain and variations of a Pokémon.

  • Parameters:

    • pokemonName (string): The name of the Pokémon.
  • Response:

    • Status: 200 OK

    • Body: JSON object representing the evolution chain and variations. The structure will be as follows:

      {
        "name": "caterpie",
        "variations": [
          {
            "name": "metapod",
            "variations": [
              {
                "name": "butterfree",
                "variations": []
              }
            ]
          }
        ]
      }

      The name field represents the name of the Pokémon and the variations field contains an array of similar objects representing the variations in the evolution chain.

  • Error Responses:

    • Status: 404 Not Found

      • Body: {"error": "Pokemon not found."}
    • Status: 500 Internal Server Error

      • Body: {"error": "Internal server error."}

Contributing

Contributions are welcome! If you have any suggestions, improvements, or bug fixes, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.


Feel free to customize the sections and content according to your project's specific needs.

poke-evolution-chain's People

Contributors

manithin18 avatar nitinmaram avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.