-> docker build --tag pokedex-clone .
-> docker run -p 5000:5000 --name test pokedex-clone
TBD
Given a Pokemon name, returns standard Pokemon description and additional information.
/HTTP/GET /pokemon/<pokemon name>
Example call (using curl):
curl http://localhost:5000/pokemon/mewtwo
Example API response:
{
"name": "mewtwo",
"description": "It was created by a scientist after years of horrific gene
splicing and DNA engineering experiments.",
"habitat": "rare",
"isLegendary": true
}
Given a Pokemon name, return translated Pokemon description and other basic information using the following rules:
- If the Pokemon’s habitat is cave or it’s a legendary Pokemon then Yoda translation is applied.
- For all other Pokemon, Shakespeare translation is applied.
- Otherwise a standard description is returned.
HTTP/GET /pokemon/translated/<pokemon name>
Example call (using curl):
curl http://localhost:5000/pokemon/translated/mewtwo
Example response:
{
"name": "mewtwo",
"description": "Created by a scientist after years of horrific gene
splicing and dna engineering experiments, it was.",
"habitat": "rare",
"isLegendary": true
}