Statuses/batch timeline
目录 |
statuses/batch_timeline
根据传递进来的用户ids参数,获取指定用户的微博timeline。
URL
http://api.t.sina.com.cn/statuses/batch_timeline.(json%7Cxml)
支持格式
XML/JSON
HTTP请求方式
GET
是否需要登录
true
关于授权机制,参见授权机制声明
请求数限制
true
关于请求数限制,参见接口访问权限说明
请求参数
必选 | 类型及范围 | 说明 | |
---|---|---|---|
source | true | string | 申请应用时分配的AppKey,调用接口时候代表应用的唯一身份。(采用OAuth授权方式不需要此参数) |
user_id | false | int64 | 用户ID,一次最多20个。 |
screen_name | false | string | 用户昵称,一次最多20个。 |
count | false | int | 指定要返回的记录条数。默认20,最大200 |
page | false | int | 指定返回结果的页码。默认1。 |
base_app | false | int | 是否基于当前应用来获取数据。1为限制本应用微博,0为不做限制。默认为0。 |
feature | false | int | 微博类型,0全部,1原创,2图片,3视频,4音乐. 返回指定类型的微博信息内容。 |
注意事项
- user_id、screen_name参数二者必选其一,且只能选其一。
返回结果
XML示例
<?xml version="1.0" encoding="UTF-8"?> //成功返回: <statuse> <status> <created_at>Wed Dec 15 09:53:00 +0800 2010</created_at > <id>4460157511</id> <text>手机成功认证咯~~</text> <source><a href=\"http://t.sina.com.cn\" rel=\"nofollow\">新浪微博</a></souce> <favorite>false</favorite> <truncated>false</truncated> <in_reply_to_status_id /> <in_reply_to_user_id /> <in_reply_to_screen_name /> <reposts_count /> <comments_count /> <mid /> <geo>null</geo> <user> <id>1642466141</id> <screen_name>huchao</screen_name> <name>huchao</name> <province>11</province> <city>8</city> <location>北京 海淀区</location> <description>很不给力的80后小青年一枚</description> <url>http://tuoniao.org</url> <profile_image_url>http://tp2.sinaimg.cn/1642466141/50/1285424071/1</profile_image_url> <profile_image_url_large>http://tp2.sinaimg.cn/1642466141/50/1285424071/1</profile_image_url_large> <domain>westy</domain> <gender>m</gender> <followers_count>129</followers_count> <friends_count>80</friends_count> <statuses_count>370</statuses_count> <favourites_count>3</favourites_count> <created_at>Fri Aug 28 00:00:00 +0800 2009</created_at> <following>false</following> <follow_me>false</follow_me> <verified>false</verified> <verified_reason>false</verified_reason> <online_status><online_status> <allow_all_act_msg>false</allow_all_act_msg> <geo_enabled>true</geo_enabled> </user> <annotations /> </status> </statuses> //失败返回: <err_info> <hash> <request>/account/profile/education.xml</request>//调用地址 <error_code>500</error_code>//错误代码 <error>50001:Error: system error!</error>//错误信息 </hash> <hash /> …… </err_info>
JSON示例
[ { "idstr":"11681", "created_at":"Thu Mar 17 11:27:47 +0800 2011", "id":11681, "text":"@api?? hello", "source":"<a href=\"\" rel=\"nofollow\">未通过审核应用</a>", "favorited":false, "in_reply_to_status_id":"", "in_reply_to_user_id":"", "in_reply_to_screen_name":"", "geo": { "type": "Point", "coordinates": [ 0.0, 0.0 ] }, "user": { "id":1734528095, "screen_name":"jkl0000", "name":"jkl0000", "province":"12", "city":"5", "location":"天津 河北区", "description":"", "url":"http://blog.sina.com.cn/jkl0000", "profile_image_url":"http://tp4.sinaimg.cn/1734528095/50/0/1", "domain":"", "gender":"m", "followers_count":3, "friends_count":4, "statuses_count":72, "favourites_count":0, "bi_followers_count":3, "created_at":"Sat Mar 05 00:00:00 +0800 2011", "following":false, "verified":false, "allow_all_act_msg":false, "allow_all_comment":false, "follow_me":false, "avatar_large":"", "verified_reason":"", "online_status":0 }, "reposts_count":0, "comments_count":0, "mid":"2111103175152" }, { "idstr":"10653", "created_at":"Wed Mar 16 00:08:53 +0800 2011", "id":10653, "text":"trace=true3", "source":"<a href=\"\" rel=\"nofollow\">未通过审核应用</a>", "favorited":false, "in_reply_to_status_id":"", "in_reply_to_user_id":"", "in_reply_to_screen_name":"", "geo": { "type": "Point", "coordinates": [ 0.0, 0.0 ] }, "user": { "id":1734528095, "screen_name":"jkl0000", "name":"jkl0000", "province":"12", "city":"5", "location":"天津 河北区", "description":"", "url":"http://blog.sina.com.cn/jkl0000", "profile_image_url":"http://tp4.sinaimg.cn/1734528095/50/0/1", "domain":"", "gender":"m", "followers_count":4, "friends_count":5, "statuses_count":71, "favourites_count":0, "bi_followers_count":3, "created_at":"Sat Mar 05 00:00:00 +0800 2011", "following":false, "verified":false, "allow_all_act_msg":false, "allow_all_comment":false, "follow_me":false, "avatar_large":"", "verified_reason":"", "online_status":0 }, "reposts_count":0, "comments_count":0, "mid":"2111103165006" }, { "idstr":"10505", "created_at":"Tue Mar 15 22:04:34 +0800 2011", "id":10505, "text":"trace=true", "source":"<a href=\"\" rel=\"nofollow\">未通过审核应用</a>", "favorited":false, "in_reply_to_status_id":"", "in_reply_to_user_id":"", "in_reply_to_screen_name":"", "geo": { "type": "Point", "coordinates": [ 0.0, 0.0 ] }, "user": { "id":1734528095, "screen_name":"jkl0000", "name":"jkl0000", "province":"12", "city":"5", "location":"天津 河北区", "description":"", "url":"http://blog.sina.com.cn/jkl0000", "profile_image_url":"http://tp4.sinaimg.cn/1734528095/50/0/1", "domain":"", "gender":"m", "followers_count":4, "friends_count":5, "statuses_count":70, "favourites_count":0, "bi_followers_count":3, "created_at":"Sat Mar 05 00:00:00 +0800 2011", "following":false, "verified":false, "allow_all_act_msg":false, "allow_all_comment":false, "follow_me":false, "avatar_large":"", "verified_reason":"", "online_status":0 }, "reposts_count":0, "comments_count":0, "mid":"2111103155730" }, ]
其他
无
文档更新时间: 2011-03-17