Announcements

Help Wizard

Step 1

NEXT STEP

Who Me Too'd this topic

Get Artist reference bug - receiving Float instead of Int

  • Plan

Free/Premium

Country

Poland

Device

(iPhone 8, Samsung Galaxy 9, Macbook Pro late 2016)

Operating System

(iOS 10, Android Oreo, Windows 10,etc.)

 

My Question or Issue

Hi,
I'm currently creating an app that uses Spotify Web API. 
While using the "Get Artist" reference, I get JSON response that is not compatible with the Spotify Web API documentation.

In the documentation, it is said that field "followers.total" is integer, but I'm getting float. The same issue appears in fields: popularity, images.height, images.width

Example of "Get Artist" request:
curl --request GET \
--url https://api.spotify.com/v1/artists/0C8ZW7ezQVs4URX5aX7Kqx \
--header 'Authorization: Bearer ...'

Response:
 

{
"external_urls": {
"spotify": "https://open.spotify.com/artist/0C8ZW7ezQVs4URX5aX7Kqx"
},
"followers": {
"href": null,
"total": 4.7397795E7
},
"genres": [
"pop",
"post-teen pop"
],
"href": "https://api.spotify.com/v1/artists/0C8ZW7ezQVs4URX5aX7Kqx",
"id": "0C8ZW7ezQVs4URX5aX7Kqx",
"images": [
{
"url": "https://i.scdn.co/image/ab6761610000e5eb0c8eb928813cd06614c0710d",
"height": 640.0,
"width": 640.0
},
{
"url": "https://i.scdn.co/image/ab676161000051740c8eb928813cd06614c0710d",
"height": 320.0,
"width": 320.0
},
{
"url": "https://i.scdn.co/image/ab6761610000f1780c8eb928813cd06614c0710d",
"height": 160.0,
"width": 160.0
}
],
"name": "Selena Gomez",
"popularity": 82.0,
"type": "artist",
"uri": "spotify:artist:0C8ZW7ezQVs4URX5aX7Kqx"
}

 
Who Me Too'd this topic