Statuses/unread/en

跳转到: 导航, 搜索
(创建新页面为 '{{api_desc2_en| uri=statuses/unread | desc=Return the total number of all kinds of unread message of the authenticating user, including: * Whether it has new weibo * Number of t…')
 
 
第6行: 第6行:
 
* New comments count <br/>
 
* New comments count <br/>
  
To restet the number to zeso, using [[statuses/reset_count|statuses/reset_count/en]]。|
+
To restet the number to zeso, using [[statuses/reset_count/en|statuses/reset_count]]。|
 
format=XML/JSON|
 
format=XML/JSON|
 
httpMethod=GET|
 
httpMethod=GET|
 
needAuth=true|
 
needAuth=true|
 
rateLimit=true|
 
rateLimit=true|
params={{api_args|with_new_status|false|int,默认为0。|1表示结果中包含new_status字段,0表示结果不包含new_status字段。new_status字段表示是否有新微博消息,1表示有,0表示没有}}
+
params={{api_args|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.}}
{{api_args|since_id|false|int64|参数值为微博id。该参数需配合with_new_status参数使用,返回since_id之后,是否有新微博消息产生}}|
+
{{api_args|since_id|false|int64|Weibo ID. This should be used with with_new_status, returning whether there is new weibo after the ID.}}|
 
getParam=&with_new_status=1&since_id=300000000|
 
getParam=&with_new_status=1&since_id=300000000|
 
postParam=|
 
postParam=|
 
result=
 
result=
===XML示例===
+
===XML Example===
 
<pre>
 
<pre>
 
<?xml version="1.0" encoding="UTF-8"?>
 
<?xml version="1.0" encoding="UTF-8"?>
第27行: 第27行:
 
</count>
 
</count>
 
</pre>
 
</pre>
===JSON示例===
+
===JSON Example===
 
<pre>
 
<pre>
 
{
 
{
第38行: 第38行:
 
</pre>|
 
</pre>|
 
useAge=
 
useAge=
* 如果只传入since_id,而没有传入with_new_status参数,则返回结果与未传入任何参数时相同。|
+
* If there isn’t with_new_status parameter but only since_id, the Response ignores the since_id.|
otherInfo=
+
otherInfo=None
 
}}
 
}}

2011年1月20日 (四) 14:29的最后版本

目录

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

文档更新时间: 2011-01-20