诗词搜索
接口地址:/poetry
请求方式:GET
响应数据类型:application/json
接口描述:
根据关键字全文搜索诗词,支持传入exclude参数排除搜索条件。
支持排除的字段:
poetryName
诗词名字brandName
词牌wordOrder
词序authorName
作者content
正文annotation
注释appreciation
赏析appreciationAuthor
赏析作者
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
Authorization | 授权请求头 | header | true | string | |
x-jd-device | 设备信息 | header | false | string | |
q | 要查询的字/词 | query | true | string | |
exclude | 要排除的搜索条件,逗号分隔 | query | false | array | string |
page | 页码 | query | false | integer(int32) | |
size | 页的大小 | query | false | integer(int32) |
响应状态:
状态码 | 说明 | schema |
---|---|---|
200 | OK | object |
响应参数:
参数名称 | 参数说明 | 类型 | schema |
---|---|---|---|
totalPages | integer(int32) | integer(int32) | |
totalElements | integer(int64) | integer(int64) | |
size | integer(int32) | integer(int32) | |
content | array | object | |
content | object | ||
poetryName | 诗词名 | string | |
brandName | 词牌说明 | string | |
wordOrder | 词序 | string | |
authorName | 作者 | string | |
content | 正文 | string | |
annotation | 注释 | string | |
appreciation | 赏析 | string | |
appreciationAuthor | 赏析作者 | string | |
bookName | 书籍名 | string | |
highlights | 高亮 | object | |
number | integer(int32) | integer(int32) | |
sort | array | object | |
direction | string | ||
nullHandling | string | ||
ascending | boolean | ||
property | string | ||
ignoreCase | boolean | ||
first | boolean | ||
last | boolean | ||
numberOfElements | integer(int32) | integer(int32) | |
pageable | PageableObject | PageableObject | |
offset | integer(int64) | ||
sort | array | object | |
direction | string | ||
nullHandling | string | ||
ascending | boolean | ||
property | string | ||
ignoreCase | boolean | ||
pageNumber | integer(int32) | ||
pageSize | integer(int32) | ||
paged | boolean | ||
unpaged | boolean | ||
empty | boolean |
响应示例:
{
"totalPages": 0,
"totalElements": 0,
"size": 0,
"content": [
{
"content": {
"poetryName": "",
"brandName": "",
"wordOrder": "",
"authorName": "",
"content": "",
"annotation": "",
"appreciation": "",
"appreciationAuthor": "",
"bookName": ""
},
"highlights": {}
}
],
"number": 0,
"sort": [
{
"direction": "",
"nullHandling": "",
"ascending": true,
"property": "",
"ignoreCase": true
}
],
"first": true,
"last": true,
"numberOfElements": 0,
"pageable": {
"offset": 0,
"sort": [
{
"direction": "",
"nullHandling": "",
"ascending": true,
"property": "",
"ignoreCase": true
}
],
"pageNumber": 0,
"pageSize": 0,
"paged": true,
"unpaged": true
},
"empty": true
}