🚀 API使用指南

1. 统一入口格式

# 统一API入口
/api/index.php?api=[api_type]&[参数]

返回图片URL数组

/api/index.php?api=manga&item_ids=漫画章节ID

直接在网页显示图片

/api/index.php?api=manga&item_ids=漫画章节ID&show_html=1

单章节内容(默认full接口)

/api/index.php?api=content&item_ids=7276663560427471412

多章节内容(batch接口,需api_type=batch)

/api/index.php?api=content&item_ids=7276663560427471412,7341402209906606616&api_type=batch

自定义URL模式

/api/index.php?api=content&item_ids=123&custom_url=https://example.com/api?device_id={$zwkey2}&item_id={$item_id}

听书功能

/api/index.php?api=content&ts=听书&item_ids=7276663560427471412

书籍详情

/api/index.php?api=content&book_id=7237397843521047567

书籍评论

/api/index.php?api=content&book_id=7237397843521047567&comment=评论&count=10&offset=0

API对照表

API类型 参数 说明 状态
content item_ids 内容ID,多个ID用逗号分隔 稳定
content api_type API类型,batch或full 稳定
content custom_url 自定义URL模式 测试中
content ts 启用听书功能 新功能
content book_id 书籍ID,用于获取书籍详情 稳定

Content API 接口

Content API 提供了一系列用于获取内容的功能,以下是详细的接口说明:

GET 获取内容详情

/api/index.php?api=content&item_ids=7276663560427471412&api_type=full&custom_url=https://example.com/api?device_id={$zwkey2}&item_id={$item_id}

参数说明:

参数名 类型 必需 说明
item_ids string 内容ID,多个ID用逗号分隔
api_type string API类型,batch或full,默认为full
custom_url string 自定义URL模式,支持变量替换
show_html boolean 是否直接显示HTML内容

GET 获取书籍评论

/api/index.php?api=content&book_id=7237397843521047567&comment=评论&count=10&offset=0

参数说明:

参数名 类型 必需 说明
book_id string 书籍ID
comment string 固定值"评论"
count number 返回评论数量,默认10
offset number 评论偏移量,用于分页