## Api请求说明: - 请求支持GET,POST #### 请求格式 : http://hostname/mapi_v2/service/method #### Example : http://trymob.edusoho.cn/mapi_v2/Category/getAllCategories #### 备注: * hostname 域名 * service 服务接口名 * method 接口方法 * 没有标注的方法,参数都是可选 ## Api服务列表 * [Category](#category) * [Course](#course) * [Lesson](#lesson) * [User](#user) * [School](#school) * [Testpaper](#testpaper) ### Category 接口方法列表 * getCategories *获取指定分类* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | category | String | 父级分类名称 | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getAllCategories *获取所有分类* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getTags *获取所有标签* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| --- * 返回值 | 返回值 | 描述| |:------------- |:---------------| | json | 最大返回100条| --- ### Course 接口方法列表 * getCourseNotices *获取课程公告* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id(必选) | | start | int | 起始索引 | | limit | int | limit | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getLessonNote *获取课时笔记* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id(必选) | | lessonId | int | 课时id(必选) | | limit | int | limit | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getCourseMember *获取课程会员信息* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id(必选) | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * postThread *发表评论/问答* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id(必选) | | threadId | int | 评论/问答id(必选) | | content | String | 评论内容(必选) | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * commitCourse *评价课程* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id(必选) | | rating | int | 评论星数(必选) | | postId | int | 回复id(必选) | | content | String | 评论内容(必选) | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getCourseThreads *获取课程问答/讨论* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | lessonId | int | 课时id(必选) id为0默认获取所有课程问答/讨论 | | type | String | 默认question(question,thread) | | start | int | 起始索引| | limit | int | limit | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getCourseNotes *获取课程笔记* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id(必选) | | start | int | 起始索引| | limit | int | limit | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getThreadPost *获取讨论/问答回复* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id(必选) | | threadId | int | 讨论/问答id| | start | int | 起始索引 | | limit | int | limit | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getThread *获取指定问答/讨论* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id(必选) | | threadId | int | 讨论/问答id| --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getFavoriteCoruse *获取收藏课程* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | start | int | 起始索引 | | limit | int | limit| --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getReviews *获取收藏课程* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id | | start | int | 起始索引 | | limit | int | limit| --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * favoriteCourse *收藏课程* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | bool | | --- * unFavoriteCourse *取消收藏课程* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getTeacherCourses *获取教师课程* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | userId | int | 教师用户id | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * vipLearn *vip学习课程* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | bool | | --- * unLearnCourse *退出学习* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id | | reason | String | 退出学习原因 | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | bool | | --- * getCourse *获取指定课程信息* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * searchCourse *搜索课程* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | search | String | 搜索内容 | | tagId | int | 标签id | | type | String | 课程类型(normal, live) | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getLearnedCourse *获取用户已学过课程* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | start | int | 起始索引 | | limit | int | limit | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getLearningCourse *获取用户在学课程* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | type | String | 课程类型(normal, live) | | start | int | 起始索引 | | limit | int | limit | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getLearnStatus *获取学习状态* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getAllLiveCourses *获取所有直播课程* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | start | int | 起始索引 | | limit | int | limit | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- ### Lesson 接口方法列表 * getLessonMaterial *获取课时资料* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | lessonId | int | 课时id | | start | int | 起始索引 | | limit | int | limit | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * downMaterial *获取课时资料下载地址* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id | | materialId | int | 课时资料id | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | Response(二进制文件) | | --- * learnLesson *完成学习课时* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id | | lessonId | int | 课时id | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getLessonStatus *获取课时学习状态* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id | | lessonId | int | 课时id | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getLearnStatus *获取指定课程所有课时的学习状态* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * unLearnLesson *取消学习课时* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | --- * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id | | lessonId | int | 课时id | --- * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getCourseLessons *获取课程所有课时列表* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id | * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getLesson *获取指定课时信息* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | courseId | int | 课程id | | lessonId | int | 课时id | * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getTestpaperInfo *获取考试课时信息* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | testId | int | 课程id | * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- ### User 接口方法列表 * getUserCoin *获取用户虚拟币* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getMessageList *获取和指定用户私信列表* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | conversationId | int | 私信id | | start | int | 起始索引 | | limit | int | limit | * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getUserMessages *获取用户最近私信列表* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | start | int | 起始索引 | | limit | int | limit | * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getUserLastlearning *获取用户最近学习的课程* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getUserNotification *获取用户通知* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | start | int | 起始索引 | | limit | int | limit | * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getUserInfo *获取用户详细信息* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | userId | int | 用户id | * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * logout *用户退出* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | userId | int | 用户id | * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | bool | | --- * regist *注册用户* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | email | String | 用户邮箱 | | nickname | String | 用户昵称 | | password | String | 用户密码 | * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * loginWithToken *使用二维码登录* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | version | int | 客户端版本号,默认1 | | token | String | 用户登录token,验证请求权限 | * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * login *登录用户* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | _username | String | 昵称 | | _password | String | 用户密码 | * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * follow *关注用户* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | toId | int | 关注者id | * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * unfollow *取消关注用户* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | toId | int | 关注者id | * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- ### School 接口方法列表 * loginSchoolWithSite *从域名登录网校* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | version | int | 客户端版本号,默认1 | * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getSchoolInfo *获取网校信息* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | html | | --- * getWeekRecommendCourses *获取每周精选课程* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getRecommendCourses *获取推荐课程* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getLatestCourses *获取最新课程* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getSchoolBanner *获取网校banner* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- ### Testpaper 接口方法列表 * reDoTestpaper *重做试卷* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | testId | int | 考试id | | targetType | String | 现在只有一个值 course | | targetId | String | 课程id | * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * myTestpaper *获取用户考试列表* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | start | int | 起始索引 | | limit | int | limit | * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * finishTestpaper *提交试卷* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | id | int | 试卷id | | data | String | 试卷答案 | * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * showTestpaper *显示试卷* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | testId | int | 试卷id | | targetType | String | 现在仅支持course | | targetId | String | 课程id | * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | --- * getTestpaperResult *获取试卷答案结果* * 请求头 | 请求头 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | token | String | 用户登录token,验证请求权限 | * 参数 | 参数 | 类型 | 描述 | |:------------- |:---------------:| :-------------| | id | int | 试卷结果id | | targetType | String | 现在仅支持course | | targetId | String | 课程id | * 返回值 | 返回值 | 类型| |:------------- |:---------------:| | json | | ---