在 Issuu 中下载最新的 PDF

发布于 2024-12-04 10:47:01 字数 3078 浏览 0 评论 0原文

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

这是我在使用 issuu.documents.list 操作和其他一些参数来排序和限制结果等之后得到的响应(我提供了 XML 和 JSON 响应只是为了踢和giggles):

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?AWSAccess KeyId=AKIAJY7E3JMLFKPAGP7A&Expires=1316073684&Signature=r34xY8RUJYNxTL8X3SSedAWxDxk%3D

什么是 AWSAccessKeyIDExpires 属性?我知道签名是计算出的 MD5 和(不过,我不知道它是否与 签名请求)。

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

So I have managed to come up with a URL using the Issuu API to get most all of the information about the latest PDF I have uploaded. The problem is that I want to be able to get the URL to download that PDF. How do I determine the URL to download the PDF with the following given information.

This is the response I get after using the issuu.documents.list action and a few other argument to sort and limit the results and whatnot (I've provided both the XML and JSON responses just for kicks and giggles):

XML Response:

<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 Response:

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

The URL on the download button for this particular document is http://document.issuu.com/110914053847-872eaa6e8f844601b0ef763d5332f7eb/original.file?AWSAccessKeyId=AKIAJY7E3JMLFKPAGP7A&Expires=1316073684&Signature=r34xY8RUJYNxTL8X3SSedAWxDxk%3D

What is the AWSAccessKeyID and Expires attributes? I understand that the signature is a calculated MD5 sum (though, I don't know if it's any different than the alorithm at Signing Requests).

This is critical for an application that I am developing that displays the most recent PDF edition of my company's newspaper.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

jJeQQOZ5 2024-12-11 10:47:01

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

它与“API 密钥”不同,您可以在此处请求。

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

Expires 属性是纪元日期时间。当您点击 URL 时,您必须发送当前或未来的日期/时间作为过期属性值。您可以此处以纪元格式生成它

签名与<中给出的相同a href="http://issuu.com/services/api/signingrequests.html" rel="nofollow">签名请求,您知道有什么工具可以在线生成它吗?

如果有帮助请告诉我。

-阿伦·贾恩

The AWSAccessKeyId is the Amazon Web Service(AWS) access key.

Its not the same as "API key", which you can request here.

So may be using the same AWS key will work for all documents.

The Expires attribute is epoch date time. When you hit the URL you have to send the current or future date/time in epoch as expires attribute value. You can generate it in epoch format here

Signature is same as given in Signing Requests, do you know any tool to generate it online ?

Let me know if it helps.

-Arun Jain

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文