Skip to content
Jan Buchta edited this page Sep 23, 2015 · 3 revisions

###Work in progress

##Data sent to api.php

  • User-Agent = "SholiApp"
  • POST-request with values for
  • item
  • count
  • jsonArray
    • {"itemTitle":Title of item, "itemCount":Count of item}
  • auth
  • function
    • possible values {listall, saveMultiple, deleteMultiple, update, delete, clear}
    • currently not being used {save, delete}

##Expected data from api.php

  • Header: ('ShoLiBackendVersion: current version of backend as defined in CONSTANTS.php as a double e.g. 1.0')
  • jsonArray for list which will be converted to a java object and displayed in the list
    • {'itemTitle': Title of item, 'itemCount' => Count of item, 'checked' => false}
      • 'checked' is important because it is part of the java object and cannot be omitted
  • Errors should give back the values defined in CONSTANTS.php as well as a message
    • This will be used in the app to display the message
    • Error codes:
      • All codes 1000-1999 will be displayed as a success (if implemented)
      • All codes > 5000 will be displayed as an error in the app
      • The message provided by the backend will be displayed

Clone this wiki locally