Welcome to Monsters API - a short list of silly pranksters that loves to mess with code and programmers. Let's meet all of them face to face! 💪
By default API works on localhost:8080/api/v1
. There's no CORS restrictions 👌. Just make sure your node.js
version is >=8.9.4
.
$ curl http://localhost:8080/api/v1
{
"data":{
"message": "Hello, Monsters API! 👋"
}
}
$ curl -I http://localhost:8080/api/v1
# ...
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=utf-8
# ...
GET /monsters
Returns array of monsters with their names and slugs. Slug is used for requesting monster details.
{
"data":[
{
"name": "Fooz",
"slug": "fooz",
"images": {
# ...
}
},
{
"name": "Bazz",
"slug": "bazz",
"images": {
# ...
}
},
# ...
]
}
-
GET /monster/:slug
If slug is correct and monster exists, will response with generated monster details. Each server instance will create new statistics so don't be surprised with the diffs 😉.
{
"data": {
"name": "Fooz",
"statistics": {
# ...
},
"description": "Lorem ipsum...",
"images": {
# ...
}
}
}
Monsters images used by the API were dowloaded from http://www.freepik.com
. Full terms of usage can be found in licence document.