懒人听书:搜索/章节/音频
http://127.0.0.1:8080/api/lrts/index.php?act=search
GET
JSON
| 参数 | 是否必填 | 类型 | 说明 | 示例 |
|---|---|---|---|---|
| act | 是 | string | 固定为 search | search |
| keyword | 否 | string | 搜索关键词,如:斗破苍穹 | 斗破苍穹 |
| page | 否 | string | 页码,从1开始 | 1 |
http://127.0.0.1:8080/api/lrts/index.php?act=search&keyword=%E6%96%97%E7%A0%B4%E8%8B%8D%E7%A9%B9&page=1
http://127.0.0.1:8080/api/lrts/index.php?act=search&keyword=%E6%96%97%E7%A0%B4%E8%8B%8D%E7%A9%B9&page=1
http://127.0.0.1:8080/api/lrts/index.php?act=search&keyword=%E6%96%97%E7%A0%B4%E8%8B%8D%E7%A9%B9&page=1
{"code":200,"msg":"success","data":{"keyword":"斗破苍穹","total":20,"list":[{"id":"12345","bookTitle":"书名","bookImage":"https://...","bookAnchor":"作者","bookDesc":"简介...","bookLastChapter":"最新章节"}]}}
http://127.0.0.1:8080/api/lrts/index.php?act=chapters
GET
JSON
| 参数 | 是否必填 | 类型 | 说明 | 示例 |
|---|---|---|---|---|
| act | 是 | string | 固定为 chapters | chapters |
| bookId | 否 | string | 资源ID(来自搜索接口返回的 id) | 23930053 |
| page | 否 | string | 页码,从1开始 | 1 |
http://127.0.0.1:8080/api/lrts/index.php?act=chapters&bookId=23930053
http://127.0.0.1:8080/api/lrts/index.php?act=chapters&bookId=23930053
http://127.0.0.1:8080/api/lrts/index.php?act=chapters&bookId=23930053
{"code":200,"msg":"success","data":{"bookId":"5174","total":2000,"chapters":[{"chapter_id":"1001","title":"第1章 开始","order":1}]}}
http://127.0.0.1:8080/api/lrts/index.php?act=audio
GET
JSON
| 参数 | 是否必填 | 类型 | 说明 | 示例 |
|---|---|---|---|---|
| act | 是 | string | 固定为 audio | audio |
| bookId | 否 | string | 资源ID(来自搜索接口返回的 id) | 23930053 |
| section | 否 | string | 集序号(来自章节列表返回的 index) | 1 |
| opType | 否 | string | 类型:0=试听 / 1=完整,默认1 | 1 |
http://127.0.0.1:8080/api/lrts/index.php?act=audio&bookId=23930053§ion=1&opType=1
http://127.0.0.1:8080/api/lrts/index.php?act=audio&bookId=23930053§ion=1&opType=1
http://127.0.0.1:8080/api/lrts/index.php?act=audio&bookId=23930053§ion=1&opType=1
{"code":200,"msg":"success","data":{"url":"https://cdn.example.com/audio.mp3","bookId":"5174","chapterId":"1001"}}
// 响应结果将显示在这里