Skip to content

Instantly share code, notes, and snippets.

@manuelgeek
Last active April 7, 2018 20:47
Show Gist options
  • Save manuelgeek/5aec52ecab1f41936d58d9a6a5262623 to your computer and use it in GitHub Desktop.
Save manuelgeek/5aec52ecab1f41936d58d9a6a5262623 to your computer and use it in GitHub Desktop.
1. header set
Api-Key = 12345safety
Content-type = application/json
if empty
{
"success": false,
"message": "No Api Key set, Access Denied"
}
2. POST /api/add_rating
empty
inputs: comment, route_id, rating
{
"success": false,
"message": {
"route_id": [
"The route id field is required."
],
"rating": [
"The rating field is required."
]
}
}
json request
{
"comment" : "well road",
"route_id" : "1234r",
"rating" : 1
}
success
{
"success": true,
"message": "Rating saved"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment