Rest API
(创建新页面为 '<big>'''新浪微博 Rest API文档'''</big> == 获取下行数据集(timeline)接口 == *statuses/public_timeline 最新公共微博 *statuses/friends_timeline 最新…') |
|||
第1行: | 第1行: | ||
<big>'''新浪微博 Rest API文档'''</big> | <big>'''新浪微博 Rest API文档'''</big> | ||
== 获取下行数据集(timeline)接口 == | == 获取下行数据集(timeline)接口 == | ||
− | *[[statuses/public_timeline]] | + | *[[statuses/public_timeline]] 获取最新更新的公共微博消息 |
− | *[[statuses/friends_timeline]] | + | *[[statuses/friends_timeline]] 获取当前用户所关注用户的最新微博信息 (别名: statuses/home_timeline) |
− | *[[statuses/user_timeline]] | + | *[[statuses/user_timeline]] 获取用户发布的微博信息列表 |
− | *[[statuses/mentions]] | + | *[[statuses/mentions]] 获取@当前用户的微博列表 |
− | *[[statuses/comments_timeline]] | + | *[[statuses/comments_timeline]] 获取当前用户发送及收到的评论列表 |
− | *[[statuses/comments_by_me]] | + | *[[statuses/comments_by_me]] 获取当前用户发出的评论 |
− | *[[statuses/comments]] | + | *[[statuses/comments]] 获取指定微博的评论列表 |
*[[statuses/counts]] 批量获取一组微博的评论数及转发数 | *[[statuses/counts]] 批量获取一组微博的评论数及转发数 | ||
− | *[[statuses/unread]] | + | *[[statuses/unread]] 获取当前用户未读消息数 |
== 微博访问接口 == | == 微博访问接口 == | ||
− | *[[statuses/show]] | + | *[[statuses/show]] 根据ID获取单条微博信息内容 |
− | *[[user/status/id]] | + | *[[user/status/id]] 根据微博ID和用户ID跳转到单条微博页面 |
− | *[[statuses/update]] | + | *[[statuses/update]] 发布一条微博信息 |
− | *[[statuses/upload]] | + | *[[statuses/upload]] 上传图片并发布一条微博信息 |
− | *[[statuses/destroy]] | + | *[[statuses/destroy]] 删除一条微博信息 |
− | *[[statuses/repost]] | + | *[[statuses/repost]] 转发一条微博信息(可加评论) |
− | *[[statuses/comment]] | + | *[[statuses/comment]] 对一条微博信息进行评论 |
− | *[[statuses/comment_destroy]] | + | *[[statuses/comment_destroy]] 删除当前用户的微博评论信息 |
− | *[[statuses/reply]] | + | *[[statuses/reply]] 回复微博评论信息 |
== 用户接口 == | == 用户接口 == | ||
− | *[[users/show]] | + | *[[users/show]] 根据用户ID获取用户资料(授权用户) |
− | *[[statuses/friends]] | + | *[[statuses/friends]] 获取当前用户关注对象列表及最新一条微博信息 |
− | *[[statuses/followers]] | + | *[[statuses/followers]] 获取当前用户粉丝列表及最新一条微博信息 |
== 私信接口 == | == 私信接口 == | ||
− | *[[direct_messages]] | + | *[[direct_messages]] 获取当前用户最新私信列表 |
− | *[[direct_messages/sent]] | + | *[[direct_messages/sent]] 获取当前用户发送的最新私信列表 |
− | *[[direct_messages/new]] | + | *[[direct_messages/new]] 发送一条私信 |
*[[direct_messages/destroy]] 删除一条私信 | *[[direct_messages/destroy]] 删除一条私信 | ||
第37行: | 第37行: | ||
*[[friendships/destroy]] 取消关注 | *[[friendships/destroy]] 取消关注 | ||
*[[friendships/exists]] 是否关注某用户(推荐使用friendships/show) | *[[friendships/exists]] 是否关注某用户(推荐使用friendships/show) | ||
− | *[[friendships/show]] | + | *[[friendships/show]] 获取两个用户关系的详细情况 |
== Social Graph接口== | == Social Graph接口== | ||
− | *[[friends/ids ]] | + | *[[friends/ids ]] 获取用户关注对象uid列表 |
− | *[[followers/ids ]] | + | *[[followers/ids ]] 获取用户粉丝对象uid列表 |
== 账号接口 == | == 账号接口 == | ||
− | *[[account/verify_credentials]] | + | *[[account/verify_credentials]] 验证当前用户身份是否合法 |
− | *[[account/rate_limit_status]] | + | *[[account/rate_limit_status]] 获取当前用户API访问频率限制 |
− | *[[account/end_session]] | + | *[[account/end_session]] 当前用户退出登录 |
*[[account/update_profile_image]] 更改头像 | *[[account/update_profile_image]] 更改头像 | ||
*[[account/update_profile]] 更改资料 | *[[account/update_profile]] 更改资料 | ||
第52行: | 第52行: | ||
== 收藏接口 == | == 收藏接口 == | ||
− | *[[favorites]] | + | *[[favorites]] 获取当前用户的收藏列表 |
*[[favorites/create]] 添加收藏 | *[[favorites/create]] 添加收藏 | ||
− | *[[favorites/destroy]] | + | *[[favorites/destroy]] 删除当前用户收藏的微博信息 |
== 登录/OAuth接口 == | == 登录/OAuth接口 == | ||
− | *[[oauth]] | + | *[[oauth]] OAuth授权方式介绍 |
− | *[[oauth/request_token]] | + | *[[oauth/request_token]] 获取未授权的Request Token |
− | *[[oauth/authorize]] | + | *[[oauth/authorize]] 请求用户授权Token |
− | *[[oauth/access_token]] | + | *[[oauth/access_token]] 获取授权过的Access Token |
== 重要字段说明 == | == 重要字段说明 == | ||
− | *[[status]] | + | *[[status]] 微博信息内容 |
− | *[[user]] | + | *[[user]] 用户资料信息 |
− | *[[comment]] | + | *[[comment]] 评论信息描述 |
− | *[[direct_message]] | + | *[[direct_message]] 私信信息 |
*[[省份城市编码表]] | *[[省份城市编码表]] |
2010年5月31日 (一) 12:00的版本
新浪微博 Rest API文档
目录 |
获取下行数据集(timeline)接口
- statuses/public_timeline 获取最新更新的公共微博消息
- statuses/friends_timeline 获取当前用户所关注用户的最新微博信息 (别名: statuses/home_timeline)
- statuses/user_timeline 获取用户发布的微博信息列表
- statuses/mentions 获取@当前用户的微博列表
- statuses/comments_timeline 获取当前用户发送及收到的评论列表
- statuses/comments_by_me 获取当前用户发出的评论
- statuses/comments 获取指定微博的评论列表
- statuses/counts 批量获取一组微博的评论数及转发数
- statuses/unread 获取当前用户未读消息数
微博访问接口
- statuses/show 根据ID获取单条微博信息内容
- user/status/id 根据微博ID和用户ID跳转到单条微博页面
- statuses/update 发布一条微博信息
- statuses/upload 上传图片并发布一条微博信息
- statuses/destroy 删除一条微博信息
- statuses/repost 转发一条微博信息(可加评论)
- statuses/comment 对一条微博信息进行评论
- statuses/comment_destroy 删除当前用户的微博评论信息
- statuses/reply 回复微博评论信息
用户接口
- users/show 根据用户ID获取用户资料(授权用户)
- statuses/friends 获取当前用户关注对象列表及最新一条微博信息
- statuses/followers 获取当前用户粉丝列表及最新一条微博信息
私信接口
- direct_messages 获取当前用户最新私信列表
- direct_messages/sent 获取当前用户发送的最新私信列表
- direct_messages/new 发送一条私信
- direct_messages/destroy 删除一条私信
关注接口
- friendships/create 关注某用户
- friendships/destroy 取消关注
- friendships/exists 是否关注某用户(推荐使用friendships/show)
- friendships/show 获取两个用户关系的详细情况
Social Graph接口
- friends/ids 获取用户关注对象uid列表
- followers/ids 获取用户粉丝对象uid列表
账号接口
- account/verify_credentials 验证当前用户身份是否合法
- account/rate_limit_status 获取当前用户API访问频率限制
- account/end_session 当前用户退出登录
- account/update_profile_image 更改头像
- account/update_profile 更改资料
- account/register 注册新浪微博帐号
收藏接口
- favorites 获取当前用户的收藏列表
- favorites/create 添加收藏
- favorites/destroy 删除当前用户收藏的微博信息
登录/OAuth接口
- oauth OAuth授权方式介绍
- oauth/request_token 获取未授权的Request Token
- oauth/authorize 请求用户授权Token
- oauth/access_token 获取授权过的Access Token
重要字段说明
- status 微博信息内容
- user 用户资料信息
- comment 评论信息描述
- direct_message 私信信息
- 省份城市编码表