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

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

问题描述

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

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

阅读文档 我看到从 JSON 请求中获取的artworkUrl100"参数将为我提供一个 100x100 的应用图标.

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)?

推荐答案

你可以这样做.假设这是您的链接:http://a223.phobos.apple.com/us/r1000/049/Purple/e0/ed/59/mzi.qaoavtgs.png

You can do that like this. Let say this is your link: http://a223.phobos.apple.com/us/r1000/049/Purple/e0/ed/59/mzi.qaoavtgs.png

(来自artworkUrl512").

(from "artworkUrl512").

你只需要像这样在 .png 之前添加 .100x100-75http://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天全站免登陆