iTunes API: get 100x100 px icon of an App

廉价感情. 提交于 2019-12-19 09:24:30

问题


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

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.

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


回答1:


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

(from "artworkUrl512").

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

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.

Hope this helps you.

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



来源:https://stackoverflow.com/questions/10171848/itunes-api-get-100x100-px-icon-of-an-app

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!