Request:
Body: ID token string provided by Google Identity service.
Content type: text/plain.
Response:
401 (invalid ID token string)
200 (success; returns token
as cookie)
All endpoints requires user authorization.
Adds an enrolled class for the authorized user.
Request body (JSON):
course_name (String) | Name of the course. |
section (String) | Signle character. |
term (String) | Valid values are: FALL, WINTER, SUMMER. |
year (Integer) | Four digit year. |
Response:
201 (success; returns the newly created object)
401 (unauthorized)
Response:
200 (success; returns an array of class objects)
Response:
204 (success)
403 (if the class doesn't belong to the user)
All endpoints requires user authorization.
Adds an activity in the provided class.
Request body (JSON):
name (String) | Name of the activity. For example, quiz, test, assignment etc. |
weight (Double) | Weight of the activity in the final grade in percentage. |
total (Double) (Optional) |
Total score on which the activity is graded on. For example,
weight may be 5% but the total score can be 100.
Can be excluded if unknown. |
score (Double) (Optional) |
Score achieved by the user.
Can be excluded to indicate that the activity has not been graded yet. |
Response:
201 (success; returns the newly created activity)
401 (unauthorized)
Changes the order of activities.
Request body: Ordered JSON array of activity ids. If one or more activity ids are not provided but they are in the class, then they are put at the end of newly ordered activities.
Response:
200 (success; returns activity list)
Updates the provided activity. Usually used for updating the 'score' attribute.
Request body (JSON): Same as the post endpoint, but all keys are optional.
Response:
200 (succeed; returns the updated activity)
Response:
204 (success)