- Test out Google Books API and iTunes API
- Output books and albums related to a search query
- Make using the two APIs independent (concurrent, resilient)
- Expose metrics / health checks
Spin up a server:
go run main.go
Visit localhost:8080
for more info and instructions.
Current responses are given as string text. Future improvements might include responses as JSON.
parameters {
query - what are you looking for in books and albums
max - max number of results (default 5)
}
e.g. GET /?query=hoziert&max=5
Culture API Albums
- Hozier - From Eden - EP
- Hozier - Hozier (Bonus Track Version)
- Hozier - Nina Cried Power - EP
- Hozier - Take Me to Church - EP
- Hozier - Wasteland, Baby!
Books
- A. Hozier-Byrne - Better Love (from "The Legend of Tarzan")
- Mary Soames - Clementine Churchill
- - Hozier
- Perfect Papers - Keep Calm and Listen to Hozier
- Henry M. Hozier - The Seven weeks' war
response (as string):
Culture API
Metrics
Average: 124.951304ms
response (as string):
Culture API
Book Request Metrics
Average: 124.951304ms
response (as string):
Culture API
Album Request Metrics
Average: 124.951304ms
Currently, no unit tests have been written. Race conditions have been explored using:
go run -race main.go
circleci-lint was used as a static analysis tool. True positives were dealt with.
circleci-lint run
See also the inline notes in code.
-
Add tests
-
Code review
-
Integrate with CICD
-
Further nail down requirements
-
Based on requirements, prioritize new performance improvements / new features / usability etc.
-
Give API response as JSON/XML