跳到主要内容
版本:v2

诗词搜索

接口地址:/poetry

请求方式:GET

响应数据类型:application/json

接口描述:
根据关键字全文搜索诗词,支持传入exclude参数排除搜索条件。

支持排除的字段:

  1. poetryName 诗词名字
  2. brandName 词牌
  3. wordOrder 词序
  4. authorName 作者
  5. content 正文
  6. annotation 注释
  7. appreciation 赏析
  8. appreciationAuthor 赏析作者

请求参数:

参数名称参数说明请求类型是否必须数据类型schema
Authorization授权请求头headertruestring
x-jd-device设备信息headerfalsestring
q要查询的字/词querytruestring
exclude要排除的搜索条件,逗号分隔queryfalsearraystring
page页码queryfalseinteger(int32)
size页的大小queryfalseinteger(int32)

响应状态:

状态码说明schema
200OKobject

响应参数:

参数名称参数说明类型schema
totalPagesinteger(int32)integer(int32)
totalElementsinteger(int64)integer(int64)
sizeinteger(int32)integer(int32)
contentarrayobject
  contentobject
    poetryName诗词名string
    brandName词牌说明string
    wordOrder词序string
    authorName作者string
    content正文string
    annotation注释string
    appreciation赏析string
    appreciationAuthor赏析作者string
    bookName书籍名string
  highlights高亮object
numberinteger(int32)integer(int32)
sortarrayobject
  directionstring
  nullHandlingstring
  ascendingboolean
  propertystring
  ignoreCaseboolean
firstboolean
lastboolean
numberOfElementsinteger(int32)integer(int32)
pageablePageableObjectPageableObject
  offsetinteger(int64)
  sortarrayobject
    directionstring
    nullHandlingstring
    ascendingboolean
    propertystring
    ignoreCaseboolean
  pageNumberinteger(int32)
  pageSizeinteger(int32)
  pagedboolean
  unpagedboolean
emptyboolean

响应示例:

{
"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
}