Q: "Le meilleur site de Q du MONDE ENTIER"
Site réalisé dans le cadre d'un test technique afin de réaliser mon stage de fin de première année à la Quincaillerie.
Definition
GET /api
Response
200 OK
on success
[
{
"id" : 42,
"url": "https://cdn.dribbble.com/users/230124/screenshots/4296888/qampersand1.png",
"votes": {
"up" : 100,
"down" : 2
}
},
{
"id" : 12,
"url": "https://cdn.dribbble.com/users/297873/screenshots/6358046/q-06_final_dribbble_4x.jpg",
"votes": {
"up" : 314,
"down" : 420
}
}
]
Definition
GET /api/42
Response
200 OK
on success
{
"id" : 42,
"url": "https://cdn.dribbble.com/users/230124/screenshots/4296888/qampersand1.png",
"votes": {
"up" : 100,
"down" : 2
}
}
404 Not Found
if "Q" does not exist
Definition
GET /api/random-q
Response
200 OK
on success
{
"id" : 42,
"url": "https://cdn.dribbble.com/users/230124/screenshots/4296888/qampersand1.png",
"votes": {
"up" : 100,
"down" : 2
}
}
Definition
POST /api/<id>/vote
Arguments
"up":string
"true" if it is an upvote or "false" for downvote
Response
200 OK
on success
{
"id" : 42,
"url": "https://cdn.dribbble.com/users/230124/screenshots/4296888/qampersand1.png",
"votes": {
"up" : 101,
"down" : 2
}
}
404 Not Found
if "Q" does not exist