Skip to content

Instantly share code, notes, and snippets.

@qinbx
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save qinbx/c2ad0d8dada8820c1a8e to your computer and use it in GitHub Desktop.

Select an option

Save qinbx/c2ad0d8dada8820c1a8e to your computer and use it in GitHub Desktop.
API data format
// Error message format
{
"success": false,
"messageKey": "user_name_error",
"message": [ // Not required, if provided, will show this message to user
{type:"success", text:"task 1 done success"},
{type:"error", text:"task 2 failed"},
],
"mayRetry":false
}
// Success message format
{
"success": true,
"data": {}, // or []
"message": [] // not required
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment