[关闭]
@apis1990 2016-08-24T03:44:56.000000Z 字数 2694 阅读 979

嘻哈头条


获取首页列表(热点)


1.URL:/service/api/get_mix_article_list.php

测试地址:http://36.33.24.119:8081/api/get_mix_article_list.php

2.请求方式:POST

3.请求参数:

参数 类型 是否必须 描述
page int 可选 分页码

4.接口返回结果

  1. {
  2. "code": 200,
  3. "data": {
  4. "cate_list": [
  5. {
  6. "taxonomy_id": "5",
  7. "name": "热点",
  8. "count": "3",
  9. "description": "",
  10. "slug": "hot"
  11. },
  12. {
  13. "taxonomy_id": "6",
  14. "name": "快报",
  15. "count": "3",
  16. "description": "",
  17. "slug": "fast-news"
  18. },
  19. {
  20. "taxonomy_id": "9",
  21. "name": "驾校",
  22. "count": "2",
  23. "description": "",
  24. "slug": "car-school"
  25. },
  26. {
  27. "taxonomy_id": "7",
  28. "name": "考试技巧",
  29. "count": "1",
  30. "description": "",
  31. "slug": "exam-tips"
  32. },
  33. {
  34. "taxonomy_id": "8",
  35. "name": "香车美女",
  36. "count": "1",
  37. "description": "",
  38. "slug": "car-beauty"
  39. }
  40. ],
  41. "article_list": [
  42. {
  43. "article_id": "121",
  44. "post_author_id": "1",
  45. "post_author_name": "xihatoutiao",
  46. "is_recommend": 1,
  47. "post_title": "",
  48. "post_date": "2016-03-17 10:33:56",
  49. "post_timestamp": 1458182036,
  50. "post_excerpt": "this is called excerpt which is the abstract of the article. you can get a hint on the article. edit latter if you mind.",
  51. "display_type": 2,
  52. "is_ads": 1,
  53. "resource_info": {
  54. "img_arr": [
  55. "http://p2.pstatp.com/large/10900095c31ee526f7e?123.jpg",
  56. "http://p2.pstatp.com/large/14e00030922fc3fd194?123.jpg",
  57. "http://p2.pstatp.com/large/14d00030923daf48a5e?123.jpg"
  58. ],
  59. "thumbnail_img": ""
  60. },
  61. "comment_count": "0"
  62. },
  63. {
  64. "article_id": "119",
  65. "post_author_id": "1",
  66. "post_author_name": "xihatoutiao",
  67. "is_recommend": 1,
  68. "post_title": "嘻哈头条测试文章2",
  69. "post_date": "2016-03-17 10:32:27",
  70. "post_timestamp": 1458181947,
  71. "post_excerpt": "this is the excerpt of the article, please re-edit this again if you want latter.",
  72. "display_type": 2,
  73. "is_ads": 1,
  74. "resource_info": {
  75. "img_arr": [
  76. "http://p2.pstatp.com/large/10900095c31ee526f7e?123.jpg",
  77. "http://p2.pstatp.com/large/14e00030922fc3fd194?123.jpg",
  78. "http://p2.pstatp.com/large/14d00030923daf48a5e?123.jpg"
  79. ],
  80. "thumbnail_img": ""
  81. },
  82. "comment_count": "0"
  83. },
  84. {
  85. "article_id": "117",
  86. "post_author_id": "1",
  87. "post_author_name": "xihatoutiao",
  88. "is_recommend": 1,
  89. "post_title": "嘻哈头条1",
  90. "post_date": "2016-03-17 10:31:05",
  91. "post_timestamp": 1458181865,
  92. "post_excerpt": "文章摘要测试1,稍后请重新编辑",
  93. "display_type": 2,
  94. "is_ads": 1,
  95. "resource_info": {
  96. "img_arr": [
  97. "http://p2.pstatp.com/large/10900095c31ee527f7e?123.jpg",
  98. "http://p2.pstatp.com/large/14e00030922fc3fd194?123.jpg",
  99. "http://p2.pstatp.com/large/14d00030923daf48a5e?123.jpg"
  100. ],
  101. "thumbnail_img": ""
  102. },
  103. "comment_count": "0"
  104. }
  105. ]
  106. }
  107. }
参数 类型 描述
code int 状态码:200 --- 成功 其它 --- 异常
data array 返回数据集
- - -
cate_list array 分类列表
taxonomy_id int 分类id
name string 分类名称
count int 分类下的文章数
description string 分类的描述
slug string 分类的别名,一般为英文
- - -
article_list array 文章列表
article_id int 文章id
post_author_id int 文章著作者id
post_author_name string 文章著作者姓名
is_recommend int 1:推荐, 2:非推荐
post_title string 文章标题
post_date date 文章发表日期
post_timestamp int 文章发表的unix时间chuo
post_excerpt string 文章的摘要
display_type int (1:标题+缩略图,2: 标题+三张高清大图,3:保留 4:仅有标题)
is_ads int 1: 不是广告推广, 2: 是广告推广
resource_info array 资源信息,img_arr:高清大图, thumbnamil_img:缩略图
comment_count int 文章下的评论总数
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注