ArticleApi.addVote
注意:该接口需要登陆后才能调用。
为文章投票。
方法定义
ArticleApi.addVote(param: AddVoteParams): Promise<VoteCountResponse>
参数
AddVoteParams ArticleApi.ts:34
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
article_id |
是 | number |
文章ID |
type |
是 | string |
投票类型 取值范围包括: |
响应
VoteCountResponse models.ts:2332
参数名 | 类型 | 说明 |
---|---|---|
code |
number |
无任何错误时,状态码为 0 |
data |
VoteCount |
VoteCount models.ts:2317
参数名 | 类型 | 说明 |
---|---|---|
vote_count |
number |
投票目标获得的总投票量(赞成票 - 反对票),结果可以为负数 |
vote_down_count |
number |
反对票总数 |
vote_up_count |
number |
赞成票总数 |