Hi all,
I want to show the image of a spotify album. The album id will be set by the widget props. With this ID you can get the URL of the image by the Spotify API. But if you request https://api.spotify.com/v1/albums/{id}
you get all the data:
{
"album_type": "album",
"total_tracks": 18,
"available_markets": ["AT", "BE", "BG", "CY", "CZ", "DE", "EE", "FI", "FR", "GR", "HU", "IE", "IT", "LV", "LT", "LU", "MT", "MX", "NL", "NO", "PL", "PT", "SK", "ES", "SE", "CH", "TR", "GB", "AD", "LI", "MC", "RO", "IL", "ZA", "SA", "AE", "BH", "QA", "OM", "KW", "EG", "MA", "DZ", "TN", "LB", "JO", "PS", "BY", "KZ", "MD", "UA", "AL", "BA", "HR", "ME", "MK", "RS", "SI", "GH", "KE", "NG", "TZ", "UG", "AM", "BW", "BF", "CV", "CW", "GM", "GE", "GW", "LS", "LR", "MW", "ML", "NA", "NE", "SM", "ST", "SN", "SC", "SL", "AZ", "BI", "CM", "TD", "KM", "GQ", "SZ", "GA", "GN", "KG", "MR", "MN", "RW", "TG", "UZ", "ZW", "BJ", "MG", "MU", "MZ", "AO", "CI", "DJ", "ZM", "CD", "CG", "IQ", "LY", "TJ", "ET", "XK"],
"external_urls": {
"spotify": "https://open.spotify.com/album/4aawyAB9vmqN3uQ7FjRGTy"
},
"href": "https://api.spotify.com/v1/albums/4aawyAB9vmqN3uQ7FjRGTy?locale=de-DE%2Cde%3Bq%3D0.9%2Cen-US%3Bq%3D0.8%2Cen%3Bq%3D0.7",
"id": "4aawyAB9vmqN3uQ7FjRGTy",
"images": [
{
"url": "https://i.scdn.co/image/ab67616d0000b2732c5b24ecfa39523a75c993c4",
"height": 640,
"width": 640
},
{
"url": "https://i.scdn.co/image/ab67616d00001e022c5b24ecfa39523a75c993c4",
"height": 300,
"width": 300
},
{
"url": "https://i.scdn.co/image/ab67616d000048512c5b24ecfa39523a75c993c4",
"height": 64,
"width": 64
}
],
"name": "Global Warming",
"release_date": "2012-11-16",
"release_date_precision": "day",
"type": "album",
How can I parse this data inside the widget, to just have the image URL?