【问题标题】:Twitter Rate Limit jsonTwitter 速率限制 json
【发布时间】:2013-10-25 18:43:33
【问题描述】:

我对 Twitter 开发还比较陌生。所以这可能是一个愚蠢的问题。 我正在查看 Twitter API 库,它们在资源文件中定义了速率限制

   <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 会返回一组映射到会话速率限制的值?

非常感谢所有提示和帮助。

谢谢

什么

【问题讨论】:

    标签: twitter


    【解决方案1】:

    根据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": {
          "/users/show": {
            "remaining": 180,
            "reset": 1346439527,
            "limit": 180
          },
          "/users/search": {
            "remaining": 180,
            "reset": 1346439527,
            "limit": 180
          },
          "/users/suggestions": {
            "remaining": 15,
            "reset": 1346439527,
            "limit": 15
          },
          "/users/contributors": {
            "remaining": 15,
            "reset": 1346439527,
            "limit": 15
          },
          "/users/suggestions/:slug/members": {
            "remaining": 15,
            "reset": 1346439527,
            "limit": 15
          },
          "/users/suggestions/:slug": {
            "remaining": 15,
            "reset": 1346439527,
            "limit": 15
          },
          "/users/contributees": {
            "remaining": 15,
            "reset": 1346439527,
            "limit": 15
          },
          "/users/lookup": {
            "remaining": 180,
            "reset": 1346439527,
            "limit": 180
          }
        },
        "search": {
          "/search/tweets": {
            "remaining": 180,
            "reset": 1346439527,
            "limit": 180
          }
        }
      }
    }
    

    【讨论】:

      猜你喜欢
      • 2014-08-05
      • 1970-01-01
      • 2022-08-19
      • 2011-11-16
      • 2015-07-09
      • 2012-01-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多