shopify - Why cursor-based pagination in shopify ignores last page?
问题描述
I'm using shopify api to get list of orders
For first request I use this URL:
https://my-shop-name.myshopify.com/admin/orders.json?status=any&order=created_at+desc&limit=250
and for all next use link to next page from response headers like described here:
The problem is that last page or orders always gets ignored, because request for previous page doesn't contain link to next one.
That's weird, because it takes all orders from 4403 to 1153 (with 250 limit it's 13 pages) and it should make one more request (latest order number is 1101), to get latest 52 orders. Maybe the problem is in 250 limit parameter, but I don't know how to bypass it if I don't know exact number of orders
解决方案
推荐阅读
- python - 如何使用 pkg_resources 搜索已安装模块目录之外的文件?
- r - 尝试使用复制在 R 中生成列表
- javascript - 使用 Chrome 扩展程序中的 onClick 将按钮添加到页面的正确方法
- ruby - 如何从 splat 参数列表中打印出每个参数的值和名称
- c++ - 将 std::function 对象分配给 c 函数指针
- c# - 更改事件上的 Jquery 未更新预期输入
- c - 为什么管道会脱离循环?
- php - PHP 订购奖杯
- machine-learning - Pytorch 中的 int8 数据类型
- python - 将两个数据框列压缩到 dict 获取 TypeError: 'dict' object is not callable