Statuses/counts
第12行: | 第12行: | ||
===请求数限制:=== | ===请求数限制:=== | ||
− | true | + | true |
− | + | ===请求参数=== | |
− | + | ||
− | + | ||
− | === 请求参数=== | + | |
* ids. 必填参数. 微博ID号列表,用逗号隔开 | * ids. 必填参数. 微博ID号列表,用逗号隔开 | ||
− | o | + | o 示例: http://api.t.sina.com.cn/statuses/counts.xml?ids=32817222,214672651 |
− | + | ||
− | === | + | ===使用说明=== |
− | + | * 缺少参数返回403 | |
+ | |||
+ | ===返回结果=== | ||
+ | XML示例: | ||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
<counts> | <counts> | ||
第36行: | 第36行: | ||
</count> | </count> | ||
</counts> | </counts> | ||
+ | |||
+ | JSON示例: | ||
+ | [ | ||
+ | {"id":-1, | ||
+ | "comments":0, | ||
+ | "rt":0}, | ||
+ | {"id":-1, | ||
+ | "comments":0, | ||
+ | "rt":0} | ||
+ | ] | ||
+ | |||
===使用示例: === | ===使用示例: === | ||
− | curl -u user:password http://api.t.sina.com.cn/statuses/counts.xml | + | |
+ | * xml: | ||
+ | curl -u user:password http://api.t.sina.com.cn/statuses/counts.xml | ||
+ | |||
+ | * json: | ||
+ | curl -u user:password http://api.t.sina.com.cn/statuses/counts.json |
2010年1月11日 (一) 11:23的版本
目录 |
statuses/counts
批量统计微博的评论数,转发数,一次请求最多获取100个。
URL:
http://api.t.sina.com.cn/statuses/counts.format
格式:
xml, json
是否需要登录:
GET
请求数限制:
true
请求参数
- ids. 必填参数. 微博ID号列表,用逗号隔开
o 示例: http://api.t.sina.com.cn/statuses/counts.xml?ids=32817222,214672651
使用说明
- 缺少参数返回403
返回结果
XML示例:
<?xml version="1.0" encoding="UTF-8"?> <counts> <count> <id>32817222</id> <comments>10</comments> </count> <count> <id>214672651</id> <comments>123</comments> </count> </counts>
JSON示例:
[ {"id":-1, "comments":0, "rt":0}, {"id":-1, "comments":0, "rt":0} ]
使用示例:
- xml:
curl -u user:password http://api.t.sina.com.cn/statuses/counts.xml
- json:
curl -u user:password http://api.t.sina.com.cn/statuses/counts.json