Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.74 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": null,     // YES
  31.   // "lastMeasurement": {},       // NO
  32.  
  33.   "lastMeasurement": {
  34.     "id": 1,
  35.     "date": "2019-02-07T12:00:00",
  36.     "situation": "O",
  37.     "stressScore": 8,
  38.     "stressScoreLabel": "Veel stress"
  39.   },
  40.  
  41.   // Data to display on dashboard tiles
  42.   // If there are no measurements for this situation,
  43.   // just leave `recoveryIndices` list empty (NOT null)
  44.   //
  45.   // "recoveryIndices": [],     // YES
  46.   // "recoveryIndices": null,   // NO
  47.  
  48.   "recentMeasurements": [
  49.     {
  50.       "situation": "O",
  51.       "recoveryIndices": [
  52.         56,
  53.         45,
  54.         78,
  55.         12
  56.       ]
  57.     },
  58.     {
  59.       "situation": "R",
  60.       "recoveryIndices": []
  61.     },
  62.     {
  63.       "situation": "E",
  64.       "recoveryIndices": [
  65.         34
  66.       ]
  67.     }
  68.   ]
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement