Skip to content

Latest commit

 

History

History
276 lines (225 loc) · 4.03 KB

API_DOC.md

File metadata and controls

276 lines (225 loc) · 4.03 KB

API Document

语法释义:

@JwtAuth

Get '/path/:id' ({ param? }): <ResultDataType>
  • Get method, 请求类型
  • '/path/:id' route param, 路由及路由参数
  • ({ param? }) query params | body, 请求参数或提交数据体,两者互斥
  • <ResultDataType> result data type, 请求返回的数据类型
  • @JwtAuth required auth, 是否需要鉴权(默认为普通用户/无需鉴权,显式声明即为需要鉴权通过才可访问)

Root

Get (): <APP_INFO>

Auth (auth)

Get '/admin' (): <Auth>
@JwtAuth

Put '/admin' (Auth): <Auth>
Post '/login' (AuthLogin): <ITokenResult>
@JwtAuth

Post '/check' (): <void>

Option (option)

Get (): <Option>
@JwtAuth

Put (Option): <Option>

Announcement (announcement)

Get ({ <common>?, state?, keyword? }): <Announcement[]>
@JwtAuth

Post (Announcement): <Announcement>
@JwtAuth

Delete (DelAnnouncements): <MongooseOpResult>
@JwtAuth

Put '/:id' (Announcement): <Announcement>
@JwtAuth

Delete '/:id' (): <MongooseOpResult>

Article (article)

Get ({ <common>?, date?, public?, origin?, cache?, tag?, category?, keyword?, tag_slug?, category_slug? }): <Article[]>
Get '/:id' (): <Article>
@JwtAuth

Put '/:id' (Article): <Article>
@JwtAuth

Delete '/:id' (): <MongooseOpResult>
@JwtAuth

Post (Article): <Article>
@JwtAuth

Patch (PatchArticles): <MongooseOpResult>
@JwtAuth

Delete (DelArticles): <MongooseOpResult>

Category (category)

Get ({ <common>? }): <Category[]>
Get '/:id' (): <Category[]>
@JwtAuth

Put '/:id' (Category): <Category>
@JwtAuth

Delete '/:id' (): <MongooseOpResult>
@JwtAuth

Post (Category): <Category>
@JwtAuth

Delete (DelCategories): <MongooseOpResult>

Tag (tag)

Get ({ <common>?, cache?, keyword? }): <Tag[]>
@JwtAuth

Post (Tag): <Tag>
@JwtAuth

Put '/:id' (Tag): <Tag>
@JwtAuth

Delete '/:id' (): <MongooseOpResult>
@JwtAuth

Delete (DelTags): <MongooseOpResult>

Comment (comment)

Get ({ <common>?, state?, post_id?, keyword? }): <Comment[]>
Post (CreateCommentBase): <Comment>
@JwtAuth

Patch (PatchComments): <MongooseOpResult>
@JwtAuth

Delete (DelComments): <MongooseOpResult>
@JwtAuth

Get '/:id' (): <Comment>
@JwtAuth

Put '/:id' (Comment): <Comment>
@JwtAuth

Delete '/:id' (): <MongooseOpResult>

Sitemap (sitemap)

Get (): <SitemapXML>
@JwtAuth

Patch (): <void>

Like (like)

Patch '/site' (): <boolean>
Patch '/comment' (LikeComment): <boolean>
Patch '/article' (LikeArticle): <boolean>

Expansion (expansion)

Get '/statistic' (): <ITodayStatistic>
Get '/github' (): <IGithubRepositorie[]>
@JwtAuth

Patch '/github' (): <IGithubRepositorie[]>
@JwtAuth

Get '/uptoken' (): <IUpToken>
@JwtAuth

Get '/google-token' (): <Credentials>

Wallpaper (wallpaper)

Get '/list' (): <unknow>

Bilibili (bilibili)

Get '/list' ({ page?, limit? }): <IBilibiliVideoList>
@JwtAuth

Patch '/list' (): <IBilibiliVideoList>

Music (music)

Get '/list/:id' ({ limit? }): <unknow>
Get '/song/:id' (): <unknow>
Get '/url/:id' (): <unknow>
Get '/lrc/:id' (): <unknow>
Get '/picture/:id' (): <unknow>
@JwtAuth

Patch '/list' (): <void>