- 地址 GET 或者
/api/index
- 请求类型 application/x-www-form-urlencoded
- 参数
- pageNo: 页码
- tab: 分类,分别是 精华:
good
无人评论:noanswer
热门:hot
最新:newest
- 返回 Result(IPage)
登录
- 地址 POST
/api/login
- 请求类型 application/json
- 参数
- username: 用户名
- password: 密码
- captcha: 图片验证码
- 返回 Result(Map)
{
"code": 200,
"description": "SUCCESS",
"detail": {
"user": {
"id": 1,
"username": "tomoya",
"telegramName": null,
"avatar": "http://localhost:8080/static/upload/avatar/tomoya/avatar.png",
"email": null,
"website": null,
"bio": null,
"inTime": 1548992041000,
"emailNotification": false
},
"token": "208bb4c1-daf1-4a32-b198-7f4db8f6d565"
}
}
- 地址 POST
/api/register
- 请求类型 application/json
- 参数
- username: 用户名
- password: 密码
- email: 邮箱地址
- captcha: 图片验证码
- 返回 Result(Map)
发送手机验证码
- 地址 GET
/api/send_code
- 请求类型 application/x-www-form-urlencoded
- 参数
- mobile: 手机号
- captcha: 图片验证码
- 返回 Result(Map)
{
"code": 200,
"description": "SUCCESS",
"detail": null
}
- 地址 POST
/api/mobile_login
- 请求类型 application/json
- 参数
- mobile: 手机号
- code: 手机验证码
- captcha: 图片验证码
标签
- 地址 POST
/api/tags
- 请求类型 application/x-www-form-urlencoded
- 参数
- 返回 Result(List)
{
"code": 200,
"description": "SUCCESS",
"records": [
{
"id": 1,
"name": "一个标签",
"description": "标签描述,解释一下标签让人能更明白它的意思",
"icon": "http://spring.io/img/homepage/icon-spring-boot.svg",
"topicCount": 1,
"inTime": 1548992281000
}
],
"total": 1,
"size": 20,
"current": 1,
"searchCount": true,
"pages": 1
}
}
- 地址 POST
/api/upload
- 请求类型 application/form-data
- 参数
- 返回 Result(String) // 上传成功后,会返回图片的访问地址