标签: google-api-js-client
如何将API响应限制为仅返回前20个对象。我使用的API返回了5000多个对象,这延迟了加载时间。 可以在数组加载后对其进行切片,但这不会阻止加载时间。
这是API: https://api.coingecko.com/api/v3/coins/list
执行以下操作不会更改结果: https://api.coingecko.com/api/v3/coins/list?max-results=100
https://api.coingecko.com/api/v3/coins/list?pageSize=100