首页 > Windows开发 > 详细

学生端API——徐若曦

时间:2019-05-15 16:03:09      阅读:179      评论:0      收藏:0      [点我收藏+]
学生中心首页
用户登录
/api/student/log_in POST

Request

{

"name": 1612941,

"password_hash": awgyu223

}

 

Response

{

"state_code":0, // 0-成功,-1-用户名不存在,1-密码不正确

"id": 139179

}

用户查看个人信息
/api/student/personal_information GET

Request

{

"id_user": 1612841

}

 

Response

{

"name": "xrx",

"student_number": 1612941,

"rank_score": 238,

"email": 1612941@mail.nankai.edu.cn

}

课程界面
用户查看课程列表
/api/student/course GET

Request

{

"id_user": 1612941

}

 

Response

[{

courses: [{

"name": "数据结构",

"start_time": ”2019-4-1 14:00:00”,

"end_time": ”2019-4-2 14:00:00”,

"description":"数据结构课"

}]

}]

用户查看某个课程的实验课列表
/api/student/lab_course_list GET

Request

{

"id_course": 123

}

 

Response

{

lab: [{

"name":123,

"start_time": ”2019-4-1 14:00:00”,

"end_time": ”2019-4-2 14:00:00”,

}]

}

用户查看某个课程的主讲课列表
/api/student/lecture_course GET

Request

{

"id_course": 123

}

 

Response

{

lecture: [{

"name":二叉树,

"start_time": ”2019-4-1 14:00:00”,

"end_time": ”2019-4-2 14:00:00”,

}]

}

用户查看实验课详情
/api/student/lab_course_detail GET

Request

{

"id_lab": 123

}

 

Response

{

"name": "二叉树",

"description": "实现搜索二叉树",

"start_time": ”2019-4-1 14:00:00”,

"end_time": ”2019-4-1 14:00:00”,

"report_required":true,

"problem_weight": 0.2,

"attachment_weight": 0.8,

[{

"id_problem": 123,

"name": "搜索二叉树",

"score":100/100

}] // 实验课问题

}

 

用户提交实验报告
/api/student/lab_attachment_hand_in POST

Request

{

"id_user":123,

"id_lab":123,

"file"//本地路径地址

}

 

{

state_code // 0-成功,-1-上传失败

}

用户查看主讲课详情
/api/student/lecture_course_detail GET

Request

{

"id_lecture": 123

}

 

Response

{

"name": "数据结构",

"description": "数据结构课程",

"start_time": ”2019-4-1 14:00:00”,

"end_time": ”2020-4-1 14:00:00”,

[{

"name": "PPT1",

"path": "https://www.yuque.com/docs/share/e2db0e32-8463-4eac-b532-04bc6709eaa5",

"size": 23MB

}] // 课程资源

[{

"id_problem": 123,

"name": "Traveller",

"score":100/100

}] // 主讲课问题

}

用户下载资源
/api/student/download_resource GET

Request

{

"id_course_resource"

}

 

Response

[{

"name": "课件"

"path": "https://www.yuque.com/docs/share/e2db0e32-8463-4eac-b532-04bc6709eaa5"

}]

个人中心界面
用户修改个人信息
/api/student/modify_personal_information POST

Request

{

"id_user": 1612841,

information: {

"name": "xrx",

"email": 1612941@mail.nankai.edu.cn,

"password": 123456

}

}

 

Response

{

state_code: 0/-1

}

用户查看课程消息
/api/student/course_message GET

Request

{

"id_course": 123

}

 

Response

[{

"message": []

}]

用户查看提交记录
/api/student/problem_history_submission GET

Request

{

"id_student": 1612941

}

 

Response

[{

problem: [{

"created_at": 2019-4-1 14:00:00

"runtime": 300ms,

"memory": 648KB,

"score": 20/100,

"language": C++,

"code":"#include<iostream>\r\nint main(){cout<<123;\r\nreturn 0;}"

}]

}]

考试界面
用户查看考试详情
/api/student/test_detail GET

Request

{

"id": id // 考试id

}

 

Response

[{

“name”:“2019-2020年第2学期 算法导论考试”,

       “start_time”:”2019-4-1 14:00:00”

       “end_time”:”2019-4-1 15:00:00”

       “description”:”请同学们不要作弊,祝考试顺利”

       “created_at”:“2019-3-31 14:00:00”

       “modified_at”:”2019-4-1 9:00:00”

exam_problem:[

              {

                     “id_problem”:1,

                     “name”:”滔滔摘苹果”

                     “type”:”A”,

                     “weight”:0.3,

                     “case_number”:10

}

]

}]

题目界面
用户查看题目详情
/api/student/problem_detail GET

Request

{

"problem_id": id, // 题目id

}

 

Response

{

“name”:“Traveler",

      “start_time”:”2019-4-1 14:00:00”,

      “end_time”:”2019-4-1 15:00:00”,

“description”:”旅行者问题”,

"runtime_limit": 1000ms,

"memory_limit": 64000KB

}

用户提交题目
/api/student/problem_hand_in POST

Request

{

"user_id": 1,

"problem_id": 2,

"code": "#include<iostream>\r\nint main(){cout<<123;\r\nreturn 0;}"

}

 

{

"runtime": 300ms,

"memory": 648KB

}

用户查看某一道题目的提交记录
/api/student/problem_hand_in GET

Request

{

"user_id": 1,

"problem_id": 2

}

{

"created_at": 2019-4-1 14:00:00

"runtime": 300ms,

"memory": 648KB,

"score": 20/100,

"language": C++,

"code":"#include<iostream>\r\nint main(){cout<<123;\r\nreturn 0;}"

}

学生端API——徐若曦

原文:https://www.cnblogs.com/cs-sunday/p/10869128.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!