Skip to content

thiiagoms/draft-clean-arch-pokemon

Repository files navigation

CA - Drafts

My custom notes about CA

Installation

  1. Clone this repository:
git clone https://github.com/thiiagoms/php-clean-arch-draft
cd php-clean-arch-draft
  1. Setup app and redis container:
docker-compose up -d
docker-compose exec app bash
  1. Install app dependencies:
composer install -vvv

Tech Stack

Server: PHP, Redis, Docker

Usage

Send pokemon namehttp://localhost:9001/{pokemon} like:

http://localhost:9001/gyarados

HTTP 200 - Ok

{
  "id": 130,
  "name": "gyarados",
  "height": 65,
  "weight": 2350,
  "abilities": [
    {
      "name": "intimidate",
      "url": "https://pokeapi.co/api/v2/ability/22/",
      "isHidden": false,
      "slot": 1
    },
    {
      "name": "moxie",
      "url": "https://pokeapi.co/api/v2/ability/153/",
      "isHidden": true,
      "slot": 3
    }
  ],
  "types": [
    {
      "name": "water",
      "url": "https://pokeapi.co/api/v2/type/11/",
      "slot": 1
    },
    {
      "name": "flying",
      "url": "https://pokeapi.co/api/v2/type/3/",
      "slot": 2
    }
  ]
}