获取所有文章
开发中
GET
http://localhost:8098/api/post
请求参数
Query 参数
page
integer
可选
size
integer
每页条数
key
string
可选
tagId
integer
标签 ID
categoryId
integer
分类 ID
tag
string
标签名或标签别名
category
string
分类名或分类别名
示例代码
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/api/post?page&size&key=&tagId&categoryId&tag&category'
返回响应
🟢200成功
application/json
Body
code
integer
必需
errMsg
null
必需
data
object
必需
page
integer
当前页数
size
integer
每页条数
data
array [object {13}]
必需
totalData
integer
总文章数量
totalPages
integer
总页数
示例
{
"code": 200,
"errMsg": null,
"data": {
"page": 1,
"size": 1,
"data": [
{
"postId": 2,
"title": "来地实",
"excerpt": "Ut consequat velit",
"slug": "velit labore",
"cover": "do id qui",
"allowComment": true,
"pinned": true,
"encrypted": false,
"visit": 0,
"category": null,
"tags": [],
"createTime": 1709382953842,
"lastModifyTime": null
}
],
"totalData": 1,
"totalPages": 1
}
}