2013-10-24 100 views
1

我對Twitter的發展還比較陌生。所以這可能是一個愚蠢的問題。 我在看一個Twitter API庫,以及他們在資源文件Twitter的速率限制json

<data name="QueryRateLimit" xml:space="preserve"> 
<value>https://api.twitter.com/1.1/application/rate_limit_status.json</value> 

究竟是什麼https://api.twitter.com/1.1/application/rate_limit_status.json做定義的速率限制,並在應用程序中使用的什麼?

因爲如果您只是打開一個瀏覽器並複製並通過此鏈接,您會收到認證錯誤,如預期的那樣。但是如果你的請求被認證了,這是否意味着json會返回一組映射到會話速率限制的值?

非常感謝所有提示和幫助。

感謝

什麼

回答

0

按照documentation你會得到這樣的事情:

{ 
    "rate_limit_context": { 
    "access_token": "119476949-oYGCs2M5duG5QalbOAK2YUZh8zG3ur7DPYo5qIFN" 
    }, 
    "resources": { 
    "help": { 
     "/help/privacy": { 
     "remaining": 15, 
     "reset": 1346439527, 
     "limit": 15 
     }, 
     "/help/configuration": { 
     "remaining": 15, 
     "reset": 1346439527, 
     "limit": 15 
     }, 
     "/help/tos": { 
     "remaining": 15, 
     "reset": 1346439527, 
     "limit": 15 
     }, 
     "/help/languages": { 
     "remaining": 15, 
     "reset": 1346439527, 
     "limit": 15 
     } 
    }, 
    "statuses": { 
     "/statuses/oembed": { 
     "remaining": 180, 
     "reset": 1346439527, 
     "limit": 180 
     }, 
     "/statuses/user_timeline": { 
     "remaining": 180, 
     "reset": 1346439527, 
     "limit": 180 
     }, 
     "/statuses/mentions_timeline": { 
     "remaining": 15, 
     "reset": 1346439527, 
     "limit": 15 
     }, 
     "/statuses/home_timeline": { 
     "remaining": 15, 
     "reset": 1346439527, 
     "limit": 15 
     }, 
     "/statuses/show/:id": { 
     "remaining": 180, 
     "reset": 1346439527, 
     "limit": 180 
     }, 
     "/statuses/retweets/:id": { 
     "remaining": 15, 
     "reset": 1346439527, 
     "limit": 15 
     } 
    }, 
    "users": { 
     "https://stackoverflow.com/users/show": { 
     "remaining": 180, 
     "reset": 1346439527, 
     "limit": 180 
     }, 
     "https://stackoverflow.com/users/search": { 
     "remaining": 180, 
     "reset": 1346439527, 
     "limit": 180 
     }, 
     "https://stackoverflow.com/users/suggestions": { 
     "remaining": 15, 
     "reset": 1346439527, 
     "limit": 15 
     }, 
     "https://stackoverflow.com/users/contributors": { 
     "remaining": 15, 
     "reset": 1346439527, 
     "limit": 15 
     }, 
     "https://stackoverflow.com/users/suggestions/:slug/members": { 
     "remaining": 15, 
     "reset": 1346439527, 
     "limit": 15 
     }, 
     "https://stackoverflow.com/users/suggestions/:slug": { 
     "remaining": 15, 
     "reset": 1346439527, 
     "limit": 15 
     }, 
     "https://stackoverflow.com/users/contributees": { 
     "remaining": 15, 
     "reset": 1346439527, 
     "limit": 15 
     }, 
     "https://stackoverflow.com/users/lookup": { 
     "remaining": 180, 
     "reset": 1346439527, 
     "limit": 180 
     } 
    }, 
    "search": { 
     "/search/tweets": { 
     "remaining": 180, 
     "reset": 1346439527, 
     "limit": 180 
     } 
    } 
    } 
} 
+0

這是正確的,我試了一下 – doglin