-
Notifications
You must be signed in to change notification settings - Fork 0
REST API
Daniel Chabr edited this page Nov 9, 2015
·
7 revisions
- parameter: none
- returns: JSON array of all meals
- if a query parameter is provided, the results will be filtered
- results should be paginated.
- status code indicates success, 200 OK
- default limit: 10
- default start: 0 Ex. { "limit" : 10, "start" : 0, data : [{...}, {...}, ...] }
- parameter: none
- returns: JSON meal object
- status code indicates success, 200 OK
- parameter: image file
- returns: string url to the saved file in the format http://server:port/meals/images/{id}
- status code indicates success, 200 OK
- parameter: none
- returns: image file
- status code indicates success, 200 OK
- parameter: JSON meal object
- returns: nothing
- status code indicates success, 201 created
- parameter: JSON meal object
- returns: nothing
- updates existing meal object with the specified ID
- status code indicates success, 200 OK
- parameter: none
- returns: nothing
- deletes meal with the specified ID
- status code indicates success, 200 OK
- parameter: JSON user object
- returns: nothing
- registers new user
- status code indicates success, 201 created
- parameter: JSON containing username/email and password
- returns: JSON user object containing also token which will be used for sending further requests in HTTP headers to authenticate user's actions
- signs in the user
- status code indicates success, 200 OK
- parameter: JSON user object
- returns: nothing
- updates user object
- status code indicates success, 200 OK
- parameter: JSON user object
- returns: nothing
- logs out the user
- status code indicates success, 200 OK
- parameter: {"hangul": "...."}
- return: {"latin": "..."}
- parameter: {"korean": "...."}
- return: {"english": "..."}