Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.65 KB | None | 0 0
  1. * all dates show just the date format `yyyy-mm-ddThh:mm:ss.ffffff`
  2.  
  3. GET /api/v1.0/dashboard/{email}/{code}
  4.  
  5. Request: -
  6.  
  7. Response:
  8. {
  9.   // Message, that should be displayed on the top of the screen
  10.   // Click on this message will lead the user to the chosen type of measurement
  11.   // (according to situation)
  12.   //
  13.   // May be:
  14.   // - Update Measurement (no measurements for long time)
  15.   // - Congrats (some achievements)
  16.   // - Message that motivates to do measurement
  17.   //      (like good morning, or time to measurement)
  18.  
  19.   "topMessage": {
  20.     "title": "Update Measurement",
  21.     "message": "Last updated 14 May, 2019",
  22.     "situation": "O",
  23.     "icon": "http://icons.iconarchive.com/icons/papirus-team/papirus-status/256/dialog-error-icon.png"
  24.   },
  25.  
  26.   // Last measurement submitted by current user
  27.   // NOT the same model as in response to `GET .../measurement/...`
  28.   // If there are no measurements, just leave this field as null
  29.  
  30.   "lastMeasurement": {
  31.     "id": 1,
  32.     "date": "2019-02-07T12:00:00",
  33.     "situation": "O",
  34.     "stressScore": 8,
  35.     "stressScoreLabel": "Veel stress"
  36.   },
  37.  
  38.   // Data to display on dashboard tiles
  39.   // If there are no measurements for this situation,
  40.   // just leave `recoveryIndices` list empty (NOT null)
  41.   //
  42.   // "recoveryIndices": [],     // YES
  43.   // "recoveryIndices": null,   // NO
  44.  
  45.   "recentMeasurements": [
  46.     {
  47.       "situation": "O",
  48.       "recoveryIndices": [
  49.         56,
  50.         45,
  51.         78,
  52.         12
  53.       ]
  54.     },
  55.     {
  56.       "situation": "R",
  57.       "recoveryIndices": []
  58.     },
  59.     {
  60.       "situation": "E",
  61.       "recoveryIndices": [
  62.         34
  63.       ]
  64.     }
  65.   ]
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement