-
Notifications
You must be signed in to change notification settings - Fork 62
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
[Feature Request]: 目录 #230
Labels
Comments
增加、删除和修改条目看起来OK,用户的目录 GET看起来也ok,其他的不太确定... |
我跟sai老板要一下数据库权限
Hugh Liu ***@***.***> 于2022年10月4日周二 17:17写道:
… 目录的增删查改,包括 我建立的目录 和 某用户的收藏目录
目前已经存在
/v0/indices/{index_id}
<https://bangumi.github.io/api/#/%E7%9B%AE%E5%BD%95/getIndexById>
/v0/indices/{index_id}/subjects
<https://bangumi.github.io/api/#/%E7%9B%AE%E5%BD%95/getIndexSubjectsByIndexId>
需要添加(省略版本号)
与目录直接关联的
新建目录 POST /indices 返回 model.Index
<https://github.com/bangumi/server/blob/master/internal/model/index.go>
修改 PUT /indices/{index_id}
删除 DELETE /indices/{index_id}
新建目录和修改目录的请求参数
{
"title": "xxx",
"desc": "xx",
}
增加内容 POST /indices/{index_id}/subjects
修改内容 PUT /indices/{index_id}/subjects/<subject_id>
POST/PUT JSON Payload
{
"subject_id": 123, // 新增时需要,如果是 subject link 前端直接做解析,解析成 subject_id
"sort": 74,
"comment: "string"
}
删除内容 DELETE /indices/{index_id}/subjects/<subject_id>
与目录相关的内容
收藏目录 POST /indices/{index_id}/collect
取消收藏 DELETE /indices/{index_id}/collect
用户的目录 GET /users/{username}/indices
用户的收藏目录 GET /users/{username}/indices/collect
与 API 无关的内容
用 indices/index 表示目录,感觉很不符合语境,catalogue 可能更合适些吧
a complete list of items, typically one in alphabetical or other
systematic order.
• a list of all the books or resources in a library: a computerized
library catalogue.
------------------------------
感觉排版有点乱...
先讨论讨论看看 url 设计合理不,我有时间开始做这部分~
—
Reply to this email directly, view it on GitHub
<#230>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADHNB37NC7Q5GRWFF3KIWGDWBPY3NANCNFSM6AAAAAAQ4L2HE4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Private API 和公开 API 的界限是在哪?比如对目录的增删,应该属于公开 API 么? |
Private API是针对前端需要写的,不太需要保证兼容性,公开API是给所有人用得。这个应该是公开的。 |
有数据库权限了 |
Closed
Hi there,我可以帮忙尝试实现一下收藏部分的api,这几天抽空理解了下代码和文档,感觉可以开始上手了,有什么其他建议可以帮助我展开工作吗😃 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
目录的增删查改,包括
我建立的目录
和某用户的收藏目录
目前已经存在
/v0/indices/{index_id}
/v0/indices/{index_id}/subjects
已实现 #234
/indices
/indices/{index_id}
/indices/{index_id}/subjects
/indices/{index_id}/subjects/<subject_id>
/indices/{index_id}/subjects/<subject_id>
待实现
/indices/{index_id}/collect
/indices/{index_id}/collect
/users/{username}/indices
/users/{username}/indices/collect
暂定不添加
/indices/{index_id}
The text was updated successfully, but these errors were encountered: