# 20190125 修改
## 获取小说内容(测试连接,成功后换到正式地址[GET /{id}/chapters/{chapter}]) [GET /novels/share/{id}/chapters/{chapter}]
返回小说列表
如果 is_share = 1 , token一定要填写, `platform`和`is_share`参数只针对于微信端
+ Parameters
+ id: (integer, required) - 小说id
+ chapter: (integer, required) - 章节id
+ is_share: (integer, optional) - 1-是分享
+ platform: (string, optional) - web
+ Response 200 (application/json)
+ Body
{
"data": {
"id": 127811,
"novel_id": 172,
"title": "",
"body": "content",
"sort": 2,
"create_time": 1538122421,
"word_cnt": 0,
"is_free": 1,
"next": {
"id": 112,
"title": "12",
"is_free": 1
},
"prev": {
"id": 23,
"title": "12",
"is_free": 0
}
}
}
+ Response 200 (application/json)
+ Body
{
"message": "no content",
"status_code": 204
}
# 20190124 修改
## 小说排行榜 [GET /novels/rank]
返回小说排行榜列表
如:`/novels/rank?rank=hot`
+ Parameters
+ rank: (string, required) - 排行榜,hot-热门榜,fav-收藏榜,finished-完结榜,serial-连载榜
+ cate: (integer, optional) - 顶级分类id,如:男、女【预留字段,以后必填】
+ limit: (integer, optional) - 每页显示条数
+ Default: 6
+ page: (integer, optional) - 页码
+ Default: 1
+ Response 200 (application/json)
+ Body
{
"data": [
{
"id": 172,
"name": "我混过的日子",
"cover": "http://manhua-1251281796.file.myqcloud.com/xiaoshuofm/2013/img.jpg",
"author": "他的国",
"chapter_cnt": 459,
"word_cnt": 0,
"is_finished": 0,
"is_bookshelf": 0,
"is_free": 0,
"is_short": 0,
"cates": [
{
"id": 14,
"name": "热门推荐",
"type": 2,
"cnt": 0,
"sort": 0,
"show_cnt": 6
}
],
"sex_type": 1,
"read_cnt": 62,
"fav_cnt": 0,
"desc": "本不想再做混混的他,来到一座陌生的城市,却因为见义勇为再次开始了打架闹事的日子。有兄弟有朋友,一起打抱不平,谁没有过青春,谁没有过热血,可那些年少的无知与锐气,大多会被岁月磨平,那么,就一起来祭奠,我混过的日子……",
"price": 25,
"word_price": "0.00",
"book_price": "0.00",
"remark": "",
"comments": 0,
"create_time": 1538122421
}
],
"meta": {
"pagination": {
"total": 190,
"count": 20,
"per_page": 20,
"current_page": 2,
"total_pages": 10,
"links": {
"previous": "http://api.novel.test/api/novels?page=1",
"next": "http://api.novel.test/api/novels?page=3"
}
}
}
}
+ Response 204 (application/json)
+ Body
{
"message": "no content",
"status_code": 204
}
## Protocol [/protocol]
用户协议
### 隐私协议 [GET [GET /protocol/privacy]]
如:`/protocol/privacy`
+ Response 200 (application/json)
+ Body
{
"data": {
"content": "<p>测试帮助</p>"
}
}
+ Response 204 (application/json)
+ Body
{
"message": "没有内容",
"status_code": 204
}
### 注册协议 [GET /protocol/register]
如:`/protocol/register`
+ Response 200 (application/json)
+ Body
{
"data": {
"content": "<p>测试帮助</p>"
}
}
+ Response 204 (application/json)
+ Body
{
"message": "没有内容",
"status_code": 204
}
# 20190123 修改
## 新建历史 [POST /users/histories] [传送门](https://www.kancloud.cn/book/ranjun940726/yuedubao_api/edit#_POST_usershistories_2103)
+ 新增字段:`extend_chapter: (string, required)` - 章节标题
## 更新指定 id 的历史记录 [PUT /users/histories/{history}] [传送门](https://www.kancloud.cn/ranjun940726/yuedubao_api/865823#_id__PUT_usershistorieshistory_2152)
+ 新增字段:`extend_chapter: (string, required)` - 章节标题
# 20190122
## 修改内容如下
### 获取评论列表 [GET /comments/{extend_id}]
+ `add`:platform: (string, optional) - 平台,Android、iOS无需传递该参数, web需传递`web`
### 获取指定id的反馈 [GET /users/feedback/{feedback}]
+ `add`:platform: (string, optional) - 平台,Android、iOS无需传递该参数, web需传递`web`
### 新建历史 [POST /users/histories]
+ `page`: (string, optional) - 阅读章节的页数,页数由前端自己计算,如果是web端可直接为0
### 更新历史 [POST /users/histories/{histories}]
+ `page`: (string, optional) - 阅读章节的页数,页数由前端自己计算,如果是web端可直接为0
# 20190118
## 新增
## 上传反馈图片 [POST /users/feedback/pics]
图片上传成功后,返回地址
如: `http://api.novel.test/api/users/feedback/pic`
+ Parameters
+ pics[]: (string, required) - 文件 file 对象
+ Response 404 (application/json)
+ Body
{
"data": [
{
"url": "http://yuedubao.oss-cn-hangzhou.aliyuncs.com/feedback/2019/01/18/7cJwRy7ggXkXtu0V7l80dijHLcsnEkbPWifKYOp4.jpeg"
}
]
}
## 修改
+ 用户反馈 [POST /users/feedback],修改字段`pics`:图片地址,多个地址使用`,`分隔`
# 20190117 修改
+ 下载小说 [GET /novels/download] 新增 必须传入 `token`
# 20190115 新增
## 获取小说列表 [GET /novels]
修改 `order` 字段,`-1不限,1-章节数,2-总字数,3-收藏数,4-阅读数`
## 分享 [GET /share]
**该接口只针对`wap`端**
返回:微信分享所需的参数配置
+ Response 200 (application/json)
+ Body
{
"data": {
"debug": false,
"beta": false,
"jsApiList": [
"updateAppMessageShareData",
"updateTimelineShareData"
],
"appId": "wxfd6bc7331bd12087",
"nonceStr": "R7KCTLEeOV",
"timestamp": 1547517310,
"url": "http://wap.17yuedu.com",
"signature": "ced7b05d70ffc937d9f668aa80962cb31fb0de65"
}
}
# 20190114 修改
+ 获取指定小说的章节目录 [GET /novels/{id}/chapters]
增加 last_id 字段
**新增接口:**
## 获取指定小说的章节目录 [GET /novels/{id}/wap/chapters]
返回小说小说的章节目录:
如:`{{api}}/novels/65536/wap/chapters` ,
+ Parameters
+ id: (string, required) - 小说id
+ limit: (integer, optional) - 每页显示条数
+ Default: 6
+ page: (integer, optional) - 页码
+ Default: 1
+ Response 200 (application/json)
+ Body
{
"data": [
{
"id": 19285,
"title": "031 重定正宾",
"novel_id": 11,
"sort": 31,
"create_time": null,
"word_cnt": 0
}
]
}
+ Response 204 (application/json)
+ Body
{
"message": "no content",
"status_code": 204
}
# 20190111 更新
## 下载小说 [GET /novels/download]
返回下载小说列表
+ Parameters
+ ids: (string, required) - 章节id,多个id使`,`分隔
+ novel_id: (integer, required) - 小说id
+ is_all: (integer, required) - 0-非全部章节,1-全部章节
+ Response 200 (application/json)
+ Body
{
"data": [
{
"id": 127811,
"novel_id": 172,
"title": "",
"body": "content",
"sort": 2,
"create_time": 1538122421,
"word_cnt": 0,
"is_free": 1
}
]
}
# 20190109 更新
+ 获取指定小说id详细信息 [GET /novels/detail/{id}] 增加 `comments` 列表
# 20180107更新
获取指定小说id详细信息 [GET /novels/detail/{id}] 添加字段:`click_cnt` -> 点击次数,浏览次数:`read_cnt`(原来就有)
# 20180104接口变更
## 新增
# Users [/comments]
评论相关接口
## 获取评论列表 [GET /comments/{extend_id}]
返回评论列表
如: `http://api.novel.test/comments`
+ Parameters
+ extend_id: (string, required) - 小说或者漫画id
+ type: (string, optional) - 1-小说,2-漫画
+ Default: 1
+ limit: (string, optional) - 显示条数
+ Default: 10
+ page: (string, optional) - 页数
+ Default: 1
+ Response 200 (application/json)
+ Body
{
"data": [
{
"id": 8,
"nickname": "13637745089",
"headimg": "",
"extend_id": 65536,
"star": 0,
"content": "1",
"create_time": "11111"
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"links": {
"next": "http://api.novel.test/comments/65536?page=2",
"previous": "http://api.novel.test/comments/65536?page=1"
}
}
}
}
## 保存评论 [POST /comments]
如: `http://api.novel.test/comments`
+ Parameters
+ content: (string, required) - 评论内容
+ extend_id: (string, required) - 小说或者漫画id
+ type: (string, optional) - 1-小说,2-漫画
+ Default: 1
+ Response 200 (application/json)
+ Body
{
"message": "创建成功",
"status_code": 201
}
## 点赞 [PUT /comments/{comment}/star]
请自行判断用户只能点击一次,服务器没有记录是谁点赞,无法对次数进行判断
如: `http://api.novel.test/comments/9/star`
+ Parameters
+ comment: (string, required) - 评论id
+ Response 200 (application/json)
+ Body
{
"message": "点赞成功",
"status_code": 200
}
## 更新
## 用户反馈 [POST /users/feedback]
用户反馈成功后的消息
如: `http://api.novel.test/api/users/feedback`
+ Parameters
+ content: (string, required) - 内容
+ pics[]: (string, optional) - 图片
+ Response 200 (application/json)
+ Body
{
"message": "创建成功",
"status_code": 201
}
# 20180103新增
## 关于APP [Get /about]
+ Response 200 (application/json)
+ Body
{
"data": {
"content": "<p>测试帮助</p>"
}
}
+ Response 204 (application/json)
+ Body
{
"message": "没有内容",
"status_code": 204
}
# 20181227 更新
## 获取小说分类列表 [GET /novels/cates]
获取小说分类列表
+ Response 200 (application/json)
+ Body
```json
{
"data": [
{
"name": "男生",
"child_ids": "97",
"id": 5,
"cates": [
{
"id": 97,
"name": "都市1",
"pic": "http://yuedubao.oss-cn-hangzhou.aliyuncs.com/category/20181225/logo%20100-100.png",
"books_cnt": 10
}
]
}
]
}
```
+ Response 204 (application/json)
+ Body
```json
{
"message": "no content",
"status_code": 204
}
```
## 修改接口
### 结果集新增`push_alias`字段接口
+ 用户短信登录[POST /users/login/sms]
+ 用户密码登录[POST /users/login]
+ 第三方登录[POST /users/oauth/login]
用户登录成功会返回`push_alias`字段
+ 绑定手机号[POST /users/oauth/bind]
用户绑定手机号成功会返回`push_alias`字段
### 参数修改(原来就有,文档新增参数)
+ 获取指定精选栏目数据 [GET novels/choice/{id}]
添加,如下参数:
+ limit: (integer, optional) - 每页显示条数
+ Default: 6
+ page: (integer, optional) - 页码
+ Default: 1
# 20181226 新增
## 获取小说分类列表 [GET /novels/cates]
获取小说分类列表
+ Response 200 (application/json)
+ Body
```json
{
"data": [
{
"name": "男生",
"child_ids": "97",
"id": 5,
"cates": [
{
"id": 97,
"name": "都市1",
"pic": "http://yuedubao.oss-cn-hangzhou.aliyuncs.com/category/20181225/logo%20100-100.png",
"child": [
{
"id": 98,
"name": "都市言情"
},
{
"id": 102,
"name": "青春校园"
}
]
}
]
}
]
}
```
+ Response 204 (application/json)
+ Body
```json
{
"message": "no content",
"status_code": 204
}
```
## 需要检测的接口
+ 获取小说列表 [GET /novels]
+ 获取指定小说id详细信息 [GET /novels/detail/{id}]
+ 根据 `小说名字` 和 `作者` 搜索小说 [GET /novels/search]
+ 精选 [GET /novels/choice]
+ 获取精选下的更多数据 [GET /novels/choice/{id}]
