App uses following design decisions, libraries and Endpoints.
- For Pokemon info
https://pokeapi.co
and for Fun Translationshttps://api.funtranslations.com
Endpoints. - OneOf for Control Flow rather than
Exceptions
- Redis to Cache rate-limited Endpoints + API Latency
- StackExchange.Redis for Redis Connection handler
- Polly for resilient HttpClient as extension with retry policies
- NSubsitute for Mocking
There are 2 endpoints:
GET /pokemon/{name}
Returns Basic Info on give Pokemon
GET /pokemon/translated/{name}
Returns Yoda
/Shakespeare
translated Pokemon info.
- With
Visual Studio
Pre-requisite is to have a Redis instance running on localhost:6379
then, Just load the sln
and run. Swagger Docs should auto open at http://localhost:5000/swagger/
NOTE: If you are using VS 2022 and see VS Analysis Errors please rebuild the project. It's an issue with VS 2022 Code Generation on build time, Ref
Docker Compose
Simply run following command in project root
docker-compose up
Open Swagger Docs at: http://localhost:5000/swagger/
Could add Redis Cache for Speed and to avoid API calls which for now are rate limit/paid.(ADDED)