开源中国 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
      POST
    • blog_list
      POST
    • blog_recommend_list
      POST
    • blog_detail
      POST
    • user_blog_list
      POST
    • blog_catalog_list
      POST
  • 评论
    • blog_comment_list
    • blog_comment_pub
    • blog_comment_reply
    • user_blog_delete
    • comment_list
    • comment_pub
    • comment_reply
    • comment_delete
  • 收藏
    • 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. 个人信息

active_list

POST
/action/openapi/active_list
是否需要登录
是
访问授权限制
password
授权范围(scope)
访问用户信息
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://www.oschina.net/action/openapi/active_list' \
--header 'Content-Type: application/json' \
--data-raw '{
    "access_token": "string",
    "catalog": 0,
    "user": 0,
    "pageSize": 0,
    "page/pageIndex": 0,
    "dataType": "string"
}'
响应示例响应示例
{
  "post_list": [
    {
      "id": 82977,
      "author": "彭博",
      "pubDate": "2012-12-18 16:20:08.0",
      "title": "测试youku视频地址",
      "answerCount": 0,
      "authorid": 89964,
      "answer": "",
      "portrait": "http://static.oschina.net/uploads/user/44/89964_50.jpg?t=1376365607000",
      "viewCount": 12
    },
    {
      "id": 83123,
      "author": "彭博",
      "pubDate": "2013-05-24 10:34:40.0",
      "title": "测试站外活动",
      "answerCount": 0,
      "authorid": 89964,
      "answer": "",
      "portrait": "http://static.oschina.net/uploads/user/44/89964_50.jpg?t=1376365607000",
      "viewCount": 0
    }
  ],
  "notice": {
    "replyCount": 0,
    "msgCount": 0,
    "fansCount": 0,
    "referCount": 0
  }
}

请求参数

Body 参数application/json
access_token
string 
可选
oauth2_token获取的access_token catalog为4时不需要认证 其它都需要 否则提示失败
catalog
integer 
可选
类别ID [ 0、1所有动态,2提到我的,3评论,4我自己 ]
user
integer 
用户ID
必需
pageSize
integer 
每页条数
可选
page/pageIndex
integer 
页数
可选
dataType
string 
必需
返回数据类型['json'|'jsonp'|'xml']
示例

返回响应

🟢200成功
application/json
Body
post_list
array [object {20}] 
必需
id
integer 
动态ID
必需
author
string 
发布者
必需
pubDate
string 
pubDate
必需
title
string 
必需
answerCount
integer 
必需
authorid
integer 
发布者ID
必需
answer
string 
必需
portrait
string 
发布者用户头像地址
必需
viewCount
integer 
必需
catalog
string 
必需
动态分类:1-新闻、2-问答区(发布帖子、回复帖子)、3-动弹、4-博客(发博客,评论)、0-其它
appClient
integer 
必需
客户端类型:1-WEB、2-WAP、3-Android、4-IOS、5-WP
objectId
integer 
必需
动态对象id:动弹 帖子 博客ID (根据objectType区分)
objectType
integer 
必需
动态类型:1-开源软件、2-帖子、3-博客、4-新闻、5-代码、6-职位、7-翻译文章、8-翻译段落、16-新闻评论、17-讨论区答案、18-博客评论、19-代码评论、20-职位评论、21-翻译评论、32-职位评论、100-动弹、101-动弹回复
objectCatalog
integer 
必需
动态对象分类:1-普通帖子(问答),2-城市圈活动,3-城市圈讨论,4-话题,5-对帖子评论的回复
objectTitle
string 
必需
动态对象标题(动弹为空 帖子,博客的标题)
objectReply
array [object {2}] 
必需
url
string 
动态对象链接
必需
message
string 
动态对象内容
必需
tweetImage
string 
必需
动弹图片,catalog 为 3 时(即为动弹时)才可能存在
commentCount
integer 
评论数
必需
notice
object 
必需
replyCount
integer 
未读评论数
必需
msgCount
integer 
未读私信数
必需
fansCount
integer 
新增粉丝数
必需
referCount
integer 
未读@我数
必需
修改于 2022-08-22 04:11:09
上一页
friends_list
下一页
update_user_relation
Built with