Account/rate limit status

跳转到: 导航, 搜索
(HTTP 请求方法(s):)
(account/rate_limit_status)
第4行: 第4行:
 
Returns the remaining number of API requests available to the requesting user before the API limit is reached for the current hour. Calls to rate_limit_status do not count against the rate limit.  If authentication credentials are provided, the rate limit status for the authenticating user is returned.  Otherwise, the rate limit status for the requester's IP address is returned. Learn more about the REST API rate limiting.
 
Returns the remaining number of API requests available to the requesting user before the API limit is reached for the current hour. Calls to rate_limit_status do not count against the rate limit.  If authentication credentials are provided, the rate limit status for the authenticating user is returned.  Otherwise, the rate limit status for the requester's IP address is returned. Learn more about the REST API rate limiting.
  
=== URL地址: ===
+
=== URL: ===
 
http://api.t.sina.com.cn/account/rate_limit_status.format
 
http://api.t.sina.com.cn/account/rate_limit_status.format
 
   
 
   
===返回数据格式:===
+
===格式:===
 
xml, json
 
xml, json
 
   
 
   
=== HTTP 请求方式: ===
+
=== 是否需要登录: ===
 
GET
 
GET
  
===是否需要认证:===
+
===请求数限制:===
 
true, to determine a user's rate limit status
 
true, to determine a user's rate limit status
 
false, to determine the requesting IP's rate limit status
 
false, to determine the requesting IP's rate limit status
第23行: 第23行:
 
The <user> object contains the geo_enabled flag which, by default is false for all users. For more information, see the statuses/update method for more information.
 
The <user> object contains the geo_enabled flag which, by default is false for all users. For more information, see the statuses/update method for more information.
 
   
 
   
===返回数据格式:===
+
===返回:===
 
XML 格式样例(部分内容删减):
 
XML 格式样例(部分内容删减):
 
  <?xml version="1.0" encoding="UTF-8"?>
 
  <?xml version="1.0" encoding="UTF-8"?>
第33行: 第33行:
 
  </hash>
 
  </hash>
  
===调用例子: ===
+
===使用示例: ===
cURL (about cURL):
+
 
+
 
curl -u user:password http://api.t.sina.com.cn/account/rate_limit_status.xml
 
curl -u user:password http://api.t.sina.com.cn/account/rate_limit_status.xml

2009年11月13日 (五) 17:49的版本

目录

account/rate_limit_status

关于API的访问频率限制。返回当前小时还能访问的次数。频率限制是根据IP地址来做的限制,具体可以参加频率限制说明。

Returns the remaining number of API requests available to the requesting user before the API limit is reached for the current hour. Calls to rate_limit_status do not count against the rate limit. If authentication credentials are provided, the rate limit status for the authenticating user is returned. Otherwise, the rate limit status for the requester's IP address is returned. Learn more about the REST API rate limiting.

URL:

http://api.t.sina.com.cn/account/rate_limit_status.format

格式:

xml, json

是否需要登录:

GET

请求数限制:

true, to determine a user's rate limit status false, to determine the requesting IP's rate limit status

调用频率限制:

false

Geolocation [暂不支持]:

The <user> object contains the geo_enabled flag which, by default is false for all users. For more information, see the statuses/update method for more information.

返回:

XML 格式样例(部分内容删减):

<?xml version="1.0" encoding="UTF-8"?>
<hash>
 <remaining-hits type="integer">19933</remaining-hits>
 <hourly-limit type="integer">20000</hourly-limit>
 <reset-time type="datetime">2009-04-08T21:57:23+00:00</reset-time>
 <reset-time-in-seconds type="integer">1239227843</reset-time-in-seconds>
</hash>

使用示例:

curl -u user:password http://api.t.sina.com.cn/account/rate_limit_status.xml