API - Discord Classroom
ClassroomBotAPI (0.0.1)
Download OpenAPI specification:Download
Gets an assignment from the database
Gets the assignment associated with 'channel_id' from the database
- channel_id: the assignment's Discord channel ID
query Parameters
channel_id required | integer (Channel Id) |
Responses
Response samples
- 200
- 422
{- "id": 0,
- "channelId": 0,
- "points": 0,
- "startDate": "string",
- "dueDate": "string",
- "classroomId": 0,
- "title": "string"
}
Create a new assignment in the database
Creates a new assignment in the database from an Assignment object
- assignment: an Assignment object
Request Body schema: application/json
id | integer (Id) |
channelId required | integer (Channelid) |
points required | integer (Points) |
startDate required | string (Startdate) |
dueDate required | string (Duedate) |
classroomId required | integer (Classroomid) |
title required | string (Title) |
Responses
Request samples
- Payload
{- "id": 0,
- "channelId": 0,
- "points": 0,
- "startDate": "string",
- "dueDate": "string",
- "classroomId": 0,
- "title": "string"
}
Response samples
- 200
- 422
null
Updates assignment in the database
Updates the assignment associated with 'channel_id' in the database using information in 'dictionary'
- dictionary: the assignment information to be updated in dictionary format
- channel_id: the assignment's Discord channel ID
query Parameters
channel_id required | integer (Channel Id) |
Request Body schema: application/json
Responses
Request samples
- Payload
{ }
Response samples
- 200
- 422
null
Creates a new classroom in the database
Creates a new classroom in the database from a Classroom object
- classroom: a Classroom object
Request Body schema: application/json
id | integer (Id) |
attendance required | integer (Attendance) |
serverId required | integer (Serverid) |
serverName required | string (Servername) |
Responses
Request samples
- Payload
{- "id": 0,
- "attendance": 0,
- "serverId": 0,
- "serverName": "string"
}
Response samples
- 200
- 422
null
Gets a specific classroom from the database
Gets the classroom associated with 'server_id' from the database
- server_id: the classroom's Discord server ID
path Parameters
server_id required | integer (Server Id) |
Responses
Response samples
- 200
- 422
{- "id": 0,
- "attendance": 0,
- "serverId": 0,
- "serverName": "string"
}
Gets the attendance information of a specific classroom from the database
Gets the attendance information of the classroom associated with 'server_id' from the database
- server_id: the classroom's Discord server ID
path Parameters
server_id required | integer (Server Id) |
Responses
Response samples
- 200
- 422
null
Gets the ID of a specific classroom from the database
Gets the database ID of the classroom associated with 'server_id' from the database
- server_id: the classroom's Discord server ID
path Parameters
server_id required | integer (Server Id) |
Responses
Response samples
- 200
- 422
null
Creates a new classroom user in the database
Creates a new classroom user from a Classroom_User object in the database
- classroom_user: a Classroom_User object
Request Body schema: application/json
classroomId required | integer (Classroomid) |
role required | string (Role) |
userId required | integer (Userid) |
attendance | integer (Attendance) |
Responses
Request samples
- Payload
{- "classroomId": 0,
- "role": "string",
- "userId": 0,
- "attendance": 0
}
Response samples
- 200
- 422
null
Gets a list of students of a specific classroom from the database
Gets a list of students in the classroom associated with 'classroom_id' from the database
- classroom_id: the classroom's database ID
path Parameters
classroom_id required | integer (Classroom Id) |
Responses
Response samples
- 200
- 422
[- {
- "classroomId": 0,
- "role": "string",
- "userId": 0,
- "attendance": 0
}
]
Gets a list of educators of a specific classroom from the database
Gets a list of educators in the classroom associated with 'classroom_id' from the database
- classroom_id: the classroom's database ID
path Parameters
classroom_id required | integer (Classroom Id) |
Responses
Response samples
- 200
- 422
[- {
- "classroomId": 0,
- "role": "string",
- "userId": 0,
- "attendance": 0
}
]
Gets the attendance information of a specific student from the database
Gets the attendance information of the user associated with 'user_id' in the classroom associated with 'classroom_id' from the database
- user_id: the user's database ID
- classroom_id: the classroom's database ID
path Parameters
user_id required | integer (User Id) |
classroom_id required | integer (Classroom Id) |
Responses
Response samples
- 200
- 422
null
Updates the attendance information of a specifc student in the database
Updates the attendance of the user associated with 'user_id' in the classroom associated with 'classroom_id' in the database
- user_id: the user's database ID
- classroom_id: the classroom's database ID
path Parameters
user_id required | integer (User Id) |
classroom_id required | integer (Classroom Id) |
Responses
Response samples
- 200
- 422
null
Updates the username of a specific user in the database
Updates the username of the user associated with 'discord_id' to 'new_name' in the database
- new_name: the user's new username
- discord_id: the user's discord ID
query Parameters
new_name required | string (New Name) |
discord_id required | integer (Discord Id) |
Responses
Response samples
- 200
- 422
null
Creates a new discussion board in the database
Creates a new discussion board in the database from a Discussion object
- discussion: a Discussion object
Request Body schema: application/json
id | integer (Id) |
classroomId required | integer (Classroomid) |
channelId required | integer (Channelid) |
title required | string (Title) |
points required | integer (Points) |
startDate required | string (Startdate) |
dueDate required | string (Duedate) |
Responses
Request samples
- Payload
{- "id": 0,
- "classroomId": 0,
- "channelId": 0,
- "title": "string",
- "points": 0,
- "startDate": "string",
- "dueDate": "string"
}
Response samples
- 200
- 422
null
Creates a new grade in the database
Creates a new grade in the database from a Grade object
- grade: a Grade object
Request Body schema: application/json
taskType required | string (Tasktype) |
graderId required | integer (Graderid) |
taskId required | integer (Taskid) |
studentId required | integer (Studentid) |
score required | integer (Score) |
Responses
Request samples
- Payload
{- "taskType": "string",
- "graderId": 0,
- "taskId": 0,
- "studentId": 0,
- "score": 0
}
Response samples
- 200
- 422
null
Gets a list of all grades of a specific student from the database
Gets a list of all grades for the student associated with 'student_id'
- student_id: the student's database ID
path Parameters
student_id required | any (Student Id) |
Responses
Response samples
- 200
- 422
[- {
- "taskType": "string",
- "graderId": 0,
- "taskId": 0,
- "studentId": 0,
- "score": 0
}
]
Updates a grade in the database
Updates a grade in the database using a Grade object
- grade: a Grade object
Request Body schema: application/json
taskType required | string (Tasktype) |
graderId required | integer (Graderid) |
taskId required | integer (Taskid) |
studentId required | integer (Studentid) |
score required | integer (Score) |
Responses
Request samples
- Payload
{- "taskType": "string",
- "graderId": 0,
- "taskId": 0,
- "studentId": 0,
- "score": 0
}
Response samples
- 200
- 422
null
Updates a quiz in the database
Updates the quiz associated with 'channel_id' in the database using information in 'dictionary'
- dictionary: the quiz information to be updated in dictionary format
- channel_id: the quiz's Discord channel ID
query Parameters
channel_id required | integer (Channel Id) |
Request Body schema: application/json
Responses
Request samples
- Payload
{ }
Response samples
- 200
- 422
null
Creates a new quiz in the database
Creates a new quiz in the database from a Quiz object
- quiz: a Quiz object
Request Body schema: application/json
id | integer (Id) |
questions required | string (Questions) |
channelId required | integer (Channelid) |
title required | string (Title) |
points required | number (Points) |
startDate required | string (Startdate) |
dueDate required | string (Duedate) |
timeLimit required | integer (Timelimit) |
classroomId required | integer (Classroomid) |
Responses
Request samples
- Payload
{- "id": 0,
- "questions": "string",
- "channelId": 0,
- "title": "string",
- "points": 0,
- "startDate": "string",
- "dueDate": "string",
- "timeLimit": 0,
- "classroomId": 0
}
Response samples
- 200
- 422
null
Gets the URL containing the questions of a specific quiz from the database
Gets a URL that links to questions of the quiz associated with 'quiz_id' in JSON format
- quiz_id: the quiz's database ID
path Parameters
quiz_id required | integer (Quiz Id) |
Responses
Response samples
- 200
- 422
null
Creates URL containing questions for a quiz
Creates a URL that links to quiz questions in JSON format
- questions: a list of Question objects
Request Body schema: application/json
question required | string (Question) |
answer required | string (Answer) |
wrong required | Array of strings (Wrong) |
points required | number (Points) |
Responses
Request samples
- Payload
[- {
- "question": "string",
- "answer": "string",
- "wrong": [
- "string"
], - "points": 0
}
]
Response samples
- 200
- 422
null
Updates a token in the database
Updates a token in the database from a Token object
- user: a Token object
Request Body schema: application/json
userId required | integer (Userid) |
unique_id required | string (Unique Id) |
Responses
Request samples
- Payload
{- "userId": 0,
- "unique_id": "string"
}
Response samples
- 200
- 422
null
Creates a new user in the database
Creates a new user in the database from a User object
- user: a User object
Request Body schema: application/json
id | integer (Id) |
name required | string (Name) |
discordId required | integer (Discordid) |
Responses
Request samples
- Payload
{- "id": 0,
- "name": "string",
- "discordId": 0
}
Response samples
- 200
- 422
null
Updates the username of a specific user in the database
Updates the username associated with 'discord_id' to 'name' in the database
- discord_id: the user's discord ID
- name: the user's new username
path Parameters
discord_id required | integer (Discord Id) |
query Parameters
name required | string (Name) |
Responses
Response samples
- 200
- 422
null