Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API 列表 #9

Open
manyuanrong opened this issue Jun 16, 2019 · 0 comments
Open

API 列表 #9

manyuanrong opened this issue Jun 16, 2019 · 0 comments
Assignees
Labels
API API需求

Comments

@manyuanrong
Copy link
Member

manyuanrong commented Jun 16, 2019

登录 GET /user/login

直接跳转该路径,授权GitHub登录,成功跳转用户信息页

退出登录 GET /user/logout

直接跳转该路径,退出登录,成功跳转到首页

登录用户信息 GET /user/me

查询当前登录用户信息

查询用户信息 GET /user/info/:userId

查询userId的用户信息

发表主题接口 POST /topic/add

发布新的topic。参数:

参数名 说明
title 标题
content 内容,Markdown
tags 逗号分隔的标签(可选)

主题列表 GET /topic/:type

参数 默认值 说明
type null 路径参数
page 1 当前页
size 10 分页大小

type 取值

说明
all 所有主题
new 最新主题
good 精华主题
hot 热门主题
cold 冷门主题(0回复)
其他 其他值视作tag标签进行筛选

主题详情 GET /topic/detail/:id

查询id主题的详情信息,包含 author 用户信息 last_reply 最新回复信息

回复列表接口 GET /reply/list/:topicId

查询topicId主题的回复列表

发表回复接口 POST /reply/add

发布新的评论。参数:

参数名 说明
topic_id 主题ID
content 评论内容,Markdown
reply_to 回复指定的评论(可选)
@manyuanrong manyuanrong added the API API需求 label Jun 16, 2019
@manyuanrong manyuanrong self-assigned this Jun 16, 2019
@manyuanrong manyuanrong pinned this issue Jun 16, 2019
@deno-china deno-china locked as off-topic and limited conversation to collaborators Jun 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API API需求
Projects
None yet
Development

No branches or pull requests

1 participant