Skip to content

Latest commit

 

History

History
84 lines (76 loc) · 1.48 KB

NOTES.md

File metadata and controls

84 lines (76 loc) · 1.48 KB

JSON format for frontend-backend coomunication

uploadRequest = {
    "op" : "upload"
    "image" : <String> image
}
uploadResponse = {
    "op" : "upload"
    "quote" : <String>[] quotes
}
 hasError = {
    "op" : "fail"
 }
registerRequest = {
    "op" : "register"
    "uid" : <String> username
    "password" : <String> password
}
registerResponse = {
    "op" : "register"
    "success" : <Integer> success (1: success, 0: fail)
    "uid": <String> username
}
loginRequest = {
    "op" : "login"
    "uid" : <String> username
    "password" : <String> password
}
loginResponse = {
    "op" : "login"
    "success" : <Integer> 0/1
    "uid": <String> username
}
loadRequest = {
    "op" : "load"
    "uid" : <String> username
}
loadResponse = {
    "op" : "load"
    "data" : <JSONArray> = [<JSONObject> story1, <JSONObject> story2, ...]
}
confirmRequest = {
    "op" : "confirm"
    "uid" : <String> username
    "image" : <String> encodedImage
    "quote" : <String> confirmedQuote
}
confirmResponse = {
    "op" : "confirm"
}
deleteRequest = {
    "op" : "delete"
    "row_id" : <Integer>[] = [row_id1, row_id2, ....]
    "uid": <String> username
}
deleteResponse = {
    "op" : "delete"
    "data" : <JSONArray> = [<JSONObject> story1, <JSONObject> story2, ...]
}

Possible features for CI/CD stage

  • user crop photo before upload
  • user delete multiple stories
  • user post event to nearby users