编辑: 达达恰西瓜 2019-09-03
1.

1 1.2 1.3 1.3.1 1.3.1.1 1.3.1.2 1.3.2 1.3.2.1 1.3.2.2 1.3.2.3 1.3.3 1.3.3.1 1.3.3.2 1.3.3.3 1.4 1.4.1 1.5 1.5.1 1.6 1.6.1 1.6.2 1.7 1.7.1 1.7.2 目录 前言 重要说明 新闻接口 频道列表 旧版本 新版本 新闻列表 旧版本 新版本 混合推荐 新闻操作 获取正文5 顶踩分享 收藏列表 搜索接口 热门搜索词 软件接口 软件更新 用户接口 网址收藏 网址收藏列表 导航APP接口 主页卡片 待添加站点列表

1 前言 这里详细记录了快讯所有接口的实现说明 前言

2 重要说明

1、以下字段客户端每次请求时都应该携带,记录日志,为后续的统计做好准备 在 后续的接口说明中列举的是服务器端需要使用的参数: 字段 说明 示例 os 手机操作系统 android did 设备号 ca67c8f7-d4ca-3089-986f-fdb2c7260f34 pm 手机型号 M35t cid 渠道号 2ehveeiy sdkv sdk版本

10 vername 版本名称 5.0.1 vercode 版本号

90

2、所有请求接口都会返回一个res对象表明响应状态,描述如下,具体接口中不再 说明: 字段 说明 类型 父节点 res 响应状态 对象 reCode 状态码,1表示成功,其他表示失败 string res resMessage 状态说明 string res

3、如果参数的值(包括客户端请求和服务器响应)为空或者Null的情况下,请求或者 响应的json不需要携带这个key;

4、下述接口文档中的JSON 实例只是例子,以字段说明为准;

5、服务器端返回Json key的顺序,除URL前缀 (apicPass)固定在第一位之外,其他key不保证其顺序;

6、调用接口说明 服务器地址:http://go.10086.cn/surfnews/suferDeskInteFace/surfdesk 参数:method=**** jsonRequest={****};

重要说明

3 重要说明

4 新闻接口 新闻接口

5 频道列表 频道列表

6 旧版本频道列表 旧版本

7 新版本频道列表 实现说明 新版本频道列表接口findInfoCateN5是为android客户端5.0之后的版本实现的接口, 和findInfoCateN相比主要修改是规范了一些字段的命名,并且增加了一些满足新需 求的字段. 请求说明 请求方法 findInfoCateN5 请求参数 字段 说明 类型 必须 os 客户端类型(android/iphone/androidTV/surfwap) string 是vercode 客户端版本号 long 是 返回参数 新版本

8 字段 说明 类型 级别父节点 channelList 频道列表 对象 数组

1 channelId 频道ID long

2 channelList channelName 频道名称 string

2 channelList channelIndex 频道位置,值越小的越靠前 long

2 channelList isBeauty 请求类型,0传统方式,1美女频 道,2webview打开,3T+,4订 阅频道,5段子,6趣图 int

2 channelList isMixRecom 是否混合推荐,1是0否int

2 channelList isWidget 是否在widget展示,1是0否int

2 channelList isnew 是否提示更新,0否,1point, 2new,3hot int

2 channelList type 维护类型,0快讯维护,1冲浪维 护,2图集,3微博源,4视频 int

2 channelList position 栏目位置,0顶部,1隐藏 int

2 channelList 响应示例 { channelList : [ channelId : 2186000, channelIndex : 55093, channelName : 时尚 , isBeauty : 0, isMixRecom : 0, isWidget : 0, isnew : 0, openType : 0, parent_id : -1, position : 0, type :

0 channelId : 0, 新版本

9 channelIndex : 4063, channelName : 南京 , isBeauty : 0, isWidget : 0, parent_id : -1, type :

0 ], cityRssList : [ cityId :

101010100 , cityName : 北京 , enName : Beijing , parentId : -1 , parentName : 中国 cityId :

101040100 , cityName : 重庆 , enName : Chongqing , parentId : -1 , parentName : 中国 ], cityRssTime : 1454034404000, rec : [ recid :

59144189 , recimg : http://192.168.10.150:8090/hotpic/201304/ 23/source5914418920130423093651.png , recname : 百度军事 , channelId :

438757 recid :

59145559 , recimg : http://192.168.10.150:8090/hotpic/201410/ 29/source5914555920141029154113.jpg , recname : 搜狐军事 , channelId :

438757 新版本

10 ], res : { reCode :

1 , resMessage : Operation is successful } } 新版本

11 新闻列表 新闻列表

12 旧版本新闻列表 旧版本

13 新版本新闻列表 实现说明 新版本新闻列表接口findInfoNByCoid5是为android客户端5.0之后的版本实现的接 口,和findInfoNByCoidN相比主要修改是规范了一些字段的命名,并且增加了一些 满足新需求的字段. 新闻展示格式定义 showType字段用来决定列表的展示格式,定义如下: 取值 说明

1001 单图

1002 多图

1003 无图,大图新闻为了兼容老版本也是置为1003,新版本需根据bigImg 是否为1判断大图,大图图片地址取bannerUrl字段

1004 趣图新闻,第一张图片是gif

1005 趣图新闻,第一张图片不是gif

2001 广告大图

2002 广告小图

2003 广告下载小图

2004 广告下载大图

3001 专题有图片

3002 专题无图片

4001 热推第一条的T+新闻推荐

4002 热推第一条的T+RSS推荐 请求说明 请求方法 findInfoNByCoid5 请求参数 新版本

14 字段 说明 类型 必须 coid 频道ID long 是page 请求页数,从1开始 int 是 返回参数 字段 说明 类型 级别父节点 news 新闻列表 对象 数组

1 newsId 新闻ID long

2 news channelId 频道ID long

2 news type 新闻类型,1普通新 闻,2banner新闻,3 活动,4图集,5普通 专题新闻,6banner专 题新闻 int

2 news open_type 打开方式 int

2 news title 标题 string

2 news desc 描述 string

2 news imgUrl 图片 string

2 news dm 图片分辨率,宽*高格 式string

2 news showType 展示格式,参照格式 定义 int

2 news bigImg 是否为大图新闻,1是 0否 string

2 news bannerUrl banner图或者大图地 址string

2 news isTop 是否置顶 int

2 news time 发布时间 long

2 news content 正文内容,只针对段 子频道返回 string

2 news upCount 顶数量 long

2 news downCount 踩数量 long

2 news 新版本

15 shareCount 分享数量 long

2 news isComment 是否支持评论,1是0 否int

2 news comment_count 评论数量 long

2 news hot_comment_list 热门评论 对象 数组

2 news commentId 评论ID long

3 hot_comment_list newsid 新闻ID long

3 hot_comment_list content 评论内容 string

3 hot_comment_list uid 用户ID string

3 hot_comment_list did 用户设备号 string

3 hot_comment_list headPic 用户头像 string

3 hot_comment_list nickname 用户昵称 string

3 hot_comment_list hot 是否热门评论,1是0 否int

3 hot_comment_list createtime 评论时间 long

3 hot_comment_list location 位置 string

3 hot_comment_list 一般频道响应示例 { res : { reCode :

1 , resMessage : Operation is successful }, picNews : [ { title : 壮观!数万只鹦鹉聚集饮水遮天蔽日 , time : 1455775831928, source : 新华网 , content_url : http://go.10086.cn/surfnews/images /4061/20160218/5369992/5369992.html , imgUrl : http://go.10086.cn/surfnews/images/4061 /20160218/back/1454034002240.jpg , newsUrl : http://news.xinhuanet.com/photo/2016-0 2/18/c_128730012.htm , 新版本

16 isTop : 0, type : 2, bannerUrl : http://go.10086.cn/surfnews/images/4 061/20160218/back/1454034002240.jpg , open_type : 0, ctype : 0, is_energy : 1, positive_energy : 18412, negative_energy : 0, isComment : 0, comment_count : 0, updateTime : 1455775478000, rssId : 59322631, rssName : 网事联播 , rssIcon : http://go.10086.cn/hotpic/201506/01/so urce59322631.jpg , rssSource :

1 , showType : 1003, newsId : 5369992, channelId : 4061, webView : 0, bigImg :

1 , content_type :

1 } ], news : [ { title : 微信提现收费动了谁的奶酪? , time : 1455762554000, source : 快讯 , imgUrl : http://go.10086.cn/surfnews/images/4061 /20160218/back/1454034002186.jpg , dm : 600*800 , newsUrl : http://go.10086.cn/surfnews/usr/surf/s pecial/20160218/1323.html , isTop : 1, type : 1, open_type : 1, iconPath : http://go.10086.cn/surfnews/usr/surf/ icon/20151209174953.png , 新版本

17 ctype : 0, multiImgUrl : [ imgUrl : http://go.10086.cn/surfnews/ima ges/4061/20160218/back/1454034002186.jpg imgUrl : http://go.10086.cn/surfnews/ima ges/4061/20160218/back/1454034002188.jpg imgUrl : http://go.10086.cn/surfnews/ima ges/4061/20160218/back/1454034002189.jpg is_energy : 0, isComment : 0, comment_count : 0, updateTime : 1455776734000, showType : 1002, newsId : 5363474, channelId : 4061, webView : 1, content_type : 1, rssId : 59322631, rssName : 网事联播 , rssIcon : http://go.10086.cn/hotpic/201506/01/so urce59322631.jpg , rssSource :

1 } ] } 段子频道响应示例 { res : { reCode :

1 , resMessage : Operation is successful 新版本

18 }, picNews : [ ], news : [ title : 老婆:老公我去隆胸吧?老公:好啊... , desc : 老婆:老公我去隆胸吧? 老公:好啊. 老婆:哼!你果然嫌我胸小. 老公:...... 老婆:老公我去隆胸吧? 老公:别去了. 老婆:哼!你就是舍不得我花钱. 老公: time : 1455678900000, source : 手机冲浪 , content_url : http://go.10086.cn/surfnews/images/4 648023/20160217/5341892/5341892.html , isTop : 0, type : 1, open_type : 0, ctype : 0, isComment : 1, showType : 1003, newsId : 5341892, channelId : 4648023, webView : 0, upCount : 1286, downCount : 207, shareCount : 120, content : 老婆:老公我去隆胸吧? 老公:好啊. 老婆:哼!你果然嫌我胸小. 老公:...... 老婆:老公我去隆胸吧? 老公:别去了. 老婆:哼!你就是舍不得我花钱. 老公:...... ] } 新版本

19 新版本

20 混合推荐新闻列 实现说明 混合推荐是为了满足客户端可以不断刷新新闻新增的接口,下拉刷新时返回编辑推 荐新闻、T+推荐新闻和抓取新闻三部分,上滑刷新时返回编辑新闻和抓取新闻. 实现逻辑 1. 计算请求应获取新闻数量 上滑刷新:8条 下拉刷新其他频道:10条 下拉刷新热推频道第一次请求或间隔>

60分钟:14条 下拉刷新热推频道间隔15分钟 按照紧急度和更新时间排序 不处理时间戳 补充两条T+新闻 其他请求 编辑新闻开始时间戳之后 按照发布时间排序 其他频道 指定频道 混合推荐

21 updateTime不为空 编辑新闻开始时间戳之后 按照发布时间排序 数量不够时,继续查询旧新闻 编辑新闻结束时间戳之前 按照发........

下载(注:源文件不在本站服务器,都将跳转到源网站下载)
备用下载
发帖评论
相关话题
发布一个新话题