Advertisement
Guest User

API_exercise

a guest
Oct 17th, 2019
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Endpoint url: http://api.moringa.org
  2.  
  3. Methods:
  4.  
  5. GET /modules/live_modules
  6. - Response: The "results" array contains module information as described below:
  7. { "results": [  
  8.     {
  9.      "id": 1,
  10.      "name":  "Intro",
  11.      "start_date": "17/10/2019",
  12.      "end_date": "17/11/2019",
  13.      "students": [1, 14, 35, 23]
  14.     }, {
  15.      "id": 1,
  16.      "name":  "Data Science Core",
  17.      "start_date": "15/09/2019",
  18.      "end_date": "15/12/2020",
  19.      "students": [1, 14, 50, 2, 25, 12]
  20.     }
  21.   ]
  22. }
  23.  
  24. - "id" is the integer id of the module.
  25. - "name" is a String containing the name of the module.
  26. - "start_date" is a String indicating the day the module started
  27. - "end_date" is String indicating the day the module ends.
  28. - "students" is a List of integer ids for the students currently enrolled in the module.
  29.  
  30. GET /progression/{module_id}/{student_id}
  31. - Response example:
  32. {
  33.     "progress": 55,
  34.     "probation": True
  35. }
  36.  
  37. - "progress" is a float which indicates how far the student has gotten in the module. The expectation is that the student should have at least 45% progression by the halfway mark of the module.
  38. - "probation" is a boolean which indicates if a student is on probation or not.
  39.    A student not on probation will be put on probation if they fail a module.
  40.    A student on probation will be expelled if they fail a module.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement