开源中国 API
  1. 评论
开源中国 API
  • OSCHINA 开放平台Beta
  • 认证接口
    • oauth2_authorize
      GET
    • oauth2_token
      POST
  • 个人信息
    • openapi_user
      POST
    • user_information
      POST
    • my_information
      POST
    • portrait_update
      POST
    • friends_list
      POST
    • active_list
      POST
    • update_user_relation
      POST
  • 新闻
    • news_list
      POST
    • /action/openapi/news_detail
      POST
  • 帖子
    • post_list
      POST
    • post_pub
      POST
    • post_detail
      POST
  • 动弹
    • tweet_list
      POST
    • tweet_detail
      POST
    • tweet_pub
      POST
    • tweet_delete
      POST
  • 博客
    • blog_pub
    • blog_list
    • blog_recommend_list
    • blog_detail
    • user_blog_list
    • blog_catalog_list
  • 评论
    • blog_comment_list
      POST
    • blog_comment_pub
      POST
    • blog_comment_reply
      POST
    • user_blog_delete
      POST
    • comment_list
      POST
    • comment_pub
      POST
    • comment_reply
      POST
    • comment_delete
      POST
  • 收藏
    • favorite_list
    • favorite_add
    • favorite_remove
  • 软件
    • project_detail
    • project_catalog_list
    • project_list
    • project_tag_list
  • 私信
    • message_list
    • message_delete
  • 搜索
    • search_list
  • 通知
    • user_notice
    • clear_notice
  1. 评论

comment_list

POST
/action/openapi/comment_list
获取评论列表
是否需要登录
否
访问授权限制
暂无
授权范围(scope)
访问评论信息
注意事项
catalog为4的时候 查看私信列表必须提供access_token
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://www.oschina.net/action/openapi/comment_list' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id": "string",
    "catalog": "string",
    "access_token": "string",
    "page/pageIndex": "string",
    "pageSize": "string",
    "dataType": "string"
}'
响应示例响应示例
{
  "notice": {
    "replyCount": 0,
    "msgCount": 0,
    "fansCount": 0,
    "referCount": 0
  },
  "commentList": [
    {
      "content": "引用来自“张艺辰”的答案发fdsfsafdasfdsafds",
      "id": 174745,
      "pubDate": "2013-10-09 15:24:28.0",
      "client_type": 1,
      "replies": [],
      "commentAuthor": "张艺辰",
      "commentAuthorId": 253479,
      "refers": [
        {
          "refertitle": "引用来自“张艺辰”的答案",
          "referbody": "发"
        }
      ]
    },
    {
      "content": "发",
      "id": 174742,
      "pubDate": "2013-10-09 10:39:07.0",
      "client_type": 1,
      "replies": [
        {
          "rauthor": "张艺辰",
          "rpubDate": "2013-10-09 10:39:07.0",
          "rauthorId": 253479,
          "rcontent": "发"
        }
      ],
      "commentAuthor": "张艺辰",
      "commentAuthorId": 253479
    }
  ]
}

请求参数

Body 参数application/json
id
string 
必需
新闻ID/翻译ID/帖子ID/动弹ID/用户ID(私信中跟当前用户来往的ID)/博客ID
catalog
string 
必需
1-新闻/翻译|2-帖子|3-动弹|4-消息(私信 必须access_token)|5-博客
access_token
string 
可选
oauth2_token获取的access_token
page/pageIndex
string 
页数
必需
pageSize
string 
每页条数
必需
dataType
string 
必需
返回数据类型['json'|'jsonp'|'xml']
示例

返回响应

🟢200成功
application/json
Body
notice
object 
必需
replyCount
integer 
必需
msgCount
integer 
必需
fansCount
integer 
必需
referCount
integer 
必需
commentList
array [object {9}] 
必需
content
string 
评论内容
必需
id
integer 
评论ID
必需
pubDate
string 
发布日期
必需
client_type
integer 
必需
1-WEB、2-WAP、3-Android、4-IOS、5-WP
replies
array [object {4}] 
必需
commentAuthor
string 
评论人
必需
commentAuthorId
integer 
评论人ID
必需
commentPortrait
string 
评论人头像
必需
refers
array [object {2}] 
可选
修改于 2022-08-22 05:44:49
上一页
user_blog_delete
下一页
comment_pub
Built with