Skip to content
/ telr Public

Ask "TELR" to translate Pokemon names to Shakesperean descriptions

License

Notifications You must be signed in to change notification settings

lordkada/telr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to "TELR"

The goal of "TELR" is to implement a simple API service that translates a Pokeman to a Shakespearean description.

The development process

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.

Docs

In the docs folder you can find the Postman collection for this project

Run the software

To run the API from the terminal/shell, you have a couple of alternatives:

  • using your local JVM (you need: JDK1.8+)
  • run a docker container (you need: Docker)

Launch tests

To execute tests, type from inside the project folder

$ ./mvnw test

Run locally (JVM)

type from inside the project folder:

$ ./mvnw spring-boot:run

Run inside a Docker container

The Dockerfile and convenience scripts to build and run the docker image are placed in the devops folder.

Please, follow these simple steps:

  1. 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
  1. Run the docker container:
$ VERSION=test devops/start_docker.sh

Show me how to use TELR

Once started (local JVM or Docker container), here you have your endpoint available, here the synopsis:

Get a Pokemon Shakespearean description

HTTP/GET ==> /pokemon/{pokemon-name}

Parameter:

pokemon-name: The name of the Pokemon you want to be described

Result:

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)

About

Ask "TELR" to translate Pokemon names to Shakesperean descriptions

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published