Teenager
Tempat Mengajar dan Berbagi Kecerdasan
Teenager adalah sebuah Learning Management System(LMS) bagi yang mempunyai kekurangan dalam penglihatan dan pendengaran untuk tetap bisa melaksanakan pelajaran seperti orang normal. Anda akan dibantu dengan fitur-fitur yang mempermudah anda dalam menerima pelajaran dan mengerjakan tugas. Anda juga bisa menyampaikan pertanyaan dan melakukan konsultasi terkait kesulitan anda saat mempelajari materi atau mengerjakan tugas anda. Let's try with us.
Explore the docs »
Open our project that has been deployed by clicking here »
Table of Contents
About the Project
Project ini dibuat berdasarkan permasalahan yang ditemukan yaitu pengguna disabilitas kesulitan dalam memanagement pembelajaran yang ada pada LMS lainnya. Dengan adanya project ini, kita berharap dapat mengatasi kesulitan yang dihadapi oleh disabilitas terutama Tuna Netra dan Tuna Rungu dengan fasilitas yang ada pada LMS ini. LMS ini memiliki beberapa fitur, yaitu:
- Mempelajari materi yang diberikan oleh guru melalui fitur course atau mata pelajaran
- Mengerjakan tugas yang diberikan oleh guru melalui fitur assignment atau tugas
- Menyampaikan pertanyaan dan konsultasi terkait kesulitan pembelajaran atau tugas yang diberikan oleh guru melalui fitur diskusi
- Fitur disabilitas yang berupa Screen Reader
Philosophy Logo
Kami menggunakan logo yang menggambar kepala dengan wajah yang ceria dan bentuk buku berwana biru. Coba Lihat Detail filosofi logo kami lewat link di bawah ini.
Built With
Getting Started
- Install Chrome Extension Screen Reader
Click Here >>
- Clone the repo
git clone https://github.com/rg-km/final-project-engineering-12.git
- Go to frontend
cd frontend
- Install dependencies
install npm
- Starting
npm start
- Go to backend
cd ../backend
- Run Go Main
go run main.go
Collaborators
Irfan Kurniawan |
Mohd Ryan Obillah |
Umbu Theofilus Dendimara |
Widdy Arfiansyah |
Muhammad Abid Fajar |
Rudiansyah Wijaya Pratama |
API Specification
All API must use this authentication Request:
- Header:
- X-Api-Key:
"your secret api key"
- X-Api-Key:
SUMMARY:
- Users
(11/11) 100%
- User_course
(5/5) 100%
- Courses
(7/7) 100%
- Module_submissions
(8/8) 100%
- Module_articles
(7/7) 100%
- User_Submissions
(4/4) 100%
- Answers
(6/6) 100%
- Questions
(6/6) 100%
There are a total of 54
APIs
users
Create Users
Request:
- Method:
POST
- Endpoint:
/api/users
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Content-Type:
- Body:
{
"name": "string",
"username": "string",
"email": "string",
"password": "string",
"role": "integer", // enum (1, 2)
"phone": "string",
"gender": "integer", // enum (1, 2)
"type_of_disability": "integer", // enum (0, 1, 2)
"birthdate": "date"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id": "integer", // primary
"name": "string",
"username": "string", // unique
"email": "string", // unique
"password": "string",
"role": "integer", // enum(1, 2)
"phone": "string",
"gender": "integer", // enum (1, 2)
"type_of_disability": "integer", // enum (0, 1, 2)
"birthdate": "string",
"email_verification": "timestamp",
"created_at": "timestamp",
"updated_at": "timestamp"
}
}
Users Login
Request:
- Method:
POST
- Endpoint:
/api/users/login
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Content-Type:
- Body:
{
"email": "string",
"password": "string"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id": "integer", // primary
"name": "string",
"username": "string", // unique
"email": "string", // unique
"role": "integer", // enum(1, 2)
"gender": "integer",
"type_of_disability" : "integer" // enum
}
}
Get User Status
Request:
- Method:
GET
- Endpoint:
/api/userstatus
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id": "integer", // primary
"name": "string",
"username": "string", // unique
"email": "string", // unique
"role": "integer", // enum(1, 2)
"gender": "integer",
"type_of_disability" : "integer", // enum
"address" : "string",
"birthdate" : "string",
"image" : "string",
"description" : "string"
}
}
User Logout
Request:
- Method:
POST
- Endpoint:
/api/users/logout
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
Response:
{
"code" : "number",
"status" : "string"
}
Get Users
Request:
- Method:
GET
- Endpoint:
/api/users/{id}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Variable:
- id:
integer
- id:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id": "integer", // primary
"name": "string",
"username": "string", // unique
"role": "integer", // enum(1, 2)
"phone": "string",
"gender": "integer", // enum (1, 2)
"type_of_disability": "integer", // enum (0, 1, 2)
"address": "string",
"birthdate": "string",
"image": "string",
"description": "string"
}
}
Update Users
Request:
- Method:
PUT
- Endpoint:
/api/users/{id}
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Variable:
- id:
integer
- id:
- Body:
{
"name": "string",
"username": "string", // unique
"role": "integer", // enum (1, 2)
"phone": "string",
"gender": "integer", // enum (1, 2)
"type_of_disability": "integer", // enum (0, 1, 2)
"address": "string",
"birthdate": "string",
"image": "string",
"description": "string"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id": "integer", // primary
"name": "string",
"username": "string", // unique
"role": "integer", // enum(1, 2)
"phone": "string",
"gender": "string", // enum (1, 2)
"type_of_disability": "integer", // enum(0, 1, 2)
"address": "string",
"birthdate": "string",
"image": "string",
"description": "string"
}
}
Update Users Role
Request:
- Method:
PUT
- Endpoint:
/api/users/roleupdate/{id}
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Variable:
- id:
integer
- id:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"name" : "string",
"username" : "string", // unique
"role" : "integer", // enum(1,2)
"phone" : "string",
"gender" : "integer", // enum(1,2)
"type_of_disability": "integer", // enum(0,1,2)
"address": "string",
"birthdate": "string",
"image": "string",
"description": "string"
}
}
List Users
Request:
- Method:
GET
- Endpoint:
/api/users
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- size :
number
- page :
number
- size :
Response:
{
"code" : "number",
"status" : "string",
"data" : [
{
"id": "integer", // primary
"name": "string",
"username": "string", // unique
"role": "integer", // enum(1, 2)
"phone": "string",
"gender": "integer", // enum(1, 2)
"type_of_disability": "integer", // enum(0, 1, 2)
"address": "string",
"birthdate": "string",
"image": "string",
"description": "string"
},
]
}
Delete Users
Request:
- Method:
DELETE
- Endpoint:
/api/users/{id}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Variable:
- id:
integer
- id:
Response:
{
"code" : "number",
"status" : "string"
}
List User Submission
Request:
- Method:
GET
- Endpoint:
/api/users/submissions
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- limit :
number
optional
default = all list
- limit :
Response:
{
"id_module_submission": "integer",
"name_course": "string",
"name_module_submission": "string",
"grade": "integer",
"file": "string"
}
Verify Email User
Request:
- Method:
GET
- Endpoint:
/api/users/verify?email=&signature=
- Header:
- Accept:
application/json
- Accept:
- Query Param:
- signature :
string
required
- email :
string
required
- signature :
Response:
{
"code" : "number",
"status" : "string",
"data" : null
}
User course
Create User_course
Request:
- Method:
POST
- Endpoint:
/api/usercourse
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"user_id" : "integer", // foreign key1
"course_id" : "integer" // foreign key2
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"user_id" : "integer", // foreign key1
"course_id" : "integer" // foreign key2
}
}
Get User_course
Request:
- Method:
GET
- Endpoint:
/api/usercourse/{id}/{course}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"user_id" : "integer", // foreign key1
"course_id" : "integer" // foreign key2
}
}
List User_course
Request:
- Method:
GET
- Endpoint:
/api/usercourse
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- size :
number
- page :
number
- size :
Response:
{
"code" : "number",
"status" : "string",
"data" : [
{
"user_id" : "integer", // foreign key1
"course_id" : "integer" // foreign key2
},
]
}
Delete User_course
Request:
- Method:
DELETE
- Endpoint:
/api/usercourse/{user_id}/{course_id}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string"
}
Find All Course By User Logged In
Request:
- Method:
GET
- Endpoint:
/api/usercourse/courses
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id_course": "integer", // Primary Key
"course_name": "string",
"course_code": "string",
"course_class": "string"
}
}
Courses
Create Courses
Request:
- Method:
POST
- Endpoint:
/api/courses
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"name" : "string",
"code_course" : "string", // unique
"class" : "string",
"tools" : "string", // longtext
"about" : "string", // longtext
"description" : "string" // longtext
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"name" : "string",
"code_course" : "string", // unique
"class" : "string",
"tools" : "string", // longtext
"about" : "string", // longtext
"is_active" : "boolean",
"description" : "string", // longtext
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
}
}
Get All courses
Request:
- Method:
GET
- Endpoint:
/api/courses
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- size :
number
- page :
number
- size :
Response:
{
"code" : "number",
"status" : "string",
"data" : [
{
"id" : "integer", // primary key
"name" : "string",
"code_course" : "string", // unique
"class" : "string",
"tools" : "string", // longtext
"about" : "string", // longtext
"is_active" : "boolean",
"description" : "string", // longtext
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
},
]
}
Get Courses
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"name" : "string",
"code_course" : "string", // unique
"class" : "string",
"tools" : "string", // longtext
"about" : "string", // longtext
"description" : "string", // longtext
"is_active" : "boolean",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
}
}
Update Courses
Request:
- Method:
PATCH
- Endpoint:
/api/courses/{code}
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"name" : "string",
"class" : "string",
"tools" : "string", // longtext
"about" : "string", // longtext
"description" : "string" // longtext
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"name" : "string",
"code_course" : "string", // unique
"class" : "string",
"tools" : "string", // longtext
"about" : "string", // longtext
"description" : "string", // longtext
"is_active" : "boolean",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
}
}
List Courses
Request:
- Method:
GET
- Endpoint:
/api/courses?status=true&limit=1
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- status :
boolean
optional
default = true
- limit :
number
optional
default = all list
- status :
Response:
{
"code" : "number",
"status" : "string",
"data" : [
{
"id" : "integer", // primary key
"name" : "string",
"code_course" : "string", // unique
"class" : "string",
"tools" : "string", // longtext
"about" : "string", // longtext
"description" : "string", // longtext
"is_active" : "boolean",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
},
]
}
Delete Courses
Request:
- Method:
DELETE
- Endpoint:
/api/courses/{code}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- code :
string
- code :
Response:
{
"code" : "number",
"status" : "string",
"data" : null
}
Deactivate Courses
Request:
- Method:
PATCH
- Endpoint:
/api/courses/{code}/status
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- code :
string
- code :
- Body:
{
"is_active" : "boolean",
}
Response:
{
"code" : "number",
"status" : "string",
"data" : null
}
List Users In Course Detail
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}/users
- Query Param:
- code :
string
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id_user": "integer", // primary key
"user_name": "string",
"user_username": "string",
"user_email": "string"
}
}
Module submissions
Create Module_submissions
Request:
- Method:
POST
- Endpoint:
/api/courses/{code}/submissions
- Query Param:
- code :
string
- code :
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"name": "string",
"description": "string",
"deadline": "string"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"course_id": "integer", // foreign key
"name": "string",
"description": "string",
"deadline": "string"
}
}
Get Module_submissions
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}/submissions/{submissionId}
- Query Param:
- code :
string
- submissionId :
number
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"course_id": "integer", // foreign key
"name": "string",
"description": "string",
"deadline": "string"
}
}
Update Module_submissions
Request:
- Method:
PATCH
- Endpoint:
/api/courses/{code}/submissions/{submissionId}
- Query Param:
- code :
string
- submissionId :
number
- code :
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"name": "string",
"description": "string",
"deadline": "string"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"course_id": "integer", // foreign key
"name": "string",
"description": "string",
"deadline": "string"
}
}
List Module_submissions
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}/submissions
- Query Param:
- code :
string
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data" : [
{
"id" : "integer", // primary key
"course_id": "integer", // foreign key
"name": "string",
"description": "string",
"deadline": "string"
},
]
}
Delete Module_submissions
Request:
- Method:
DELETE
- Endpoint:
/api/courses/{code}/submissions/{submissionId}
- Query Param:
- code :
string
- submissionId :
number
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string"
"data": null
}
Next Module_submissions
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}/submissions/{submissionId}/next
- Query Param:
- code :
string
- submissionId :
number
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data": {
"id": "integer", // primary key
"code_course": "string",
}
}
Previous Module_submissions
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}/submissions/{submissionId}/previous
- Query Param:
- code :
string
- submissionId :
number
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data": {
"id": "integer", // primary key
"code_course": "string",
}
}
List User Module_submissions In Teacher
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}/submissions/{submissionId}/get
- Query Param:
- code :
string
- submissionId :
number
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data": {
"id_user_submission": "integer", // primary key
"user_name": "string",
"module_submission_name": "string",
"file": "string"
}
}
Module articles
Create Module_articles
Request:
- Method:
POST
- Endpoint:
/api/courses/{code}/articles
- Query Param:
- code :
string
- code :
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"name": "string",
"content": "string",
"estimate": "integer"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id": "integer", // primary key
"course_id": "integer", // foreign key
"name": "string",
"content": "string",
"estimate": "integer"
}
}
Get Module_articles
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}/articles/{articleId}
- Query Param:
- code :
string
- articleId :
number
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id": "integer", // primary key
"course_id": "integer", // foreign key
"name": "string",
"content": "string",
"estimate": "integer"
}
}
Update Module_articles
Request:
- Method:
PATCH
- Endpoint:
/api/courses/{code}/articles/{articleId}
- Query Param:
- code :
string
- articleId :
number
- code :
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"name": "string",
"content": "string",
"estimate": "integer"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"course_id": "integer", // foreign key
"name": "string",
"content": "string",
"estimate": "integer"
}
}
List Module_articles
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}/articles
- Query Param:
- code :
string
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data" : [
{
"id" : "integer", // primary key
"course_id": "integer", // foreign key
"name": "string",
"content": "string",
"estimate": "integer"
},
]
}
Delete Module_articles
Request:
- Method:
DELETE
- Endpoint:
/api/courses/{code}/articles/{articleId}
- Query Param:
- code :
string
- articleId :
number
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data": null
}
Next Module_articles
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}/articles/{articleId}/next
- Query Param:
- code :
string
- articleId :
number
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data": {
"id": "integer", // primary key
"code_course": "string",
}
}
Previous Module_articles
Request:
- Method:
GET
- Endpoint:
/api/courses/{code}/articles/{articleId}/previous
- Query Param:
- code :
string
- articleId :
number
- code :
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data": {
"id": "integer", // primary key
"code_course": "string",
}
}
User Submissions
Submit File
Request:
- Method:
POST
- Endpoint:
/api/courses/:code/submissions/:submissionId/user-submit
- Query Param:
- code :
string
- submissionId :
number
- code :
- Header:
- Content-Type:
multipart/form-data
- Authorization:
Token
- Content-Type:
- Body:
{
"file" : "string",
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"user_id" : "integer", // foreign key1
"module_submission_id" : "integer", //foreign key2
"file" : "string"
}
}
Update Grade
Request:
- Method:
PATCH
- Endpoint:
/api/courses/:code/submissions/:submissionId/user-submit/:userSubmissionId
- Query Param:
- code :
string
- submissionId :
number
- userSubmissionId :
number
- code :
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"grade" : "integer",
}
Response:
{
"code" : "number",
"status" : "string",
"data" : null
}
Get User Submission
Request:
- Method:
GET
- Endpoint:
/api/courses/:code/submissions/:submissionId/user-submit/:userSubmissionId
- Query Param:
- code :
string
- submissionId :
number
- userSubmissionId :
number
- code :
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"user_id" : "integer", // foreign key1
"module_submission_id" : "integer", //foreign key2
"file" : "string",
"grade" : "integer"
}
}
Download User Submission
Request:
- Method:
POST
- Endpoint:
/api/courses/:code/submissions/:submissionId/user-submit/:userSubmissionId/download
- Query Param:
- code :
string
- submissionId :
number
- userSubmissionId :
number
- code :
- Header:
- Content-Type:
{mimetype}
- Content-Disposition:
{attachment; filename=file}
- Authorization:
Token
- Content-Type:
Answers
Create Answers
Request:
- Method:
POST
- Endpoint:
/api/answers/create
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"question_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"description" : "string"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"question_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"description" : "string",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
}
}
Get Answers
Request:
- Method:
GET
- Endpoint:
/api/answers/by-user/{userId}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"question_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"description" : "string",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
}
}
Update Answers
Request:
- Method:
PUT
- Endpoint:
/api/answers/update/{answerId}
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"question_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"description" : "string"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"question_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"description" : "string",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
}
}
List Answers
Request:
- Method:
GET
- Endpoint:
/api/answers/all
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- size :
number
- page :
number
- size :
Response:
{
"code" : "number",
"status" : "string",
"data" : [
{
"id" : "integer", // primary key
"question_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"description" : "string",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
},
]
}
Delete Answers
Request:
- Method:
DELETE
- Endpoint:
/api/answers/{answerId}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string"
}
Get Answers By Question Id
Request:
- Method:
GET
- Endpoint:
/api/answers/{questionId}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- questionId :
number
- questionId :
Response:
{
"code" : "number",
"status" : "string",
"data" : [
{
"id" : "integer", // primary key
"question_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"description" : "string",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
},
]
}
Questions
Create Questions
Request:
- Method:
POST
- Endpoint:
/api/questions/create
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"module_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"title" : "string",
"tags" : "string",
"description" : "string"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"module_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"title" : "string",
"tags" : "string",
"description" : "string",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
}
}
Get Questions
Request:
- Method:
GET
- Endpoint:
/api/questions/by-user/{userId}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"course_id" : "integer", // foreign key1
"course_name" : "string",
"user_id" : "integer", // foreign key2
"user_name" : "string",
"title" : "string",
"tags" : "string",
"description" : "string",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
}
}
Update Questions
Request:
- Method:
PUT
- Endpoint:
/api/questions/update/{questionId}
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Authorization:
Token
- Content-Type:
- Body:
{
"module_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"title" : "string",
"tags" : "string",
"description" : "string"
}
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"module_id" : "integer", // foreign key1
"user_id" : "integer", // foreign key2
"title" : "string",
"tags" : "string",
"description" : "string",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
}
}
List Questions
Request:
- Method:
GET
- Endpoint:
/api/questions/all
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- size :
number
- page :
number
- size :
Response:
{
"code" : "number",
"status" : "string",
"data" : [
{
"id" : "integer", // primary key
"course_id" : "integer", // foreign key1
"course_name" : "string",
"user_id" : "integer", // foreign key2
"user_name" : "string",
"title" : "string",
"tags" : "string",
"description" : "string",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
},
]
}
Delete Questions
Request:
- Method:
DELETE
- Endpoint:
/api/questions/{questionId}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
Response:
{
"code" : "number",
"status" : "string"
}
Get Question By Id
Request:
- Method:
GET
- Endpoint:
/api/questions/{id}
- Header:
- Accept:
application/json
- Authorization:
Token
- Accept:
- Query Param:
- id :
number
- id :
Response:
{
"code" : "number",
"status" : "string",
"data" : {
"id" : "integer", // primary key
"course_id" : "integer", // foreign key1
"course_name" : "string",
"user_id" : "integer", // foreign key2
"user_name" : "string",
"title" : "string",
"tags" : "string",
"description" : "string",
"created_at" : "timestamp", // timestamp
"updated_at" : "timestamp" // timestamp
},
}