issuu,如何正确编写 issuu.documents.list 请求?
我想使用 issuu.documents.list 列出来自 issuu 的文档,它工作正常。但是当我再添加两个参数startIndex和pageSize时,它不起作用。 这是我的签名请求:
[apiSecret]accessprivateactionissuu.documents.listapiKey[apiKey]startIndex0pageSize20formatxmlresponseParamstitle,documentId
和我的请求网址:
http://api.issuu.com/1_0?action=issuu.documents.list&apiKey=[apiKey]&access=private&startIndex=0&pageSize=20&format=xml&responseParams=title% 2CdocumentId&signature=[签名]
那么,您可以告诉我 startIndex 和 pageSize 参数的语法有什么问题吗? 非常感谢,
I want to use issuu.documents.list to list my document from issuu, It work fine. But when I add two more parameters startIndex and pageSize, it doesn't work.
Here is my signing request:
[apiSecret]accessprivateactionissuu.documents.listapiKey[apiKey]startIndex0pageSize20formatxmlresponseParamstitle,documentId
and My request url:
http://api.issuu.com/1_0?action=issuu.documents.list&apiKey=[apiKey]&access=private&startIndex=0&pageSize=20&format=xml&responseParams=title%2CdocumentId&signature=[signature]
So, may you show me what's wrong in my syntax with startIndex and pageSize parameters?
Many thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所有对 issuu api 的请求都必须经过签名(如您所知)。在创建签名的 md5 哈希值之前,您必须首先按字母顺序对所有密钥进行排序。
错误
[apiSecret]accessprivateactionissuu.documents.listapiKey[apiKey]startIndex0pageSize20formatxmlresponseParamstitle,documentId
正确
[apiSecret]accessprivateactionissuu.documents.listapiKey[apiKey ]pageSize20formatxmlresponseParamstitle,documentIdstartIndex0
因此,在您的示例中,您将 startIndex 定位在responseParams 之前,而实际上它应该位于responseParams 之后。
按字母顺序对签名中的密钥进行排序是 Issuu API 的要求,如此处所述。 http://issuu.com/services/api/signingrequests.html
All requests to the issuu api have to be signed (as you know). Before creating an md5 hash of your signature, you must first order all the keys alphabetically.
WRONG
[apiSecret]accessprivateactionissuu.documents.listapiKey[apiKey]startIndex0pageSize20formatxmlresponseParamstitle,documentId
CORRECT
[apiSecret]accessprivateactionissuu.documents.listapiKey[apiKey]pageSize20formatxmlresponseParamstitle,documentIdstartIndex0
So in your example, you have startIndex positioned before responseParams when it really should go after it.
Alphabetically ordering the keys in your signature is a requirement of Issuu's API as documented here. http://issuu.com/services/api/signingrequests.html