Pinterest API 板分页 [英] Pinterest API board paging

查看:20
本文介绍了Pinterest API 板分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以(受过教育的)猜测分页如何与未发布的 Pinterest API 一起工作吗?

Can anyone do an (educated) guess as to how paging works with the unreleased Pinterest API ?

例如这个链接:https://api.pinterest.com/v3/pidgets/boards/grainedit/cars/pins/返回该特定板的前 50 个引脚.但它包含 101 个引脚.如何检索第 2 页和第 3 页?

For example, this link: https://api.pinterest.com/v3/pidgets/boards/grainedit/cars/pins/ returns the first 50 pins of that specific board. But it contains 101 pins. How do I retrieve page 2 and 3 ?

由于 API 实际上不是公开的,我无法查找它,但可能碰巧知道或可以做一个很好的猜测.

Since the API is not actually public, I can't look it up but maybe happens to know or can do a good guess.

谢谢

我试过了:

https://api.pinterest.com/v3/pidgets/boards/grainedit/cars/pins/page/2/
https://api.pinterest.com/v3/pidgets/boards/grainedit/cars/pins/?page=2
https://api.pinterest.com/v3/pidgets/boards/grainedit/cars/pins/?p=2
https://api.pinterest.com/v3/pidgets/boards/grainedit/cars/pins/?offset=2

Pinterest 基于 Django,因此它可能使用 REST 框架.有什么想法吗?

Pinterest is based on Django so it probably uses the REST Framework. Any ideas?

推荐答案

您可以在 Pinterest API 中添加参数 limit 进行 Paginate卷曲:

You can Paginate in the Pinterest API by adding the parameter limit CURLing:

https://api.pinterest.com/v1/boards/anapinskywalker/wanderlust/pins/?
access_token=abcde&
limit=2&
fields=id,link,counts,note

这将返回两个引脚,还将返回第二个对象调用页面.

This will return two pins, a second object call page will also be returned.

"page": {
    "cursor":"abcde1234",
    "next":"https://api.pinterest.com/v1/boards/anapinskywalker/wanderlust/pins/?access_token=abcde&fields=id%2Clink%2Ccounts&2Cnote&limit=2&cursor=abcde1234"
}

然后您可以卷曲下一个 URL 以查看接下来的两个图钉.

You can then CURL the next URL to see then next two pins.

这篇关于Pinterest API 板分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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