Get, join, delete courses.
# POST /:username
/course
Enroll a user in a class. Submit a payload:
{
"course": "...course name..."
}
# POST /:username
/delCourse
Remove user from class. Submit a payload:
{
"course": "...course name..."
}
# GET /:username
/courses
Get all classes user is enrolled in. Returns:
{
"courses": [
"MobileProto",
"Linearity 2"
]
}
# GET /courses
Get all courses. Returns:
{
"courses": [
"MobileProto",
"Linearity 2"
]
}
Create, join, delete sessions.
# GET /sessions
Get all sessions. Returns:
{
"sessions": [
{
"course": "MobileProto",
"task": "Lab 5",
"date": "...",
"startTime": "...",
"endTime": "...",
"place": "WH2AL",
"usersAttending": [
"maci"
],
"_id": "525cb61fd94d8c0200000001"
}
]
}
# POST /createSession
Create Session. Submit a payload:
{
"course": "...course name...",
"task": "...task name...",
"date": "...date...",
"startTime": "...time...",
"endTime": "...time...",
"place": "...course nameplace...",
"user": "...first user..."
}
# DELETE /delAllSessions321 Delete all Sessions. No payload needed.
# POST /delSession/:id
Delete Session. No payload needed.
# POST /:sessionid
/addUser
Add user to session. Submit a payload:
{
"username": "...username...",
}
# POST /:sessionid
/removeUser
remove User from session. Submit a payload:
{
"username": "...username...",
}
MIT