Open Jta26 opened 3 years ago
Further notes on data format...
Courses will be saved in "courses.json", which will look something like this:
[
{
"title": "Data Structures",
"course_code": "CS 0045",
"term": "2214",
"students": ["Joel Austin", "Kacey Hirth", "Jose Zindia", "Pat Healy", "Brenna Schroter"]
}
]
For reference, here's an example url for getting the students for a given course: host/data/students.php?title=Data%20Structures&course_code=CS%200045&term_code=2214
url for getting the list of courses is host/data/courses.php
Get office hour availability by issuing a get request to host/data/schedule.php
Post fill an office hour timeslot by issuing a post request to host/data/schedule.php with these two parameters:
The post will fail if either the slot wasn't available or the student is not registered with any courses (according to courses.json). It returns detailed error messages in both of these cases.
All of the above code is on the data-api branch, waiting to be merged to master
GET office hours with availability
}