moishinetzer / remix-meetup-2024

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pokèmon API Documentation

Overview

The Pokemon API allows access to a collection of Pokemon data, including retrieval of Pokemon details, listing of Pokemon, and toggling their 'favourite' status.

Base URL

http://localhost:3001

Endpoints

1. List Pokemon

  • URL: /pokemon
  • Method: GET
  • Description: Retrieves a paginated list of Pokemon. Optional page query for pagination (3 per page).

2. Get Pokemon Details

  • URL: /pokemon/:id
  • Method: GET
  • Description: Fetches details of a specific Pokemon by ID.
  • URL Parameters: id - ID of the Pokemon.

3. Toggle Favourite Status

  • URL: /pokemon/:id/favourite
  • Method: POST
  • Description: Toggles the 'favourite' status of a specified Pokemon.
  • URL Parameters: id - ID of the Pokemon to toggle.

Data Model

Pokemon

  • id: number - Unique identifier.
  • favourite: boolean - Favourite status.
  • name: string - Name.
  • image: string - Image URL.
  • type: string - Type.
  • abilities: string[] - Abilities.
  • stats: Object - Contains hp, attack, defense.

About


Languages

Language:TypeScript 84.5%Language:JavaScript 15.0%Language:CSS 0.4%