OK, I have got a rest sensor working (not my preferred option but…
Anyway … I am now struggling to parse the result. I want the path - tracks,items,artists,external_urls,spotify but no matter what I try I cannot seem to get the URL in my sensor
Here is the json in case anyone has any ideas for me please
{
"tracks" : {
"href" : "https://api.spotify.com/v1/search?query=Bonded+By+Blood%2C+Immortal+Life&type=track&offset=0&limit=1",
"items" : [ {
"album" : {
"album_type" : "compilation",
"artists" : [ {
"external_urls" : {
"spotify" : "https://open.spotify.com/artist/0LyfQWJT6nXafLPZqxe9Of"
},
"href" : "https://api.spotify.com/v1/artists/0LyfQWJT6nXafLPZqxe9Of",
"id" : "0LyfQWJT6nXafLPZqxe9Of",
"name" : "Various Artists",
"type" : "artist",
"uri" : "spotify:artist:0LyfQWJT6nXafLPZqxe9Of"
} ],
"available_markets" : [ "AD", "AE", "AG", "AL", "AM", "AO", "AR", "AT", "AU", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BN", "BO", "BR", "BS", "BT", "BW", "BY", "BZ", "CA", "CD", "CG", "CH", "CI", "CL", "CM", "CO", "CR", "CV", "CW", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "ES", "ET", "FI", "FJ", "FM", "FR", "GA", "GB", "GD", "GE", "GH", "GM", "GN", "GQ", "GR", "GT", "GW", "GY", "HK", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IN", "IQ", "IS", "IT", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KR", "KW", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MG", "MH", "MK", "ML", "MN", "MO", "MR", "MT", "MU", " MV", "MW", "MX", "MY", "MZ", "NA", "NE", "NG", "NI", "NL", "NO", "NP", "NR", "NZ", "OM", "PA", "PE", "PG", "PH", "PK", "PL", "PS", "PT", "PW", "PY", "QA", "RO", "RS", "RW", "SA", "SB", "SC", "SE", "SG", "SI", "SK", "SL", "SM", "SN", "SR", "S T", "SV", "SZ", "TD", "TG", "TH", "TJ", "TL", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "US", "UY", "UZ", "VC", "VE", "VN", "VU", "WS", "XK", "ZA", "ZM", "ZW" ],
"external_urls" : {
"spotify" : "https://open.spotify.com/album/3Hew9i4xQriccSpvf4D6zd"
},
"href" : "https://api.spotify.com/v1/albums/3Hew9i4xQriccSpvf4D6zd",
"id" : "3Hew9i4xQriccSpvf4D6zd",
"images" : [ {
"height" : 640,
"url" : "https://i.scdn.co/image/ab67616d0000b27314cce1317eb0d790bc3496b9",
"width" : 640
}, {
"height" : 300,
"url" : "https://i.scdn.co/image/ab67616d00001e0214cce1317eb0d790bc3496b9",
"width" : 300
}, {
"height" : 64,
"url" : "https://i.scdn.co/image/ab67616d0000485114cce1317eb0d790bc3496b9",
"width" : 64
} ],
"name" : "Thrashing Like A Maniac",
"release_date" : "2008",
"release_date_precision" : "year",
"total_tracks" : 16,
"type" : "album",
"uri" : "spotify:album:3Hew9i4xQriccSpvf4D6zd"
},
"artists" : [ {
"external_urls" : {
"spotify" : "https://open.spotify.com/artist/3csFpGsY4rQQucEXwU0vaS"
},
"href" : "https://api.spotify.com/v1/artists/3csFpGsY4rQQucEXwU0vaS",
"id" : "3csFpGsY4rQQucEXwU0vaS",
"name" : "Bonded By Blood",
"type" : "artist",
"uri" : "spotify:artist:3csFpGsY4rQQucEXwU0vaS"
} ],
"available_markets" : [ "AD", "AE", "AG", "AL", "AM", "AO", "AR", "AT", "AU", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BN", "BO", "BR", "BS", "BT", "BW", "BY", "BZ", "CA", "CD", "CG", "CH", "CI", "CL", "CM", "CO", " CR", "CV", "CW", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "ES", "ET", "FI", "FJ", "FM", "FR", "GA", "GB", "GD", "GE", "GH", "GM", "GN", "GQ", "GR", "GT", "GW", "GY", "HK", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "I N", "IQ", "IS", "IT", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KR", "KW", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MG", "MH", "MK", "ML", "MN", "MO", "MR", "MT", "MU", "MV ", "MW", "MX", "MY", "MZ", "NA", "NE", "NG", "NI", "NL", "NO", "NP", "NR", "NZ", "OM", "PA", "PE", "PG", "PH", "PK", "PL", "PS", "PT", "PW", "PY", "QA", "RO", "RS", "RW", "SA", "SB", "SC", "SE", "SG", "SI", "SK", "SL", "SM", "SN", "SR", "ST" , "SV", "SZ", "TD", "TG", "TH", "TJ", "TL", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "US", "UY", "UZ", "VC", "VE", "VN", "VU", "WS", "XK", "ZA", "ZM", "ZW" ],
"disc_number" : 1,
"duration_ms" : 175466,
"explicit" : false,
"external_ids" : {
"isrc" : "GBBPB0703227"
},
"external_urls" : {
"spotify" : "https://open.spotify.com/track/0Baa8BiycvDmQicvq8eVar"
},
"href" : "https://api.spotify.com/v1/tracks/0Baa8BiycvDmQicvq8eVar",
"id" : "0Baa8BiycvDmQicvq8eVar",
"is_local" : false,
"name" : "Immortal Life",
"popularity" : 29,
"preview_url" : "https://p.scdn.co/mp3-preview/ac43ee69491c75d4aa46e61a83dcbc8f03357347?cid=19d3333b5c564c858a6a26fc402f6a2c",
"track_number" : 1,
"type" : "track",
"uri" : "spotify:track:0Baa8BiycvDmQicvq8eVar"
} ],
"limit" : 1,
"next" : "https://api.spotify.com/v1/search?query=Bonded+By+Blood%2C+Immortal+Life&type=track&offset=1&limit=1",
"offset" : 0,
"previous" : null,
"total" : 7
}
}