KuteGo is an API to play with cute Aurelie Vache's Gophers
For now, the API provide:
- the Gophers list
- a route to display one Gopher of your choice 😍
- and a random Gopher!
You can resize them with query param
http://localhost:8080/gopher/random?size=[x-small,small,medium]
Install Go in 1.16 version minimum.
Install Taskfile (optional)
$ go build -o bin/kutego-api internal/main.go
// or
$ task build
$ go run internal/main.go
// or
$ task run
This will open you browser on Swagger UI
$ task swagger:serve
Get list of available Gophers:
$ curl http://localhost:8080/gophers
[
{
"name": "5eme-element",
"path": "5eme-element.png",
"url": "https://raw.githubusercontent.com/scraly/gophers/main/5eme-element.png"
},
{
"name": "arrow-gopher",
"path": "arrow-gopher.png",
"url": "https://raw.githubusercontent.com/scraly/gophers/main/arrow-gopher.png"
},
[...]
{
"name": "back-to-the-future-v2",
"path": "back-to-the-future-v2.png",
"url": "https://raw.githubusercontent.com/scraly/gophers/main/back-to-the-future-v2.png"
}
]
Get Gopher by name:
$ curl -O localhost:8080/gopher/back-to-the-future-v2
$ file back-to-the-future-v2
back-to-the-future-v2: PNG image data, 552 x 616, 8-bit/color RGBA, non-interlaced
Enjoy to see a so cute Gopher!
This API use go-swagger
Special thanks to Scraly who wrote an awesome article about How to write an API by exemple