我正在构建一个 Twitter 应用程序,到目前为止,我是唯一使用它的人,因此我从未遇到过 Twitter Rest API 速率限制的任何问题,但是,现在是我实现一些保护程序的时候了。我已经在使用缓存等,但我的问题是我不明白 Tiwtter 自己关于速率限制的解释中的一个词。想知道您是否可以提供帮助。
这来自 Twitter 的常见问题解答:
If user A launches application Z, and app Z makes 10 calls to user A’s mention timeline in a 15 minute window, then app Z has 5 calls left to make for that window
他们的意思肯定是这样的,对吧?
If user A launches application Z, and app Z makes 10 calls to user A’s mention timeline in a 15 minute window, then app Z has 5 calls left to make for user A within that window
否则,如果我有 1000 个用户,并且他们都想同时运行该应用程序,那么用户 A 将调用 10 个电话,用户 B 将调用 5 个电话,用户 C 到 X997 将在队列中等待 5 年?
最佳答案
你的理解是正确的。如果您阅读 the documentation 的下一部分
- Then user A launches application X, and app X calls user A’s mention timeline 3 times, then app X has 12 calls left for that window
- The remaining value of calls on application X is isolated from application Z’s, despite the same user A
因此,您的应用对所有用户没有速率限制 - 只是每个用户。
因此,如果 Alice 和 Bob 都是您的应用程序的用户,他们每个人都有自己的速率限制。如果爱丽丝用完她的所有,鲍勃不会受到影响。
如有任何疑问,您可以check the rate limits for each user .
关于twitter - 有人可以用简单的英语解释 Twitter API 速率限制吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33480590/