You need to enable JavaScript to run this app.
导航
ContentTopics - 专题分发
最近更新时间:2024.06.18 12:13:52首次发布时间:2024.06.18 12:13:52

本文档将介绍如何获取专题列表和专题详情。

使用场景

内容定制为客户提供专题管理能力,通过控制台支持客户,筛选围绕当下大事件的信息聚合和解读的专题,并支持管理专题内容的能力。
【功能价值】

  • 丰富客户APP的整体内容流形式,增加内容的展示形式和聚合形式,提升用户的消费渗透。
  • 通过专题能力,可以帮助客户发现行业专题事件,构建实时专题,提升用户体验。

请求说明

  • 请求方式:GET
  • 请求地址:https://mercury.volcengineapi.com/?Action=ContentTopics&Version=2021-01-01
  • 请求头:ServiceName:content

调试

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数

参数
类型
是否必填
示例值
描述
Action
String

ContentTopics

要执行的操作,取值:ContentTopics。

Version
String

2021-01-01

API的版本,取值:2021-01-01。

Partner
String

demo_default_content

渠道号。

AccessToken
String

AT6zTZuXzffKpQamer***v8mp94LR2ARdNJBp2BT86GrLpa3brqLmscGCUipuJNh2piKTT12

用户身份标识,需要通过用户注册接口获取。

HotTopicId
String

7377197329xxx024883

专题ID。

  • 当获取专题列表时,不传;
  • 当获取专题详情时,必填

返回参数

下表仅列出本接口特有的返回参数。更多信息请参见返回结构

参数
类型
示例值
描述
Result
Array of TopicInfo

专题列表/专题详情。

  • 获取专题列表时,result为List。
  • 获取专题详情时,result为对象。

请求示例 1

GET /?Action=ContentTopics&Version=2021-01-01&Partner=demo_default_content&AccessToken=AT6zTZuXzffKpQamer***v8mp94LR2ARdNJBp2BT86GrLpa3brqLmscGCUipuJNh2piKTT12 HTTP/1.1
Host: https://mercury.volcengineapi.com/?Action=ContentTopics&Version=2021-01-01
X-Date: 20240618T030549Z
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20240618/cn-beijing/content/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f

返回示例 1

{
  "ResponseMetadata": {
    "RequestId": "2024061811060104***17E34E2D6D51AC9",
    "Action": "ContentTopics",
    "Version": "2021-01-01",
    "Service": "content",
    "Region": "cn-north-1",
    "Error": {
      "CodeN": 0,
      "Code": "",
      "Message": ""
    }
  },
  "Result": [
    {
      "GroupId": "7381251969261764643",
      "Title": "专题标题",
      "Category": "daily_info",
      "Introduction": "",
      "ArticleUrl": "xxx",
      "CoverImages": [
        {
          "Url": "xxx",
          "Height": 960,
          "Width": 540
        }
      ],
      "PublishTime": 1718583291,
      "Blocks": []
    }
  ]
}

请求示例 2

GET /?Action=ContentTopics&Version=2021-01-01&Partner=demo_default_content&AccessToken=AT6zTZuXzffKpQamer***v8mp94LR2ARdNJBp2BT86GrLpa3brqLmscGCUipuJNh2piKTT12&HotTopicId=7377197329xxx024883 HTTP/1.1
Host: https://mercury.volcengineapi.com/?Action=ContentTopics&Version=2021-01-01
X-Date: 20240618T030739Z
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20240618/cn-beijing/content/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f

返回示例 2

{
  "ResponseMetadata": {
    "RequestId": "20240618110814***90B4127FBEC67C26A",
    "Action": "ContentTopics",
    "Version": "2021-01-01",
    "Service": "content",
    "Region": "cn-north-1"
  },
  "Result": {
    "GroupId": "7380635816885800467",
    "Title": "专题标题",
    "Category": "none",
    "Introduction": "",
    "ArticleUrl": "专题H5落地页",
    "CoverImages": [
      {
        "Url": "封面图",
        "Height": 960,
        "Width": 540
      }
    ],
    "PublishTime": 1718623281,
    "Blocks": [
      {
        "Id": 1802110659420169,
        "Title": "",
        "Introduction": "",
        "BlockType": "activity",
        "Articles": [],
        "Activities": [
          {
            "ActivityId": 1802110659677226,
            "Component": {
              "Id": 1785055248728073,
              "Type": "pk",
              "Name": "组件名称",
              "Config": {
                "PkConfig": {
                  "Topic": "话题",
                  "Style": "mellow",
                  "Options": [
                    {
                      "Content": "观点1",
                      "ColorCode": "#E6FDFF"
                    },
                    {
                      "Content": "观点2",
                      "ColorCode": "#E8FFEF"
                    }
                  ]
                }
              }
            },
            "ActivityStatistics": {
              "PkActivityStatistics": {
                "TotalCount": 2,
                "OptionCount": [
                  1,
                  1
                ]
              }
            },
            "UserOperation": {
              "PkOperation": {
                "Selections": []
              }
            }
          }
        ]
      },
      {
        "Id": 1768138774616167,
        "Title": "",
        "Introduction": "",
        "BlockType": "article",
        "Articles": [
          {
            "Abstract": "内容摘要",
            "ArticleType": "短视频",
            "ArticleUrl": "内容H5页",
            "CommentUrl": "评论 H5页",
            "CoverImages": [
              {
                "Url": "封面图URL",
                "Height": 513,
                "Width": 659
              }
            ],
            "CoverMode": 1,
            "GroupId": "7381369145721487872",
            "HasVideo": true,
            "PublishTime": 1718611863,
            "ShareUrl": "分享H5页",
            "Title": "内容标题",
            "UserInfo": {
              "AvatarUrl": "作者头像",
              "Description": "",
              "Follow": false,
              "FollowerCount": 337,
              "HomePage": "作者主页H5页",
              "Name": "作者名称",
              "UserId": 3916910969231236,
              "UserVerified": false,
              "VerifiedContent": ""
            },
            "VideoWatchCount": 6,
            "IsStick": false,
            "HasAudio": false
          }
        ]
      }
    ]
  }
}

错误码

您可访问公共错误码,获取更多错误码信息。