提问列表
示例
{
"code": 0,
"data": [
{
"question_id": 1,
"user_id": 1,
"title": "请问作者开发了哪些软件?",
"content_markdown": "如题",
"content_rendered": "<p>如题</p>",
"comment_count": 6,
"answer_count": 18,
"follower_count": 12,
"vote_count": 44,
"vote_up_count": 96,
"vote_down_count": 52,
"last_answer_time": 1563512214,
"create_time": 1563512214,
"update_time": 1563512214,
"delete_time": 0,
"relationships": {
"user": {
"user_id": 1,
"username": "zdhxiong",
"headline": "mdui作者",
"avatar": {
"original": "https://mdclub.org/user-avatar/c4/ca/bc03445db47540eea79148252e7a91fe.jpg",
"small": "https://mdclub.org/user-avatar/c4/ca/bc03445db47540eea79148252e7a91fe_small.jpg",
"middle": "https://mdclub.org/user-avatar/c4/ca/bc03445db47540eea79148252e7a91fe_middle.jpg",
"large": "https://mdclub.org/user-avatar/c4/ca/bc03445db47540eea79148252e7a91fe_large.jpg"
}
},
"topics": [
{
"topic_id": 1,
"name": "MDClub",
"cover": {
"original": "https://mdclub.org/topic-cover/c4/ca/bc03445db47540eea79148252e7a91fe.jpg",
"small": "https://mdclub.org/topic-cover/c4/ca/bc03445db47540eea79148252e7a91fe_small.jpg",
"middle": "https://mdclub.org/topic-cover/c4/ca/bc03445db47540eea79148252e7a91fe_middle.jpg",
"large": "https://mdclub.org/topic-cover/c4/ca/bc03445db47540eea79148252e7a91fe_large.jpg"
}
}
],
"is_following": true,
"voting": "up"
}
}
],
"pagination": {
"page": 1,
"per_page": 15,
"previous": null,
"next": 2,
"total": 124,
"pages": 9
}
}
参数说明
参数名 |
类型 |
说明 |
code |
integer |
无任何错误时,状态码为 0
|
data[].question_id |
integer |
提问ID
|
data[].user_id |
integer |
用户ID
|
data[].title |
string |
提问标题
|
data[].content_markdown |
string |
Markdown 格式的提问内容
|
data[].content_rendered |
string |
HTML 格式的提问内容
|
data[].comment_count |
integer |
评论数量
|
data[].answer_count |
integer |
回答数量
|
data[].follower_count |
integer |
关注者数量
|
data[].vote_count |
integer |
投票数(赞成票 - 反对票,可能为负数)
|
data[].vote_up_count |
integer |
赞成票总数
|
data[].vote_down_count |
integer |
反对票总数
|
data[].last_answer_time |
integer |
最后回答时间
|
data[].create_time |
integer |
创建时间
|
data[].update_time |
integer |
更新时间(更新提问本身,或在提问下发表回答,都会更新该字段)
|
data[].delete_time |
integer |
🔐删除时间
|
data[].relationships.user.user_id |
integer |
用户ID
|
data[].relationships.user.username |
string |
用户名
|
data[].relationships.user.headline |
string |
一句话介绍
|
data[].relationships.user.avatar.original |
string |
头像原图地址
|
data[].relationships.user.avatar.small |
string |
小头像地址
|
data[].relationships.user.avatar.middle |
string |
中头像地址
|
data[].relationships.user.avatar.large |
string |
大头像地址
|
data[].relationships.topics[].topic_id |
integer |
话题 ID
|
data[].relationships.topics[].name |
string |
话题名称
|
data[].relationships.topics[].cover.original |
string |
封面原图地址
|
data[].relationships.topics[].cover.small |
string |
小型封面地址
|
data[].relationships.topics[].cover.middle |
string |
中型封面地址
|
data[].relationships.topics[].cover.large |
string |
大型封面地址
|
data[].relationships.is_following |
boolean |
当前登录用户是否已关注该提问
|
data[].relationships.voting |
string |
当前登录用户的投票类型(up 、down ),未投过票则为空字符串
取值范围包括:up , down ,
|
pagination.page |
integer |
当前页码
|
pagination.per_page |
integer |
每页条数
|
pagination.previous |
integer |
上一页页码,为 null 表示没有上一页
|
pagination.next |
integer |
下一页页码,为 null 表示没有下一页
|
pagination.total |
integer |
数据总数
|
pagination.pages |
integer |
总页数
|