获取文章正文
开发中
GET
http://localhost:8098/admin/post/publish/{postId}
此接口只能用于获取文章已经发布的正文,文章的草稿请使用接口“获取文章草稿”。
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Path 参数
postId
integer
文章 ID
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'http://localhost:8098/admin/post/publish/'
返回响应
🟢200成功
application/json
Body
code
integer
必需
errMsg
null
必需
data
object
必需
postContentId
integer
文章内容 ID
postId
integer
文章 ID
content
string
文章内容( Markdown / PlainText)
html
string
文章 HTML
status
enum<string>
文章内容状态
枚举值:
PUBLISHEDDRAFT
draftName
null
草稿名(当前获取的文章正文,草稿名始终为 null)
lastModifyTime
integer
文章内容最后修改时间戳
示例
{
"code": 200,
"errMsg": null,
"data": {
"postContentId": 9,
"postId": 2,
"content": "dolore in",
"html": "<p>dolore in</p>",
"status": "PUBLISHED",
"draftName": null,
"lastModifyTime": 1709382953842
}
}
修改于 2024-03-02 10:36:47