下载Issuu中的最新PDF

时间:2011-09-15 07:08:25

标签: xml json pdf downloading issuu

因此,我设法使用Issuu API提供了一个URL,以获取有关我上传的最新PDF的大部分信息。问题是我希望能够获得下载该PDF的URL。如何使用以下给定信息确定下载PDF的URL。

这是我使用issuu.documents.list操作后得到的响应以及一些其他参数来排序和限制结果以及诸如此类的东西(我提供了仅用于踢和笑的XML和JSON响应):< / p>

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

此特定文档的下载按钮上的网址为http://document.issuu.com/110914053847-872eaa6e8f844601b0ef763d5332f7eb/original.file?AWSAccessKeyId=AKIAJY7E3JMLFKPAGP7A&Expires=1316073684&Signature=r34xY8RUJYNxTL8X3SSedAWxDxk%3D

AWSAccessKeyIDExpires属性是什么?我知道签名是计算出的MD5总和(但是,我不知道它与Signing Requests处的算法有什么不同。)

这对我正在开发的应用程序至关重要,该应用程序显示了我公司报纸的最新PDF版本。

1 个答案:

答案 0 :(得分:1)

AWSAccessKeyId是Amazon Web Service(AWS)访问密钥。

它与“API密钥”不同,您可以请求here

因此可能使用相同的AWS密钥将适用于所有文档。

Expires属性为epoch日期时间。当您点击URL时,您必须将epoch中的当前或未来日期/时间作为expires属性值发送。您可以使用纪元格式here

生成它

签名与Signing Requests中的签名相同,您知道在线生成的任何工具吗?

如果有帮助,请告诉我。

-Arun Jain