UNPKG

forchange-api

Version:
47 lines 940 B
module.exports = { defaultHost: '', // 获取token token: { pathname: '/api/v1/auth', method: 'post', type: 'form' }, // 获取问题列表 questionList: { pathname: '/api/v1/books/{book_id}/questions', restful: true }, // 获取问题详情 question: { pathname: '/api/v1/books/{book_id}/questions/{id}', restful: true }, // 创建问题 addQuestion: { pathname: '/api/v1/books/{book_id}/questions', method: 'post', restful: true }, // 更新问题 updateQuestion: { pathname: '/api/v1/books/{book_id}/questions/{id}', method: 'put', restful: true }, // 删除问题 deleteQuestion: { pathname: '/api/v1/books/{book_id}/questions/{id}', method: 'delete', restful: true }, // 获取题库分数列表 examScore: { pathname: '/api/v1/books/scores', method: 'post' }, switchStatus: { pathname: '/api/v1/books/{book_id}/questions/{id}/status', method: 'put', restful: true } };