因此,我设法使用 Issuu API 提供了一个 URL,以获取有关我上传的最新 PDF 的大部分信息。问题是我希望能够获得下载该 PDF 的 URL。如何确定使用以下给定信息下载 PDF 的 URL。
这是我在使用issuu.documents.list
操作和其他一些参数对结果进行排序和限制后得到的响应以及诸如此类的东西(我提供了 XML 和 JSON 响应,只是为了好玩和咯咯笑):
XML 响应:
<rsp stat="ok">
<result totalCount="257" startIndex="0" pageSize="1" more="true">
<document
username="thecrimsonwhite"
name="09.14.11"
documentId="110914053847-872eaa6e8f844601b0ef763d5332f7eb"
title="The Crimson White"
access="public"
state="A"
type="007000"
orgDocType="pdf"
orgDocName="09.14.11.pdf"
downloadable="true"
origin="singleupload"
pro="F"
rating="0.0"
ratingsAllowed="true"
commentCount="0"
commentsAllowed="true"
bookmarkCount="0"
viewCount="71"
pageCount="8"
gfx="7"
dcla="2|b|8|||810|1476|0|0"
ls="1"
ep="1315976400"
publishDate="2011-09-14T05:00:00.000Z"
description="The Crimson White is a student-created publication that aims to inform, entertain the University of Alabama and surrounding Tuscaloosa areas.">
<tags>
<tag value="news"/>
<tag value="white"/>
<tag value="sports"/>
<tag value="lifestyles"/>
<tag value="opinions"/>
<tag value="crimson"/>
</tags>
</document>
</result>
</rsp>
JSON响应:
{"rsp":{"_content":{"result":{"totalCount":257,"startIndex":0,"pageSize":1,"more":true,"_content":[{"document":{"username":"thecrimsonwhite","name":"09.14.11","documentId":"110914053847-872eaa6e8f844601b0ef763d5332f7eb","title":"The Crimson White","access":"public","state":"A","type":"007000","orgDocType":"pdf","orgDocName":"09.14.11.pdf","downloadable":true,"origin":"singleupload","pro":"F","rating":0.00000e+0,"ratingsAllowed":true,"commentCount":0,"commentsAllowed":true,"bookmarkCount":0,"viewCount":71,"pageCount":8,"dcla":"2|b|8|||810|1476|0|0","ep":1315976400,"publishDate":"2011-09-14T05:00:00.000Z","description":"The Crimson White is a student-created publication that aims to inform, entertain the University of Alabama and surrounding Tuscaloosa areas.","tags":["news","white","sports","lifestyles","opinions","crimson"]}}]}},"stat":"ok"}}`
此特定文档的下载按钮上的 URL 是http://document.issuu.com/110914053847-872eaa6e8f844601b0ef763d5332f7eb/original.file?AWSAccessKeyId=AKIAJY7E3JMLFKPAGP7A&Expires=1316073684&Signature=r34xY8RUJYNxTL8X3SSedAWxDxk%3D
AWSAccessKeyID
和Expires
属性是什么?我知道签名是计算出的 MD5 总和(不过,我不知道它是否与Signing Requests的算法有什么不同)。
这对于我正在开发的显示我公司报纸的最新 PDF 版本的应用程序至关重要。