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。
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, default is 0 | 1 means the Response has new_status filed, 0 means the Response doesn’t have new_status field. New-status field means whether there’s new status, 1 mean there is and 0 means there is not. |
since_id | false | int64 | Weibo ID. This should be used with with_new_status, returning whether there is new weibo after the ID. |
Notes
- If there isn’t with_new_status parameter but only since_id, the Response ignores the since_id.
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 Example
<?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 Example
{ "comments" : 3, "followers" : 0, "new_status" : 1, "dm" : 1, "mentions" : 1 }
Others
None