类别API仅提取50个类别 [英] Categories API only pulling 50 categories

查看:67
本文介绍了类别API仅提取50个类别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过API从商店中提取所有类别.但是我似乎无法使其正常工作.我只有50个.可以拉出的类别数量是否有限制?

I'm trying to pull all of the categories from my store via the API. But I can't seem to get it to work. I only get 50. Is there a limit to how many categories that can be pulled?

谢谢

推荐答案

默认情况下,对于通过API请求的任何资源,API最多返回50个项目.要增加返回类别的数量,您可以在请求中包含 limit 参数.此外,您还可以指定 page 参数来检索特定页面的结果.

By default the API will return a maximum of 50 items for any resources requested via the API. To increase the number of returned categories you can include a limit parameter in your request. In addition you can also specify a page parameter to retrieve a particular page of results.

示例

要返回类别的第二页(每页10个结果),请提出以下请求

To return the 2nd page of the categories with 10 results per page, you would make the following request

GET /categories.json?limit=10&page=2

这篇关于类别API仅提取50个类别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆