获取文章列表

接口描述:

  • 获取文章列表。

请求 URL:

  • http|https://host/api/v1/article/method/get.article.list/

请求方式:

  • GET
  • POST

是否授权:

  • 需要授权

业务参数:

参数名 类型 是否必须 范围值 默认值 示例值 描述
article_cat_id integer gt:0 1 文章分类编号
title string max:200 标题 文章标题
keywords string max:255 关键词 文章关键词
is_top integer in:0,1 1 是否置顶 0=否 1=是
status integer in:0,1 1 文章状态 0=禁用 1=启用
page_no integer gt:0 1 1 页码
page_size integer gt:0 15 15 每页数量
order_type string in:asc,desc desc asc 排序方式
order_field string 见附属 A article_id status 排序字段

附属 A: in:article_id,article_cat_id,title,source,is_top,status,create_time,update_time

响应参数:

参数名 类型 是否返回 示例值 描述
status integer 200 状态码
message string success 消息信息
data object [] 返回对象
data 类型 是否返回 示例值 描述
items array [] 列表项
total_result integer 17 合计计数
items 类型 是否返回 示例值 描述
article_id integer 22 文章编号
article_cat_id integer 1 文章分类编号
title string 标题 文章标题
image string //host/image.jpg 文章封面
source string 网易 文章来源
source_url string www.163.com 来源地址
keywords string 关键词 文章关键词
description string 描述 文章描述
url string http://163.com 外部连接
target string _self 打开方式
page_views integer 1 游览量
is_top integer 0 是否置顶 0=否 1=是
status integer 1 文章状态 0=禁用 1=启用
create_time datetime 2018-05-03 23:37:06 创建时间
update_time datetime 2018-05-03 23:37:06 更新时间
get_article_cat object [] 文章分类对象
get_article_cat 类型 是否返回 示例值 描述
cat_name string 公告 文章分类名称
cat_type integer 0 文章分类类型(自定义)

响应示例:

  1. {
  2. "status": 200,
  3. "message": "success",
  4. "data": {
  5. "items": [
  6. {
  7. "article_id": 23,
  8. "article_cat_id": 1,
  9. "title": "标题",
  10. "image": "//host/image.jpg",
  11. "source": "网易",
  12. "source_url": "www.163.com",
  13. "keywords": "关键词",
  14. "description": "描述",
  15. "url": "http://163.com",
  16. "target": "_self",
  17. "page_views": 0,
  18. "is_top": 0,
  19. "status": 1,
  20. "create_time": "2018-05-03 23:42:48",
  21. "update_time": "2018-05-03 23:42:48",
  22. "get_article_cat": {
  23. "cat_name": "A1",
  24. "cat_type": 0
  25. }
  26. },
  27. {
  28. "article_id": 22,
  29. "article_cat_id": 1,
  30. "title": "标题",
  31. "image": "//host/image.jpg",
  32. "source": "网易",
  33. "source_url": "www.163.com",
  34. "keywords": "关键词",
  35. "description": "描述",
  36. "url": "http://163.com",
  37. "target": "_self",
  38. "page_views": 3,
  39. "is_top": 0,
  40. "status": 1,
  41. "create_time": "2018-05-03 23:37:06",
  42. "update_time": "2018-05-03 23:57:18",
  43. "get_article_cat": {
  44. "cat_name": "A1",
  45. "cat_type": 0
  46. }
  47. }
  48. ],
  49. "total_result": 17
  50. }
  51. }

备注:

  1. 该接口支持条件搜索,如果不带入业务参数则使用默认值。