Statuses/counts
(→返回结果) |
|||
第28行: | 第28行: | ||
<id>32817222</id> | <id>32817222</id> | ||
<comments>10</comments> | <comments>10</comments> | ||
− | <rt>21</rt > | + | <nowiki><rt>21</rt ></nowiki> |
</count> | </count> | ||
<count> | <count> | ||
<id>214672651</id> | <id>214672651</id> | ||
<comments>123</comments> | <comments>123</comments> | ||
− | <rt>129</rt > | + | <nowiki><rt>129</rt ></nowiki> |
</count> | </count> | ||
</counts> | </counts> | ||
第46行: | 第46行: | ||
"rt":0} | "rt":0} | ||
] | ] | ||
− | |||
===使用示例: === | ===使用示例: === |
2010年1月13日 (三) 16:00的版本
目录 |
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> <rt>21</rt > </count> <count> <id>214672651</id> <comments>123</comments> <rt>129</rt > </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