https://github.com/moishinetzer/remix-meetup-2024
https://github.com/moishinetzer/remix-meetup-2024
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/moishinetzer/remix-meetup-2024
- Owner: moishinetzer
- Created: 2024-02-20T07:48:17.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-02T16:11:25.000Z (about 2 years ago)
- Last Synced: 2025-04-04T20:43:15.263Z (about 1 year ago)
- Language: TypeScript
- Size: 297 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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`.