The goal of "TELR" is to implement a simple API service that translates a Pokeman to a Shakespearean description.
I develop this service during my spare time, so you can monitor the progress of my efforts here.
Basically, I will develop using a Gitflow approach and release new versions of the software according to the milestones above.
In the docs folder you can find the Postman collection for this project
To run the API from the terminal/shell, you have a couple of alternatives:
To execute tests, type from inside the project folder
$ ./mvnw test
type from inside the project folder:
$ ./mvnw spring-boot:run
The Dockerfile and convenience scripts to build and run the docker image are placed in the devops folder.
Please, follow these simple steps:
- Create the docker image by running the devops/build_docker.sh script by providing the VERSION of the docker image you want to create, eg:
$ VERSION=test devops/build_docker.sh
- Run the docker container:
$ VERSION=test devops/start_docker.sh
Once started (local JVM or Docker container), here you have your endpoint available, here the synopsis:
pokemon-name: The name of the Pokemon you want to be described
SUCCESS:
- HTTP status 200
- Json object containing the name and description of the Pokemon.
Eg:
$ curl --request GET localhost:8080/pokemon/charizard
produces:
{
"name": "charizard",
"description": "Charizard flies 'round the sky in search of powerful opponents. 't breathes fire of such most wondrous heat yond 't melts aught. However, 't nev'r turns its fiery breath on any opponent weaker than itself."
}
ERROR:
- HTTP status 404: Pokemon name not found.
- HTTP status 429: Too many requests (please, notice that you're limited to 5 requests per hour and 60 per day)