从 Spotify End Point 获取所需的图像

Get the required image from Spotify End Point

我正在尝试 return idname 和图像:url 使用这个 Spotify 终点:

https://api.spotify.com/v1/search?type=artist&q=coldplay

尽管 return name 和 *id** 图像,即图像:url 在某些情况下为空。 我如何return所有我的形象?

注:以 Cold & Lele 为例。

尽管这种情况非常罕见,但并非所有艺术家都在 Spotify 上有图片,Coldplay & Lele. The reason that this artist entry in particular doesn't have an image is probably because it's an error in Spotify's metadata since this artist doesn't have any albums related to it. Metadata issues like this one are cleaned up by a team at Spotify, and I believe the best way for users to help out with feedback is through this funnel at Spotify's support site 就是这种情况。 (技术问题> 我要举报破歌或错歌信息)

最重要的是 - 不要指望 images 数组总是包含元素。如果数组为空,请改用占位符图像。