Skip to content

BookItem

search()bookInfo()explore() 返回的书籍数据结构。

字段

字段类型必填说明
namestring书名
bookUrlstring书籍详情页 URL
authorstring推荐作者(视频源可填导演/主演)
coverUrlstring推荐封面图片 URL
tocUrlstringbookInfo 中必填目录页 URL
introstring简介
latestChapterstring最新章节名
kindstring分类标签

各函数中的用法

search 返回

js
return [{
  name: '斗破苍穹',
  bookUrl: 'https://example.com/book/123',
  author: '天蚕土豆',
  coverUrl: 'https://example.com/cover/123.jpg',
  intro: '三十年河东,三十年河西...',
  latestChapter: '第1000章'
}];

bookInfo 返回

js
return {
  name: '斗破苍穹',
  bookUrl: bookUrl,
  tocUrl: bookUrl + '/chapters',   // 目录入口
  author: '天蚕土豆',
  coverUrl: 'https://example.com/cover/123.jpg',
  intro: '三十年河东,三十年河西...',
  latestChapter: '第1000章',
  kind: '玄幻'
};

explore 返回

js
return [{
  name: '斗破苍穹',
  bookUrl: 'https://example.com/book/123',
  author: '天蚕土豆',
  coverUrl: 'https://example.com/cover/123.jpg',
  kind: '玄幻'
}];

空值处理

字段缺失时填空字符串 '',不要返回 nullundefined

基于 MIT 许可发布