iTunes的API:获得一个应用程序的100x100像素图标 [英] iTunes API: get 100x100 px icon of an App

查看:239
本文介绍了iTunes的API:获得一个应用程序的100x100像素图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用iTunes的API来获取有关App Store的应用程序的一些信息。

I'm using iTunes API to get some informations about apps in App Store.

读<一个href=\"http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html\"相对=nofollow>文档我看到artworkUrl100参数,从JSON请求采取,将让我的应用程序的图标100×100

Reading the documentation I saw that "artworkUrl100" parameter, taken from JSON request, will get me a 100x100 icon of the app.

我注意到,这并不总是工作,有时它包含了一个最大的图标的网址。

I notice that this not works always, and sometimes it contains the url of a biggest icon.

有没有办法得到肯定该图标(100x100像素)?

Is there a way to get with certainty this icon (100x100 px)?

推荐答案

可以是这样做的。
我们说这是你的链接:
<一href=\"http://a223.phobos.apple.com/us/r1000/049/Purple/e0/ed/59/mzi.qaoavtgs.png\">http://a223.phobos.apple.com/us/r1000/049/Purple/e0/ed/59/mzi.qaoavtgs.png

(选自artworkUrl512)。

(from "artworkUrl512").

您只需要添加的 .100x100-75 的之前的巴纽的这样的
<一href=\"http://a223.phobos.apple.com/us/r1000/049/Purple/e0/ed/59/mzi.qaoavtgs\">http://a223.phobos.apple.com/us/r1000/049/Purple/e0/ed/59/mzi.qaoavtgs.100x100-75.png

You just have to add .100x100-75 before .png like this http://a223.phobos.apple.com/us/r1000/049/Purple/e0/ed/59/mzi.qaoavtgs.100x100-75.png

此外菊可以调整你需要加入不同的价值像.150x150-75图标大小。唯一的问题是,这种的 -75 的一部分取决于图标的大小。它也可以是 -50 的较小的或 -65 的中等大小的图标。我还是没明白这一点。

Also ju can adjust icon size you need by adding different values like .150x150-75. Only problem is that this -75 part depends on icon size. it can also be -50 for smaller or -65 for middle size icons. I still did not figure that out.

希望这有助于你。

编辑:
你不必担心.jpg或.jpeg。你可以用它png格式将工作全部更换。

You do not have to worry about .jpg or .jpeg. You can replace all with .png it will work.

这篇关于iTunes的API:获得一个应用程序的100x100像素图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆