yammer rest 中的消息端点限制 api

Messages endpoint limitation in yammer rest api

由于此处的 Yammer REST API 限制:https://developer.yammer.com/docs/rest-api-rate-limits

我对消息限制感到困惑。是吗:

  1. 每 30 秒 10 个请求,如此处所述:

Messages: 10 requests in 30 seconds. These limits are independent e.g. in the same 30 seconds period, you could make 10 message calls and 10 notification calls. The specific rate limits are subject to change but following the guidelines below will ensure that your app is not blocked.

  1. 或此处提到的每分钟 1 个请求:

When polling for messages, do not exceed one poll per minute. Apps that poll excessively will be blocked. However, your app may sometimes need to fetch messages more frequently e.g. if a user flips between “following”, “sent” and “received” feeds quickly: this is allowed for a few requests.

我个人认为这是第二种选择,但如果是这样,为什么在其余 api 文档的开头提到了 10/30 的限制?

答案是两个限制都适用。这取决于你在做什么。对于短暂的突发事件,API 可以让您在 30 秒内拨打 10 次电话,但如果您定期轮询 API 的时间较长,则需要将速率降低到每分钟。