TopicApi.create
注意:该接口需要管理员权限才能调用。
发布话题。
方法定义
TopicApi.create(param: CreateParams): Promise<TopicResponse>
参数
CreateParams TopicApi.ts:27
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
cover | 是 | File | 封面图片 |
description | 是 | string | 话题描述 |
include | 否 | string | 响应中需要包含的关联数据,用 |
name | 是 | string | 话题名称 |
响应
TopicResponse models.ts:1952
参数名 | 类型 | 说明 |
---|---|---|
code | number | 无任何错误时,状态码为 0 |
data | Topic |
Topic models.ts:1866
参数名 | 类型 | 说明 |
---|---|---|
article_count | number | 文章数量 |
cover | TopicCover | |
delete_time | number | 🔐删除时间 |
description | string | 话题描述 |
follower_count | number | 关注者数量 |
name | string | 话题名称 |
question_count | number | 提问数量 |
relationships | TopicRelationship | |
topic_id | number | 话题ID |
TopicCover models.ts:1899
参数名 | 类型 | 说明 |
---|---|---|
large | string | 大型封面地址 |
middle | string | 中型封面地址 |
original | string | 封面原图地址 |
small | string | 小型封面地址 |
TopicRelationship models.ts:1945
参数名 | 类型 | 说明 |
---|---|---|
is_following | boolean | 当前登录用户是否已关注该话题 |