- URL:
/schedules
- Method:
GET
- Request Body: None
- Response Body:
{ "status": "success", "message": "Schedules retrieved successfully.", "data": [ { "id": 1, "name": "Fall Semester", "courses": [ { "id": 1, "code": "40384", "title": "Web Programming", "lecturer": "Mr. Smith", "credit": 3, "start": "13:30", "end": "15:00", "capacity": 40, "remainingCapacity": 10, "barnomzEnrollments": 20, "examDate": "2023-12-18T17:00", "group": 2 } // More courses... ] } // More schedules... ] }
- URL:
/schedules
- Method:
POST
- Request Body: None
- Response Body: Same as "Get All Schedules"
- URL:
/schedules
- Method:
DELETE
- Request Body:
{ "id": "1" }
- Response Body: Same as "Get All Schedules"
- URL:
/schedules/{scheduleId}/course
- Method:
POST
- Request Body: Course object
- Response Body: Same as "Get All Schedules"
- URL:
/schedules/{scheduleId}/course
- Method:
DELETE
- Request Body:
{ "id": "1" }
- Response Body: Same as "Get All Schedules"
- URL:
/schedules/{scheduleId}/makePublic
- Method:
PATCH
- Request Body:
{ "id": "1" }
- Response Body: None
- URL:
/schedules/{scheduleId}/duplicate
- Method:
POST
- Request Body:
{ "id": "1" }
- Response Body: Same as "Get All Schedules"
- URL:
/colleges
- Method:
GET
- Request Body: None
- Response Body:
{ "status": "success", "message": "Colleges retrieved successfully.", "data": [ { "id": 1, "name": "Computer Science College" } // More colleges... ] }
- URL:
/colleges/{collegeId}/courses
- Method:
GET
- Request Body:
{ "id": 1 }
- Response Body: List of all courses of the specified college
- URL:
/schedules/public
- Method:
POST
- Request Body: Filters (array of objects)
- Response Body: List of filtered schedules
- URL:
/lecturers/{lecturerId}
- Method:
GET
- Request Body: None
- Response Body:
{ "status": "success", "message": "Lecturer info retrieved successfully.", "data": { "id": 1, "name": "Dr. John Doe", "college": "Computer Science", "numberOfVotes": 100, "rate": { "teachQuality": 4.5, "scoring": 4.0, "morality": 4.7 } } }
- URL:
/lecturers/{lecturerId}/reviews
- Method:
GET
- Request Body:
{ "id": 1 }
- **Response Body
:**
{
"status": "success",
"message": "Reviews retrieved successfully.",
"data": [
{
"id": 1,
"date": "2023-01-01",
"text": "Great teaching style.",
"likes": 20,
"dislikes": 5
}
// More reviews...
]
}
- URL:
/lecturers/{lecturerId}/reviews
- Method:
POST
- Request Body:
{ "id": 1, "text": "The lecture was very insightful." }
- Response Body:
{ "status": "success", "message": "Review added successfully.", "data": { "lecturerId": "lecturer1", "reviewId": "review123", "text": "The lecture was very insightful.", "date": "2023-01-15", "likes": 0, "dislikes": 0 } }
This endpoint allows users to add a review for a lecturer by specifying the lecturer's ID and the text of the review. The response includes the details of the newly added review.