django – Pinterest API板分页

栏目: Python · 发布时间: 7年前

内容简介:翻译自:https://stackoverflow.com/questions/25353988/pinterest-api-board-paging

任何人都可以做一个(有根据的)猜测如何使用未发布的Pinterest API进行分页?

例如,此链接: https://api.pinterest.com/v3/pidgets/boards/grainedit/cars/pins/

返回该特定板的前50个引脚.但它包含101个引脚.如何检索第2页和第3页?

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

谢谢

编辑:

我试过了:

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 API中进行分页

冰壶:

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

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

"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"
}

然后,您可以CURL下一个URL以查看接下来的两个引脚.

翻译自:https://stackoverflow.com/questions/25353988/pinterest-api-board-paging


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Introduction to Algorithms, 3rd Edition

Introduction to Algorithms, 3rd Edition

Thomas H. Cormen、Charles E. Leiserson、Ronald L. Rivest、Clifford Stein / The MIT Press / 2009-7-31 / USD 94.00

Some books on algorithms are rigorous but incomplete; others cover masses of material but lack rigor. Introduction to Algorithms uniquely combines rigor and comprehensiveness. The book covers a broad ......一起来看看 《Introduction to Algorithms, 3rd Edition》 这本书的介绍吧!

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具