获取一篇文章

接口描述:

  • 获取一篇文章。

请求 URL:

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

请求方式:

  • GET
  • POST

是否授权:

业务参数:

参数名 类型 是否必须 范围值 默认值 示例值 描述
article_id integer gt:0 22 文章编号

响应参数:

参数名 类型 是否返回 示例值 描述
status integer 200 状态码
message string success 消息信息
data object [] 返回对象
data 类型 是否返回 示例值 描述
article_id integer 22 文章编号
article_cat_id integer 1 文章分类编号
title string 标题 文章标题
image string //host/image.jpg 文章封面
content string 正文 文章内容
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 更新时间

响应示例:

  1. {
  2. "status": 200,
  3. "message": "success",
  4. "data": {
  5. "article_id": 22,
  6. "article_cat_id": 1,
  7. "title": "标题",
  8. "image": "//host/image.jpg",
  9. "content": "&正文",
  10. "source": "网易",
  11. "source_url": "www.163.com",
  12. "keywords": "关键词",
  13. "description": "描述",
  14. "url": "http://163.com",
  15. "target": "_self",
  16. "page_views": 1,
  17. "is_top": 0,
  18. "status": 1,
  19. "create_time": "2018-05-03 23:37:06",
  20. "update_time": "2018-05-03 23:57:18"
  21. }
  22. }

备注:

  1. url存在值表示跳转到某个地址,target表示目标打开方式。