Statuses/unread/en
目录 |
statuses/unread
Return the total number of all kinds of unread message of the authenticating user, including:
- Whether it has new weibo
- Number of the latest weibo metioned “me”
- New comments count
To restet the number to zeso, using statuses/reset_count/en。
URL
http://api.t.sina.com.cn/statuses/unread.(json%7Cxml)
Supported Formats
XML/JSON
HTTP Request Method
GET
Requires Authentication
true
See the Authorization Mechanism Statement for authorization details
Requests Count Limitation
true
See the Interface Access Rights Statement for the Request Count Limitaiton details.
Request Parameters
Requires | Type and Range | Description | |
---|---|---|---|
source | true | string | AppKey for the application to identify it. ( This parameter is not needed when using OAuth) |
with_new_status | false | int,默认为0。 | 1表示结果中包含new_status字段,0表示结果不包含new_status字段。new_status字段表示是否有新微博消息,1表示有,0表示没有 |
since_id | false | int64 | 参数值为微博id。该参数需配合with_new_status参数使用,返回since_id之后,是否有新微博消息产生 |
Notes
- 如果只传入since_id,而没有传入with_new_status参数,则返回结果与未传入任何参数时相同。
Example Request
- XML
- curl -u "username:password" "http://api.t.sina.com.cn/statuses/unread.xml?source=appkey&with_new_status=1&since_id=300000000"
- JSON
- curl -u "username:password" "http://api.t.sina.com.cn/statuses/unread.json?source=appkey&with_new_status=1&since_id=300000000"
Response
XML示例
<?xml version="1.0" encoding="UTF-8"?> <count> <new_status>1</new_status> <followers>0</followers> <dm>1</dm> <mentions>1</mentions> <comments>3</comments> </count>
JSON示例
{ "comments" : 3, "followers" : 0, "new_status" : 1, "dm" : 1, "mentions" : 1 }
Others
无