You need to enable JavaScript to run this app.
导航

GetTopicDetail - 专题内容获取

最近更新时间2024.03.12 15:04:16

首次发布时间2024.03.01 10:48:28

根据内容推荐接口返回的GroupType字段,判断内容是否是topic类型,进而将专题ID作为入参,调用该接口来获取专题详情。

请求说明

  • 请求方式:POST
  • 请求地址:https://cms.volcengineapi.com?Action=GetTopicDetail&Version=2021-01-01
  • 请求头:ServiceName: volc_content_api

调试

请求参数

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

Query

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

GetTopicDetail

要执行的操作,取值:GetTopicDetail

Version
String

2021-01-01

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

Body

参数
类型
是否必填
示例值
描述
TopicId
Long

专题ID。

返回参数

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

参数
类型
示例值
描述
Data
TopicData

响应数据。

请求示例

{
"TopicId":1787618957483***
}

返回示例

{
    "ResponseMetadata": {
        "RequestId": "20240115171233FF43686580AE19A60***",
        "Action": "GetTopicDetail",
        "Version": "2021-01-01",
        "Service": "volc_content_api",
        "Region": "cn-north-1"
    },
    "Data": {
        "Topic": {
            "Info": {
                "TopicId": 1787618957483044,
                "TopicSource": "toutiao_api",
                "OpenId": "7321515110374375435",
                "TopicName": "**活动状态-",
                "Description": "",
                "CoverImgUrl": "http://p3-open.onewsimg.com/2b28f000370774e5fabc5~tplv-5h8***apgf-1.image",
                "ShareImgUrl": "",
                "LandingPageUrl": "",
                "ExtInfo": ""
            },
            "TopicBlockList": [
                {
                    "TopicId": 1787618957483044,
                    "BlockId": 1787619384397833,
                    "BlockName": "专题内容",
                    "BlockType": "stream",
                    "ShowNum": 5,
                    "TotalNum": 2,
                    "ArticleList": [
                        {
                            "GroupId": 1787618635979930,
                            "Title": "***",
                            "Author": {
                                "AuthorName": "***",
                                "AuthorAvatarUrl": "https://p6-open-sign.onewsimg.com/user-avatar/35433648f1***838473ce38788d93026~tplv-tt-cs0:300:300.jpeg?scene=core&x-expires=1767878305&x-signature=LgVIkk77boq4sRS1ccMmhIF%2F2jw%3D",
                                "AuthorId": "1787618635980970",
                                "Description": "",
                                "HomePage": "https://open.toutiao.com/u2212659635431767/?utm_source=***",
                                "FollowerCount": 0,
                                "AuthorBizId": "2212659635431767"
                            },
                            "GroupType": "article",
                            "GenerateType": "toutiao_api",
                            "PublishTime": 1704349510,
                            "Abstract": "***",
                            "OpenId": "7320117465998950947",
                            "Tags": [
                                "影视",
                                "娱乐"
                            ],
                            "CoverImages": [
                                {
                                    "Url": "https://p9-open-sign.onewsimg.com/tos-cn-i-twdt4qpehh/41e94bf245084de7***528093cff7b35~tplv-tt-cs0:919:659.jpeg?lk3s=4f490a55&scene=torchlight&x-expires=1767878305&x-signature=74dgJQ0AUKZP4dXhVRHYeAI5EI4%3D",
                                    "Height": 659,
                                    "Weight": 919,
                                    "Width": 919
                                }
                            ],
                            "Extra": "",
                            "Link": "https://open.toutiao.com/a7320117465998950947/?utm_source=***",
                            "DiggCount": 3,
                            "CommentCount": 2,
                            "CommentUrl": "https://open.toutiao.com/a7320117465998950947/comment/?utm_source=***",
                            "Content": "",
                            "GroupAudios": [
                                {
                                    "Url": "https://open.toutiao.com/video/url/?param=***&partner=***&version=3",
                                    "OpenId": "7320155741061382682",
                                    "AudioSize": 0,
                                    "Duration": 306
                                }
                            ],
                            "ReadCount": 454
                        },
                     ...
                    ],
                    "ShowBlockName": false
                }
            ]
        }
    },
    "BaseResp": {
        "StatusMessage": "success",
        "StatusCode": 1000
    }
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

状态码
错误码
错误信息
说明
200
1001
参数错误

返回具体的参数错误描述

200
1002
服务未知错误

请联系火山引擎技术人员