【问题标题】:How can I limit my response to a API request?如何限制对 API 请求的响应?
【发布时间】:2020-10-23 20:16:28
【问题描述】:

我正在与Football API 合作,我似乎无法限制我的回复。 这是我对 API 的请求: https://soccer.sportmonks.com/api/v2.0/seasons/6397?api_token=MYTOKEN&include=fixtures:limit(5/1)

我想限制这一点,因为我得到的响应太大了。

关于这个端点的文档:https://sportmonks.com/docs/football/2.0/seasons/a/get-by-id/9

【问题讨论】:

    标签: api limit


    【解决方案1】:

    我在 SportMonks 上也遇到了这个问题。看起来他们更新了 Football API 文档。例如,只需将 &per_page=50 添加到您的请求中,它会将分页响应限制为 50 个结果。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-01-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多