import { clearCache } from '../../lib/utils' ; import { loadFixture } from '../helpers' ; import { SpotifyGraphQLClient } from '../../index' ; import * as nock from 'nock' ; describe ( 'Query: track(id: String, name: String): Track' , ( ) => { let response ; beforeEach ( ( done ) => { clearCache ( ) ; loadFixture ( 'queries.track' ) . then ( ( data ) => response = data ) . then ( done ) ; } ) ; nock . disableNetConnect ( ) ; let client = SpotifyGraphQLClient ( { clientId : "clientId" , clientSecret : "clientSecret" , redirectUri : "http://redirectUri.dev" , accessToken : "accessToken" } ) ; describe ( 'when fetching a existing Track' , ( ) => { let request ; beforeEach ( ( ) => { request = nock ( 'https://api.spotify.com:443' ) . get ( '/v1/tracks/1zHlj4dQ8ZAtrayhuDDmkY' ) . reply ( 200 , response ) ; } ) ; afterEach ( ( ) => { nock . cleanAll ( ) ; } ) ; it ( 'should call promise success callback' , ( done ) => { let onSuccess = function ( executionResult ) { let data = executionResult . data ; expect ( data . track . name ) . toBe ( 'Timber' ) ; expect ( data . track . id ) . toBe ( '1zHlj4dQ8ZAtrayhuDDmkY' ) ; expect ( ! ! executionResult . errors ) . toBeFalsy ( ) ; expect ( request . isDone ( ) ) . toBeTruthy ( ) ; done ( ) ; } ; let onError = ( ) => { throw 'should not be called' ; } ; client . query ( `
        query {
          track(id: "1zHlj4dQ8ZAtrayhuDDmkY") {
            id
            name
          }
        }
       ` ) . then ( onSuccess ) . catch ( onError ) ; } ) ; } ) ; describe ( 'when fetching a existing Track by name' , ( ) => { let searchResults = { "tracks" : { "href" : "https://api.spotify.com/v1/search?query=XO&type=track&market=FR&offset=0&limit=20" , "items" : [ { "album" : { "album_type" : "single" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/0hEurMDQu99nJRq8pTxO14" } , "href" : "https://api.spotify.com/v1/artists/0hEurMDQu99nJRq8pTxO14" , "id" : "0hEurMDQu99nJRq8pTxO14" , "name" : "John Mayer" , "type" : "artist" , "uri" : "spotify:artist:0hEurMDQu99nJRq8pTxO14" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CA" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MX" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "US" , "UY" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/305TANxsPTFkiqS4cEilx1" } , "href" : "https://api.spotify.com/v1/albums/305TANxsPTFkiqS4cEilx1" , "id" : "305TANxsPTFkiqS4cEilx1" , "images" : [ { "height" : 640 , "url" : "https://i.scdn.co/image/2442264c9a8d3d51d5e9c59d92b4ef74bb8f17c2" , "width" : 640 } , { "height" : 300 , "url" : "https://i.scdn.co/image/59102400469d20a7a7d788305bb6f9487133bb0e" , "width" : 300 } , { "height" : 64 , "url" : "https://i.scdn.co/image/6f580263bed783cb7972fce54116431e74d4fd39" , "width" : 64 } ] , "name" : "XO" , "type" : "album" , "uri" : "spotify:album:305TANxsPTFkiqS4cEilx1" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/0hEurMDQu99nJRq8pTxO14" } , "href" : "https://api.spotify.com/v1/artists/0hEurMDQu99nJRq8pTxO14" , "id" : "0hEurMDQu99nJRq8pTxO14" , "name" : "John Mayer" , "type" : "artist" , "uri" : "spotify:artist:0hEurMDQu99nJRq8pTxO14" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CA" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MX" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "US" , "UY" ] , "disc_number" : 1 , "duration_ms" : 213626 , "explicit" : false , "external_ids" : { "isrc" : "USSM11403983" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/7cpCU3Denug5NGZsSpQl8v" } , "href" : "https://api.spotify.com/v1/tracks/7cpCU3Denug5NGZsSpQl8v" , "id" : "7cpCU3Denug5NGZsSpQl8v" , "name" : "XO" , "popularity" : 72 , "preview_url" : "https://p.scdn.co/mp3-preview/dbc04767449ffacfdbedaf7bc410103111603295?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 1 , "type" : "track" , "uri" : "spotify:track:7cpCU3Denug5NGZsSpQl8v" } , { "album" : { "album_type" : "album" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/6vWDO969PvNqNYHIOW5v0m" } , "href" : "https://api.spotify.com/v1/artists/6vWDO969PvNqNYHIOW5v0m" , "id" : "6vWDO969PvNqNYHIOW5v0m" , "name" : "Beyoncé" , "type" : "artist" , "uri" : "spotify:artist:6vWDO969PvNqNYHIOW5v0m" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CA" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MX" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "US" , "UY" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/2UJwKSBUz6rtW4QLK74kQu" } , "href" : "https://api.spotify.com/v1/albums/2UJwKSBUz6rtW4QLK74kQu" , "id" : "2UJwKSBUz6rtW4QLK74kQu" , "images" : [ { "height" : 640 , "url" : "https://i.scdn.co/image/98be8968e1c29e6ef80831c5867733d2e687b508" , "width" : 640 } , { "height" : 300 , "url" : "https://i.scdn.co/image/a986d5fe5780115541b5c33e89ed66272e5d4c0f" , "width" : 300 } , { "height" : 64 , "url" : "https://i.scdn.co/image/20787cddd28d8b7335f9cc8baff2b097d27558d1" , "width" : 64 } ] , "name" : "BEYONCÉ [Platinum Edition]" , "type" : "album" , "uri" : "spotify:album:2UJwKSBUz6rtW4QLK74kQu" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/6vWDO969PvNqNYHIOW5v0m" } , "href" : "https://api.spotify.com/v1/artists/6vWDO969PvNqNYHIOW5v0m" , "id" : "6vWDO969PvNqNYHIOW5v0m" , "name" : "Beyoncé" , "type" : "artist" , "uri" : "spotify:artist:6vWDO969PvNqNYHIOW5v0m" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CA" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MX" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "US" , "UY" ] , "disc_number" : 1 , "duration_ms" : 215946 , "explicit" : false , "external_ids" : { "isrc" : "USSM11307807" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/40xhyfAPDoMtv494MfPevP" } , "href" : "https://api.spotify.com/v1/tracks/40xhyfAPDoMtv494MfPevP" , "id" : "40xhyfAPDoMtv494MfPevP" , "name" : "XO" , "popularity" : 67 , "preview_url" : "https://p.scdn.co/mp3-preview/df9b5efc4577e9ef65491b5a3f74f3cf428297d3?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 10 , "type" : "track" , "uri" : "spotify:track:40xhyfAPDoMtv494MfPevP" } , { "album" : { "album_type" : "single" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/5keDbKEPwrbe36cPzRpzsK" } , "href" : "https://api.spotify.com/v1/artists/5keDbKEPwrbe36cPzRpzsK" , "id" : "5keDbKEPwrbe36cPzRpzsK" , "name" : "Jane XØ" , "type" : "artist" , "uri" : "spotify:artist:5keDbKEPwrbe36cPzRpzsK" } ] , "available_markets" : [ "AD" , "AT" , "BE" , "BG" , "CH" , "CY" , "CZ" , "DE" , "DK" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "HU" , "IE" , "IS" , "IT" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "NL" , "NO" , "PL" , "PT" , "SE" , "SK" , "TR" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/25GM3llhQcg91gkyq5gKRR" } , "href" : "https://api.spotify.com/v1/albums/25GM3llhQcg91gkyq5gKRR" , "id" : "25GM3llhQcg91gkyq5gKRR" , "images" : [ { "height" : 640 , "url" : "https://i.scdn.co/image/cdfffea194c9e022211614abe685f52c6e4e0470" , "width" : 640 } , { "height" : 300 , "url" : "https://i.scdn.co/image/dae9366aed9e7b26e6b6cb477fc15beecc978aed" , "width" : 300 } , { "height" : 64 , "url" : "https://i.scdn.co/image/19324466941cf0650ff999f75d467deefeac5b48" , "width" : 64 } ] , "name" : "Love Me" , "type" : "album" , "uri" : "spotify:album:25GM3llhQcg91gkyq5gKRR" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/5keDbKEPwrbe36cPzRpzsK" } , "href" : "https://api.spotify.com/v1/artists/5keDbKEPwrbe36cPzRpzsK" , "id" : "5keDbKEPwrbe36cPzRpzsK" , "name" : "Jane XØ" , "type" : "artist" , "uri" : "spotify:artist:5keDbKEPwrbe36cPzRpzsK" } ] , "available_markets" : [ "AD" , "AT" , "BE" , "BG" , "CH" , "CY" , "CZ" , "DE" , "DK" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "HU" , "IE" , "IS" , "IT" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "NL" , "NO" , "PL" , "PT" , "SE" , "SK" , "TR" ] , "disc_number" : 1 , "duration_ms" : 212426 , "explicit" : false , "external_ids" : { "isrc" : "DEE861600844" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/1kFJTEnAvJ70S5mXplUAFR" } , "href" : "https://api.spotify.com/v1/tracks/1kFJTEnAvJ70S5mXplUAFR" , "id" : "1kFJTEnAvJ70S5mXplUAFR" , "name" : "Love Me" , "popularity" : 66 , "preview_url" : "https://p.scdn.co/mp3-preview/883bf7459d853a0eb45e095add7fa1222d2de374?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 1 , "type" : "track" , "uri" : "spotify:track:1kFJTEnAvJ70S5mXplUAFR" } , { "album" : { "album_type" : "single" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/3GtCKJA4SkOxN65MWjm82R" } , "href" : "https://api.spotify.com/v1/artists/3GtCKJA4SkOxN65MWjm82R" , "id" : "3GtCKJA4SkOxN65MWjm82R" , "name" : "Hot Shade" , "type" : "artist" , "uri" : "spotify:artist:3GtCKJA4SkOxN65MWjm82R" } , { "external_urls" : { "spotify" : "https://open.spotify.com/artist/6lB8vOoI4DRrrVxXwuV19c" } , "href" : "https://api.spotify.com/v1/artists/6lB8vOoI4DRrrVxXwuV19c" , "id" : "6lB8vOoI4DRrrVxXwuV19c" , "name" : "Mike Perry" , "type" : "artist" , "uri" : "spotify:artist:6lB8vOoI4DRrrVxXwuV19c" } , { "external_urls" : { "spotify" : "https://open.spotify.com/artist/5keDbKEPwrbe36cPzRpzsK" } , "href" : "https://api.spotify.com/v1/artists/5keDbKEPwrbe36cPzRpzsK" , "id" : "5keDbKEPwrbe36cPzRpzsK" , "name" : "Jane XØ" , "type" : "artist" , "uri" : "spotify:artist:5keDbKEPwrbe36cPzRpzsK" } ] , "available_markets" : [ "AU" , "FR" , "GB" , "IE" , "IT" , "MC" , "NZ" , "US" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/6EytPZTztkf8fuRlb2NzMO" } , "href" : "https://api.spotify.com/v1/albums/6EytPZTztkf8fuRlb2NzMO" , "id" : "6EytPZTztkf8fuRlb2NzMO" , "images" : [ { "height" : 640 , "url" : "https://i.scdn.co/image/6d8a70fb079a737bba4934c495283d84ad899c98" , "width" : 640 } , { "height" : 300 , "url" : "https://i.scdn.co/image/4b84c444775146cb303e77870abfd8d49ed4dfec" , "width" : 300 } , { "height" : 64 , "url" : "https://i.scdn.co/image/2ac75f9b14bcc5b1e3e0ee698e544500068afbb8" , "width" : 64 } ] , "name" : "Touching You Again" , "type" : "album" , "uri" : "spotify:album:6EytPZTztkf8fuRlb2NzMO" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/3GtCKJA4SkOxN65MWjm82R" } , "href" : "https://api.spotify.com/v1/artists/3GtCKJA4SkOxN65MWjm82R" , "id" : "3GtCKJA4SkOxN65MWjm82R" , "name" : "Hot Shade" , "type" : "artist" , "uri" : "spotify:artist:3GtCKJA4SkOxN65MWjm82R" } , { "external_urls" : { "spotify" : "https://open.spotify.com/artist/6lB8vOoI4DRrrVxXwuV19c" } , "href" : "https://api.spotify.com/v1/artists/6lB8vOoI4DRrrVxXwuV19c" , "id" : "6lB8vOoI4DRrrVxXwuV19c" , "name" : "Mike Perry" , "type" : "artist" , "uri" : "spotify:artist:6lB8vOoI4DRrrVxXwuV19c" } , { "external_urls" : { "spotify" : "https://open.spotify.com/artist/5keDbKEPwrbe36cPzRpzsK" } , "href" : "https://api.spotify.com/v1/artists/5keDbKEPwrbe36cPzRpzsK" , "id" : "5keDbKEPwrbe36cPzRpzsK" , "name" : "Jane XØ" , "type" : "artist" , "uri" : "spotify:artist:5keDbKEPwrbe36cPzRpzsK" } ] , "available_markets" : [ "AU" , "FR" , "GB" , "IE" , "IT" , "MC" , "NZ" , "US" ] , "disc_number" : 1 , "duration_ms" : 182270 , "explicit" : false , "external_ids" : { "isrc" : "SE3AA1600018" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/6kWrgWBA58DIxgiklyGh8m" } , "href" : "https://api.spotify.com/v1/tracks/6kWrgWBA58DIxgiklyGh8m" , "id" : "6kWrgWBA58DIxgiklyGh8m" , "name" : "Touching You Again" , "popularity" : 59 , "preview_url" : "https://p.scdn.co/mp3-preview/7c98aff5d300ad9702eec132e700ad7f9fa8c4d8?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 1 , "type" : "track" , "uri" : "spotify:track:6kWrgWBA58DIxgiklyGh8m" } , { "album" : { "album_type" : "album" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/6O0rWDT0LuZk9Cpe45kbcx" } , "href" : "https://api.spotify.com/v1/artists/6O0rWDT0LuZk9Cpe45kbcx" , "id" : "6O0rWDT0LuZk9Cpe45kbcx" , "name" : "Anna Elizabeth Laube" , "type" : "artist" , "uri" : "spotify:artist:6O0rWDT0LuZk9Cpe45kbcx" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CA" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MX" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "US" , "UY" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/3pALJvtTxIm5i1aYlaZDnA" } , "href" : "https://api.spotify.com/v1/albums/3pALJvtTxIm5i1aYlaZDnA" , "id" : "3pALJvtTxIm5i1aYlaZDnA" , "images" : [ { "height" : 640 , "url" : "https://i.scdn.co/image/d973a0f6eec780a3490b9cae15c21f19b77ef320" , "width" : 640 } , { "height" : 300 , "url" : "https://i.scdn.co/image/4d0acb6d521ab9a05b65f447519e7367fbfbc360" , "width" : 300 } , { "height" : 64 , "url" : "https://i.scdn.co/image/b57d4c1944f34d96458f8d24aff2e7c4e2f17d44" , "width" : 64 } ] , "name" : "Tree" , "type" : "album" , "uri" : "spotify:album:3pALJvtTxIm5i1aYlaZDnA" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/6O0rWDT0LuZk9Cpe45kbcx" } , "href" : "https://api.spotify.com/v1/artists/6O0rWDT0LuZk9Cpe45kbcx" , "id" : "6O0rWDT0LuZk9Cpe45kbcx" , "name" : "Anna Elizabeth Laube" , "type" : "artist" , "uri" : "spotify:artist:6O0rWDT0LuZk9Cpe45kbcx" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CA" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MX" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "US" , "UY" ] , "disc_number" : 1 , "duration_ms" : 235906 , "explicit" : false , "external_ids" : { "isrc" : "ushm21668708" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/0oa6d6Nz5BmP7jquxEoyMm" } , "href" : "https://api.spotify.com/v1/tracks/0oa6d6Nz5BmP7jquxEoyMm" , "id" : "0oa6d6Nz5BmP7jquxEoyMm" , "name" : "XO" , "popularity" : 55 , "preview_url" : "https://p.scdn.co/mp3-preview/acd2be32b959279f9ddbdc13ccb26e152a25b3ae?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 5 , "type" : "track" , "uri" : "spotify:track:0oa6d6Nz5BmP7jquxEoyMm" } , { "album" : { "album_type" : "single" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/26plsJBmW5se3wurhwzaEK" } , "href" : "https://api.spotify.com/v1/artists/26plsJBmW5se3wurhwzaEK" , "id" : "26plsJBmW5se3wurhwzaEK" , "name" : "Eden Project" , "type" : "artist" , "uri" : "spotify:artist:26plsJBmW5se3wurhwzaEK" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CA" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MX" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "US" , "UY" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/10dfkctY9SVtrkWmG0mzHE" } , "href" : "https://api.spotify.com/v1/albums/10dfkctY9SVtrkWmG0mzHE" , "id" : "10dfkctY9SVtrkWmG0mzHE" , "images" : [ { "height" : 640 , "url" : "https://i.scdn.co/image/d602205dd28c5fe21ca19b9064e7b665329e9068" , "width" : 640 } , { "height" : 300 , "url" : "https://i.scdn.co/image/afdaca34a37d08915135f264cfa334940a945757" , "width" : 300 } , { "height" : 64 , "url" : "https://i.scdn.co/image/8ddb05e37aae608a0655fa9fcffda62ed34d3eb2" , "width" : 64 } ] , "name" : "XO" , "type" : "album" , "uri" : "spotify:album:10dfkctY9SVtrkWmG0mzHE" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/26plsJBmW5se3wurhwzaEK" } , "href" : "https://api.spotify.com/v1/artists/26plsJBmW5se3wurhwzaEK" , "id" : "26plsJBmW5se3wurhwzaEK" , "name" : "Eden Project" , "type" : "artist" , "uri" : "spotify:artist:26plsJBmW5se3wurhwzaEK" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CA" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MX" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "US" , "UY" ] , "disc_number" : 1 , "duration_ms" : 159582 , "explicit" : false , "external_ids" : { "isrc" : "GB-SMU-20-76460" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/6NiXAdF2005XfIrbJ2JCN9" } , "href" : "https://api.spotify.com/v1/tracks/6NiXAdF2005XfIrbJ2JCN9" , "id" : "6NiXAdF2005XfIrbJ2JCN9" , "name" : "XO" , "popularity" : 63 , "preview_url" : "https://p.scdn.co/mp3-preview/81f6fd4d66fb41c6f16acbd1fb29a768f88c9f94?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 1 , "type" : "track" , "uri" : "spotify:track:6NiXAdF2005XfIrbJ2JCN9" } , { "album" : { "album_type" : "album" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/5keDbKEPwrbe36cPzRpzsK" } , "href" : "https://api.spotify.com/v1/artists/5keDbKEPwrbe36cPzRpzsK" , "id" : "5keDbKEPwrbe36cPzRpzsK" , "name" : "Jane XØ" , "type" : "artist" , "uri" : "spotify:artist:5keDbKEPwrbe36cPzRpzsK" } ] , "available_markets" : [ "AD" , "AT" , "BE" , "BG" , "CH" , "CY" , "CZ" , "DE" , "DK" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "HU" , "IE" , "IS" , "IT" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "NL" , "NO" , "PL" , "PT" , "SE" , "SK" , "TR" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/1jc1aeRfN1pdZVCwg4Kbez" } , "href" : "https://api.spotify.com/v1/albums/1jc1aeRfN1pdZVCwg4Kbez" , "id" : "1jc1aeRfN1pdZVCwg4Kbez" , "images" : [ { "height" : 640 , "url" : "https://i.scdn.co/image/e1820177a2fbefd67dc48bfe4d1c4a1a53f1df48" , "width" : 640 } , { "height" : 300 , "url" : "https://i.scdn.co/image/2cc3a807bce58a92a2fd5285964a694b5b474ea8" , "width" : 300 } , { "height" : 64 , "url" : "https://i.scdn.co/image/e5900bd78735028d06c567adbbf58954b761477a" , "width" : 64 } ] , "name" : "Hard to Forget (EP)" , "type" : "album" , "uri" : "spotify:album:1jc1aeRfN1pdZVCwg4Kbez" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/5keDbKEPwrbe36cPzRpzsK" } , "href" : "https://api.spotify.com/v1/artists/5keDbKEPwrbe36cPzRpzsK" , "id" : "5keDbKEPwrbe36cPzRpzsK" , "name" : "Jane XØ" , "type" : "artist" , "uri" : "spotify:artist:5keDbKEPwrbe36cPzRpzsK" } ] , "available_markets" : [ "AD" , "AT" , "BE" , "BG" , "CH" , "CY" , "CZ" , "DE" , "DK" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "HU" , "IE" , "IS" , "IT" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "NL" , "NO" , "PL" , "PT" , "SE" , "SK" , "TR" ] , "disc_number" : 1 , "duration_ms" : 211613 , "explicit" : false , "external_ids" : { "isrc" : "TCACQ1669000" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/2uNTIqpS21OBEaBNKyzzs0" } , "href" : "https://api.spotify.com/v1/tracks/2uNTIqpS21OBEaBNKyzzs0" , "id" : "2uNTIqpS21OBEaBNKyzzs0" , "name" : "I Don't Wanna" , "popularity" : 59 , "preview_url" : "https://p.scdn.co/mp3-preview/cfffb82fbcf2c054f20c00d8a33411a3b38a0ccf?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 4 , "type" : "track" , "uri" : "spotify:track:2uNTIqpS21OBEaBNKyzzs0" } , { "album" : { "album_type" : "single" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/6vWDO969PvNqNYHIOW5v0m" } , "href" : "https://api.spotify.com/v1/artists/6vWDO969PvNqNYHIOW5v0m" , "id" : "6vWDO969PvNqNYHIOW5v0m" , "name" : "Beyoncé" , "type" : "artist" , "uri" : "spotify:artist:6vWDO969PvNqNYHIOW5v0m" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CA" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MX" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SG" , "SK" , "SV" , "TR" , "TW" , "UY" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/2noKUZhXwUhPQMgSr56T4G" } , "href" : "https://api.spotify.com/v1/albums/2noKUZhXwUhPQMgSr56T4G" , "id" : "2noKUZhXwUhPQMgSr56T4G" , "images" : [ { "height" : 634 , "url" : "https://i.scdn.co/image/a090ed09b7c2496619ebfd917ab7cf7a81682d97" , "width" : 640 } , { "height" : 297 , "url" : "https://i.scdn.co/image/e04609b29aa56bfcc21fbf6e4286bdf1d1526efd" , "width" : 300 } , { "height" : 63 , "url" : "https://i.scdn.co/image/e7b8d0c485c62f740bf716cf33145a1c9400c376" , "width" : 64 } ] , "name" : "BEYONCÉ" , "type" : "album" , "uri" : "spotify:album:2noKUZhXwUhPQMgSr56T4G" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/6vWDO969PvNqNYHIOW5v0m" } , "href" : "https://api.spotify.com/v1/artists/6vWDO969PvNqNYHIOW5v0m" , "id" : "6vWDO969PvNqNYHIOW5v0m" , "name" : "Beyoncé" , "type" : "artist" , "uri" : "spotify:artist:6vWDO969PvNqNYHIOW5v0m" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CA" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MX" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SG" , "SK" , "SV" , "TR" , "TW" , "UY" ] , "disc_number" : 1 , "duration_ms" : 215946 , "explicit" : false , "external_ids" : { "isrc" : "USSM11307807" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/04cxAqa9ZgLwvEskosNVsB" } , "href" : "https://api.spotify.com/v1/tracks/04cxAqa9ZgLwvEskosNVsB" , "id" : "04cxAqa9ZgLwvEskosNVsB" , "name" : "XO" , "popularity" : 52 , "preview_url" : "https://p.scdn.co/mp3-preview/df9b5efc4577e9ef65491b5a3f74f3cf428297d3?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 2 , "type" : "track" , "uri" : "spotify:track:04cxAqa9ZgLwvEskosNVsB" } , { "album" : { "album_type" : "album" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/1t20wYnTiAT0Bs7H1hv9Wt" } , "href" : "https://api.spotify.com/v1/artists/1t20wYnTiAT0Bs7H1hv9Wt" , "id" : "1t20wYnTiAT0Bs7H1hv9Wt" , "name" : "EDEN" , "type" : "artist" , "uri" : "spotify:artist:1t20wYnTiAT0Bs7H1hv9Wt" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "UY" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/69UxOX12PC4ukcyTigpNhD" } , "href" : "https://api.spotify.com/v1/albums/69UxOX12PC4ukcyTigpNhD" , "id" : "69UxOX12PC4ukcyTigpNhD" , "images" : [ { "height" : 640 , "url" : "https://i.scdn.co/image/e72d444a01baaa30214675250413bef9af561dd9" , "width" : 640 } , { "height" : 300 , "url" : "https://i.scdn.co/image/074795f43f1d74827cdb52f02666af012c041a60" , "width" : 300 } , { "height" : 64 , "url" : "https://i.scdn.co/image/e1868e6b01c1aa20d7cf9e49d14fbc16f806a35e" , "width" : 64 } ] , "name" : "i think you think too much of me" , "type" : "album" , "uri" : "spotify:album:69UxOX12PC4ukcyTigpNhD" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/1t20wYnTiAT0Bs7H1hv9Wt" } , "href" : "https://api.spotify.com/v1/artists/1t20wYnTiAT0Bs7H1hv9Wt" , "id" : "1t20wYnTiAT0Bs7H1hv9Wt" , "name" : "EDEN" , "type" : "artist" , "uri" : "spotify:artist:1t20wYnTiAT0Bs7H1hv9Wt" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "UY" ] , "disc_number" : 2 , "duration_ms" : 159512 , "explicit" : false , "external_ids" : { "isrc" : "USUG11600374" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/2mDAAURYFQ0kWXPIA4RlRv" } , "href" : "https://api.spotify.com/v1/tracks/2mDAAURYFQ0kWXPIA4RlRv" , "id" : "2mDAAURYFQ0kWXPIA4RlRv" , "name" : "XO" , "popularity" : 56 , "preview_url" : "https://p.scdn.co/mp3-preview/8b67830dde95c1f818b0e41f3101d16e5e4b35ca?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 2 , "type" : "track" , "uri" : "spotify:track:2mDAAURYFQ0kWXPIA4RlRv" } , { "album" : { "album_type" : "album" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/5keDbKEPwrbe36cPzRpzsK" } , "href" : "https://api.spotify.com/v1/artists/5keDbKEPwrbe36cPzRpzsK" , "id" : "5keDbKEPwrbe36cPzRpzsK" , "name" : "Jane XØ" , "type" : "artist" , "uri" : "spotify:artist:5keDbKEPwrbe36cPzRpzsK" } ] , "available_markets" : [ "AD" , "AT" , "BE" , "BG" , "CH" , "CY" , "CZ" , "DE" , "DK" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "HU" , "IE" , "IS" , "IT" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "NL" , "NO" , "PL" , "PT" , "SE" , "SK" , "TR" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/1jc1aeRfN1pdZVCwg4Kbez" } , "href" : "https://api.spotify.com/v1/albums/1jc1aeRfN1pdZVCwg4Kbez" , "id" : "1jc1aeRfN1pdZVCwg4Kbez" , "images" : [ { "height" : 640 , "url" : "https://i.scdn.co/image/e1820177a2fbefd67dc48bfe4d1c4a1a53f1df48" , "width" : 640 } , { "height" : 300 , "url" : "https://i.scdn.co/image/2cc3a807bce58a92a2fd5285964a694b5b474ea8" , "width" : 300 } , { "height" : 64 , "url" : "https://i.scdn.co/image/e5900bd78735028d06c567adbbf58954b761477a" , "width" : 64 } ] , "name" : "Hard to Forget (EP)" , "type" : "album" , "uri" : "spotify:album:1jc1aeRfN1pdZVCwg4Kbez" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/5keDbKEPwrbe36cPzRpzsK" } , "href" : "https://api.spotify.com/v1/artists/5keDbKEPwrbe36cPzRpzsK" , "id" : "5keDbKEPwrbe36cPzRpzsK" , "name" : "Jane XØ" , "type" : "artist" , "uri" : "spotify:artist:5keDbKEPwrbe36cPzRpzsK" } ] , "available_markets" : [ "AD" , "AT" , "BE" , "BG" , "CH" , "CY" , "CZ" , "DE" , "DK" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "HU" , "IE" , "IS" , "IT" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "NL" , "NO" , "PL" , "PT" , "SE" , "SK" , "TR" ] , "disc_number" : 1 , "duration_ms" : 229693 , "explicit" : false , "external_ids" : { "isrc" : "TCACN1677532" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/5K69DyfCOQnfIMRqFFm2Ag" } , "href" : "https://api.spotify.com/v1/tracks/5K69DyfCOQnfIMRqFFm2Ag" , "id" : "5K69DyfCOQnfIMRqFFm2Ag" , "name" : "Lies" , "popularity" : 49 , "preview_url" : "https://p.scdn.co/mp3-preview/f139a5fa908b8d13235c70c0ec3d9df36a7bb834?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 2 , "type" : "track" , "uri" : "spotify:track:5K69DyfCOQnfIMRqFFm2Ag" } , { "album" : { "album_type" : "album" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/2ApaG60P4r0yhBoDCGD8YG" } , "href" : "https://api.spotify.com/v1/artists/2ApaG60P4r0yhBoDCGD8YG" , "id" : "2ApaG60P4r0yhBoDCGD8YG" , "name" : "Elliott Smith" , "type" : "artist" , "uri" : "spotify:artist:2ApaG60P4r0yhBoDCGD8YG" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "UY" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/6FOUdn1ZEuJkgfcTt1fQnz" } , "href" : "https://api.spotify.com/v1/albums/6FOUdn1ZEuJkgfcTt1fQnz" , "id" : "6FOUdn1ZEuJkgfcTt1fQnz" , "images" : [ { "height" : 640 , "url" : "https://i.scdn.co/image/3ac2da0e99cceb40752f06f9557a9fa7116d2c79" , "width" : 640 } , { "height" : 300 , "url" : "https://i.scdn.co/image/5591e9055a6f5ac8617fbd54193bfac947972f8e" , "width" : 300 } , { "height" : 64 , "url" : "https://i.scdn.co/image/a307110e7bf129b035c6c2975a9766582a547780" , "width" : 64 } ] , "name" : "XO" , "type" : "album" , "uri" : "spotify:album:6FOUdn1ZEuJkgfcTt1fQnz" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/2ApaG60P4r0yhBoDCGD8YG" } , "href" : "https://api.spotify.com/v1/artists/2ApaG60P4r0yhBoDCGD8YG" , "id" : "2ApaG60P4r0yhBoDCGD8YG" , "name" : "Elliott Smith" , "type" : "artist" , "uri" : "spotify:artist:2ApaG60P4r0yhBoDCGD8YG" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "UY" ] , "disc_number" : 1 , "duration_ms" : 280106 , "explicit" : false , "external_ids" : { "isrc" : "USDW19804802" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/6pzmC5wnMeue9QZbuhWaX3" } , "href" : "https://api.spotify.com/v1/tracks/6pzmC5wnMeue9QZbuhWaX3" , "id" : "6pzmC5wnMeue9QZbuhWaX3" , "name" : "Waltz #2 (XO)" , "popularity" : 43 , "preview_url" : "https://p.scdn.co/mp3-preview/a80e5aa0917ec948fc9a075afa11251578bce86b?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 3 , "type" : "track" , "uri" : "spotify:track:6pzmC5wnMeue9QZbuhWaX3" } , { "album" : { "album_type" : "album" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/5keDbKEPwrbe36cPzRpzsK" } , "href" : "https://api.spotify.com/v1/artists/5keDbKEPwrbe36cPzRpzsK" , "id" : "5keDbKEPwrbe36cPzRpzsK" , "name" : "Jane XØ" , "type" : "artist" , "uri" : "spotify:artist:5keDbKEPwrbe36cPzRpzsK" } ] , "available_markets" : [ "AD" , "AT" , "BE" , "BG" , "CH" , "CY" , "CZ" , "DE" , "DK" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "HU" , "IE" , "IS" , "IT" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "NL" , "NO" , "PL" , "PT" , "SE" , "SK" , "TR" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/1jc1aeRfN1pdZVCwg4Kbez" } , "href" : "https://api.spotify.com/v1/albums/1jc1aeRfN1pdZVCwg4Kbez" , "id" : "1jc1aeRfN1pdZVCwg4Kbez" , "images" : [ { "height" : 640 , "url" : "https://i.scdn.co/image/e1820177a2fbefd67dc48bfe4d1c4a1a53f1df48" , "width" : 640 } , { "height" : 300 , "url" : "https://i.scdn.co/image/2cc3a807bce58a92a2fd5285964a694b5b474ea8" , "width" : 300 } , { "height" : 64 , "url" : "https://i.scdn.co/image/e5900bd78735028d06c567adbbf58954b761477a" , "width" : 64 } ] , "name" : "Hard to Forget (EP)" , "type" : "album" , "uri" : "spotify:album:1jc1aeRfN1pdZVCwg4Kbez" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/5keDbKEPwrbe36cPzRpzsK" } , "href" : "https://api.spotify.com/v1/artists/5keDbKEPwrbe36cPzRpzsK" , "id" : "5keDbKEPwrbe36cPzRpzsK" , "name" : "Jane XØ" , "type" : "artist" , "uri" : "spotify:artist:5keDbKEPwrbe36cPzRpzsK" } ] , "available_markets" : [ "AD" , "AT" , "BE" , "BG" , "CH" , "CY" , "CZ" , "DE" , "DK" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "HU" , "IE" , "IS" , "IT" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "NL" , "NO" , "PL" , "PT" , "SE" , "SK" , "TR" ] , "disc_number" : 1 , "duration_ms" : 200840 , "explicit" : false , "external_ids" : { "isrc" : "TCACM1603775" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/1BFBErSK8j6p4hZDgqTCAC" } , "href" : "https://api.spotify.com/v1/tracks/1BFBErSK8j6p4hZDgqTCAC" , "id" : "1BFBErSK8j6p4hZDgqTCAC" , "name" : "Hard to Forget" , "popularity" : 48 , "preview_url" : "https://p.scdn.co/mp3-preview/661110d8d6a71e3228e3b2fbf371a79cdd5b87f5?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 1 , "type" : "track" , "uri" : "spotify:track:1BFBErSK8j6p4hZDgqTCAC" } , { "album" : { "album_type" : "album" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/1Xyo4u8uXC1ZmMpatF05PJ" } , "href" : "https://api.spotify.com/v1/artists/1Xyo4u8uXC1ZmMpatF05PJ" , "id" : "1Xyo4u8uXC1ZmMpatF05PJ" , "name" : "The Weeknd" , "type" : "artist" , "uri" : "spotify:artist:1Xyo4u8uXC1ZmMpatF05PJ" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "UY" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/7g9RcHiOu1Di3B4Js96Fz5" } , "href" : "https://api.spotify.com/v1/albums/7g9RcHiOu1Di3B4Js96Fz5" , "id" : "7g9RcHiOu1Di3B4Js96Fz5" , "images" : [ { "height" : 640 , "url" : "https://i.scdn.co/image/4eaf54ac2d42119e2fffcc3d669c258b6fa725d8" , "width" : 640 } , { "height" : 300 , "url" : "https://i.scdn.co/image/4ad35378f5a51df5e4a4034db5bdd8502bbded35" , "width" : 300 } , { "height" : 64 , "url" : "https://i.scdn.co/image/a5bb88455789b4e83a86a0beac1061b6439b33e9" , "width" : 64 } ] , "name" : "Trilogy" , "type" : "album" , "uri" : "spotify:album:7g9RcHiOu1Di3B4Js96Fz5" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/1Xyo4u8uXC1ZmMpatF05PJ" } , "href" : "https://api.spotify.com/v1/artists/1Xyo4u8uXC1ZmMpatF05PJ" , "id" : "1Xyo4u8uXC1ZmMpatF05PJ" , "name" : "The Weeknd" , "type" : "artist" , "uri" : "spotify:artist:1Xyo4u8uXC1ZmMpatF05PJ" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "UY" ] , "disc_number" : 3 , "duration_ms" : 443986 , "explicit" : true , "external_ids" : { "isrc" : "USUM71212141" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/0IDWT0hH5modhr23cvj0xo" } , "href" : "https://api.spotify.com/v1/tracks/0IDWT0hH5modhr23cvj0xo" , "id" : "0IDWT0hH5modhr23cvj0xo" , "name" : "XO / The Host" , "popularity" : 48 , "preview_url" : "https://p.scdn.co/mp3-preview/31fe7454686a18a0494f056fd3eb464bc426b61b?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 4 , "type" : "track" , "uri" : "spotify:track:0IDWT0hH5modhr23cvj0xo" } , { "album" : { "album_type" : "single" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/3qDMrpZHtZEtVl5i1l7hP3" } , "href" : "https://api.spotify.com/v1/artists/3qDMrpZHtZEtVl5i1l7hP3" , "id" : "3qDMrpZHtZEtVl5i1l7hP3" , "name" : "Nightly" , "type" : "artist" , "uri" : "spotify:artist:3qDMrpZHtZEtVl5i1l7hP3" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "UY" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/0JSdV6HhF1CLqsCMbv7YQ2" } , "href" : "https://api.spotify.com/v1/albums/0JSdV6HhF1CLqsCMbv7YQ2" , "id" : "0JSdV6HhF1CLqsCMbv7YQ2" , "images" : [ { "height" : 640 , "url" : "https://i.scdn.co/image/b8bed923ec4eab4ba74416c90cf0189f501fc860" , "width" : 640 } , { "height" : 300 , "url" : "https://i.scdn.co/image/d5166520e2f47696678740f5c712cce7b253646c" , "width" : 300 } , { "height" : 64 , "url" : "https://i.scdn.co/image/6137cb8cf403564322cd2d485c636f3d093c1ae0" , "width" : 64 } ] , "name" : "Honest" , "type" : "album" , "uri" : "spotify:album:0JSdV6HhF1CLqsCMbv7YQ2" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/3qDMrpZHtZEtVl5i1l7hP3" } , "href" : "https://api.spotify.com/v1/artists/3qDMrpZHtZEtVl5i1l7hP3" , "id" : "3qDMrpZHtZEtVl5i1l7hP3" , "name" : "Nightly" , "type" : "artist" , "uri" : "spotify:artist:3qDMrpZHtZEtVl5i1l7hP3" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "UY" ] , "disc_number" : 1 , "duration_ms" : 185000 , "explicit" : false , "external_ids" : { "isrc" : "TCACO1613506" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/3wLlzsvZDaF8D1Fpkb5rmv" } , "href" : "https://api.spotify.com/v1/tracks/3wLlzsvZDaF8D1Fpkb5rmv" , "id" : "3wLlzsvZDaF8D1Fpkb5rmv" , "name" : "XO" , "popularity" : 48 , "preview_url" : "https://p.scdn.co/mp3-preview/876a9da88046a5cf34f8861ac5f6e19bace18e26?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 1 , "type" : "track" , "uri" : "spotify:track:3wLlzsvZDaF8D1Fpkb5rmv" } , { "album" : { "album_type" : "single" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/3MqA9vofzw8FPiJxDRPMfy" } , "href" : "https://api.spotify.com/v1/artists/3MqA9vofzw8FPiJxDRPMfy" , "id" : "3MqA9vofzw8FPiJxDRPMfy" , "name" : "XO" , "type" : "artist" , "uri" : "spotify:artist:3MqA9vofzw8FPiJxDRPMfy" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CA" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MX" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "US" , "UY" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/7wjiGB0EQXiAdznyHsbOBL" } , "href" : "https://api.spotify.com/v1/albums/7wjiGB0EQXiAdznyHsbOBL" , "id" : "7wjiGB0EQXiAdznyHsbOBL" , "images" : [ { "height" : 640 , "url" : "https://i.scdn.co/image/2969b87fa52ecbbb57b2e1941ec9f17450a9b74d" , "width" : 640 } , { "height" : 300 , "url" : "https://i.scdn.co/image/16616d31b2e1d6e7738c887b7f22390368605c89" , "width" : 300 } , { "height" : 64 , "url" : "https://i.scdn.co/image/76ddd1c5cacc0f8ea398e6ef775c4391d52b6d9a" , "width" : 64 } ] , "name" : "Waiting Game" , "type" : "album" , "uri" : "spotify:album:7wjiGB0EQXiAdznyHsbOBL" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/3MqA9vofzw8FPiJxDRPMfy" } , "href" : "https://api.spotify.com/v1/artists/3MqA9vofzw8FPiJxDRPMfy" , "id" : "3MqA9vofzw8FPiJxDRPMfy" , "name" : "XO" , "type" : "artist" , "uri" : "spotify:artist:3MqA9vofzw8FPiJxDRPMfy" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CA" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MX" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "US" , "UY" ] , "disc_number" : 1 , "duration_ms" : 372708 , "explicit" : true , "external_ids" : { "isrc" : "FR96X1638059" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/7DlubrNUtZoUopoO9ZO0Tw" } , "href" : "https://api.spotify.com/v1/tracks/7DlubrNUtZoUopoO9ZO0Tw" , "id" : "7DlubrNUtZoUopoO9ZO0Tw" , "name" : "Waiting Game" , "popularity" : 45 , "preview_url" : "https://p.scdn.co/mp3-preview/c2a0c5745c61c05948c7af8ee8bf08e95be1432e?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 1 , "type" : "track" , "uri" : "spotify:track:7DlubrNUtZoUopoO9ZO0Tw" } , { "album" : { "album_type" : "album" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/2KsP6tYLJlTBvSUxnwlVWa" } , "href" : "https://api.spotify.com/v1/artists/2KsP6tYLJlTBvSUxnwlVWa" , "id" : "2KsP6tYLJlTBvSUxnwlVWa" , "name" : "Mike Posner" , "type" : "artist" , "uri" : "spotify:artist:2KsP6tYLJlTBvSUxnwlVWa" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MX" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "UY" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/3Hmmcy5kIXlXoDqKgaHslu" } , "href" : "https://api.spotify.com/v1/albums/3Hmmcy5kIXlXoDqKgaHslu" , "id" : "3Hmmcy5kIXlXoDqKgaHslu" , "images" : [ { "height" : 640 , "url" : "https://i.scdn.co/image/85b6daf138b5173e8e6043d38b24cadc0cbeecb4" , "width" : 625 } , { "height" : 300 , "url" : "https://i.scdn.co/image/d1a820f877fdd3a72b2ba09d2560c45c095f1fe8" , "width" : 293 } , { "height" : 64 , "url" : "https://i.scdn.co/image/b02baa11989cc4edf4a486cc484b885a4432a23b" , "width" : 62 } ] , "name" : "31 Minutes to Takeoff" , "type" : "album" , "uri" : "spotify:album:3Hmmcy5kIXlXoDqKgaHslu" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/2KsP6tYLJlTBvSUxnwlVWa" } , "href" : "https://api.spotify.com/v1/artists/2KsP6tYLJlTBvSUxnwlVWa" , "id" : "2KsP6tYLJlTBvSUxnwlVWa" , "name" : "Mike Posner" , "type" : "artist" , "uri" : "spotify:artist:2KsP6tYLJlTBvSUxnwlVWa" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MX" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "UY" ] , "disc_number" : 1 , "duration_ms" : 180813 , "explicit" : false , "external_ids" : { "isrc" : "USJAY1000089" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/7DAVkiLuPjDz839CwUFUVq" } , "href" : "https://api.spotify.com/v1/tracks/7DAVkiLuPjDz839CwUFUVq" , "id" : "7DAVkiLuPjDz839CwUFUVq" , "name" : "XO" , "popularity" : 38 , "preview_url" : "https://p.scdn.co/mp3-preview/7efe42e097359905af5aa97c8063422f9a08fa09?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 13 , "type" : "track" , "uri" : "spotify:track:7DAVkiLuPjDz839CwUFUVq" } , { "album" : { "album_type" : "album" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/5keDbKEPwrbe36cPzRpzsK" } , "href" : "https://api.spotify.com/v1/artists/5keDbKEPwrbe36cPzRpzsK" , "id" : "5keDbKEPwrbe36cPzRpzsK" , "name" : "Jane XØ" , "type" : "artist" , "uri" : "spotify:artist:5keDbKEPwrbe36cPzRpzsK" } ] , "available_markets" : [ "AD" , "AT" , "BE" , "BG" , "CH" , "CY" , "CZ" , "DE" , "DK" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "HU" , "IE" , "IS" , "IT" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "NL" , "NO" , "PL" , "PT" , "SE" , "SK" , "TR" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/1jc1aeRfN1pdZVCwg4Kbez" } , "href" : "https://api.spotify.com/v1/albums/1jc1aeRfN1pdZVCwg4Kbez" , "id" : "1jc1aeRfN1pdZVCwg4Kbez" , "images" : [ { "height" : 640 , "url" : "https://i.scdn.co/image/e1820177a2fbefd67dc48bfe4d1c4a1a53f1df48" , "width" : 640 } , { "height" : 300 , "url" : "https://i.scdn.co/image/2cc3a807bce58a92a2fd5285964a694b5b474ea8" , "width" : 300 } , { "height" : 64 , "url" : "https://i.scdn.co/image/e5900bd78735028d06c567adbbf58954b761477a" , "width" : 64 } ] , "name" : "Hard to Forget (EP)" , "type" : "album" , "uri" : "spotify:album:1jc1aeRfN1pdZVCwg4Kbez" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/5keDbKEPwrbe36cPzRpzsK" } , "href" : "https://api.spotify.com/v1/artists/5keDbKEPwrbe36cPzRpzsK" , "id" : "5keDbKEPwrbe36cPzRpzsK" , "name" : "Jane XØ" , "type" : "artist" , "uri" : "spotify:artist:5keDbKEPwrbe36cPzRpzsK" } , { "external_urls" : { "spotify" : "https://open.spotify.com/artist/1PFc84GHTYPL0G12JHh9Mc" } , "href" : "https://api.spotify.com/v1/artists/1PFc84GHTYPL0G12JHh9Mc" , "id" : "1PFc84GHTYPL0G12JHh9Mc" , "name" : "Dannic" , "type" : "artist" , "uri" : "spotify:artist:1PFc84GHTYPL0G12JHh9Mc" } ] , "available_markets" : [ "AD" , "AT" , "BE" , "BG" , "CH" , "CY" , "CZ" , "DE" , "DK" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "HU" , "IE" , "IS" , "IT" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "NL" , "NO" , "PL" , "PT" , "SE" , "SK" , "TR" ] , "disc_number" : 1 , "duration_ms" : 233066 , "explicit" : false , "external_ids" : { "isrc" : "TCACR1613772" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/51aaEcG745n3y1zXvWgiXg" } , "href" : "https://api.spotify.com/v1/tracks/51aaEcG745n3y1zXvWgiXg" , "id" : "51aaEcG745n3y1zXvWgiXg" , "name" : "Undone" , "popularity" : 44 , "preview_url" : "https://p.scdn.co/mp3-preview/7766f21d8c939792676b8010338750d78c4a7543?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 5 , "type" : "track" , "uri" : "spotify:track:51aaEcG745n3y1zXvWgiXg" } , { "album" : { "album_type" : "album" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/5keDbKEPwrbe36cPzRpzsK" } , "href" : "https://api.spotify.com/v1/artists/5keDbKEPwrbe36cPzRpzsK" , "id" : "5keDbKEPwrbe36cPzRpzsK" , "name" : "Jane XØ" , "type" : "artist" , "uri" : "spotify:artist:5keDbKEPwrbe36cPzRpzsK" } ] , "available_markets" : [ "AD" , "AT" , "BE" , "BG" , "CH" , "CY" , "CZ" , "DE" , "DK" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "HU" , "IE" , "IS" , "IT" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "NL" , "NO" , "PL" , "PT" , "SE" , "SK" , "TR" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/3jfSa9FBmc8WqgCo8LJUPw" } , "href" : "https://api.spotify.com/v1/albums/3jfSa9FBmc8WqgCo8LJUPw" , "id" : "3jfSa9FBmc8WqgCo8LJUPw" , "images" : [ { "height" : 640 , "url" : "https://i.scdn.co/image/2b13d6bc20a1807464ae146d51e12e459b7725d5" , "width" : 640 } , { "height" : 300 , "url" : "https://i.scdn.co/image/f9d13dd4194133f7486eabe8e3177ef2824b20e3" , "width" : 300 } , { "height" : 64 , "url" : "https://i.scdn.co/image/ec50a354b4f5d4995142c6955b3927e171212bd8" , "width" : 64 } ] , "name" : "Alternate Love" , "type" : "album" , "uri" : "spotify:album:3jfSa9FBmc8WqgCo8LJUPw" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/5keDbKEPwrbe36cPzRpzsK" } , "href" : "https://api.spotify.com/v1/artists/5keDbKEPwrbe36cPzRpzsK" , "id" : "5keDbKEPwrbe36cPzRpzsK" , "name" : "Jane XØ" , "type" : "artist" , "uri" : "spotify:artist:5keDbKEPwrbe36cPzRpzsK" } ] , "available_markets" : [ "AD" , "AT" , "BE" , "BG" , "CH" , "CY" , "CZ" , "DE" , "DK" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "HU" , "IE" , "IS" , "IT" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "NL" , "NO" , "PL" , "PT" , "SE" , "SK" , "TR" ] , "disc_number" : 1 , "duration_ms" : 211400 , "explicit" : false , "external_ids" : { "isrc" : "DEE861601179" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/3r8BDyWokxaR1jr4HRIBEA" } , "href" : "https://api.spotify.com/v1/tracks/3r8BDyWokxaR1jr4HRIBEA" , "id" : "3r8BDyWokxaR1jr4HRIBEA" , "name" : "Love Me - Instrumental" , "popularity" : 38 , "preview_url" : "https://p.scdn.co/mp3-preview/6dd199bcdd0a7d78cd041b21d5a74c54d0c1ab00?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 4 , "type" : "track" , "uri" : "spotify:track:3r8BDyWokxaR1jr4HRIBEA" } , { "album" : { "album_type" : "album" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/5n9E5vGRtLsPzqk39eA29T" } , "href" : "https://api.spotify.com/v1/artists/5n9E5vGRtLsPzqk39eA29T" , "id" : "5n9E5vGRtLsPzqk39eA29T" , "name" : "Keywest" , "type" : "artist" , "uri" : "spotify:artist:5n9E5vGRtLsPzqk39eA29T" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CA" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MX" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "US" , "UY" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/700BwLHula23dItGVoJhgH" } , "href" : "https://api.spotify.com/v1/albums/700BwLHula23dItGVoJhgH" , "id" : "700BwLHula23dItGVoJhgH" , "images" : [ { "height" : 640 , "url" : "https://i.scdn.co/image/c893ccaa0e29b31e42d608f20d5f3872e5c78248" , "width" : 640 } , { "height" : 300 , "url" : "https://i.scdn.co/image/b914a2d09650546e65e3347a44f53da1764c900e" , "width" : 300 } , { "height" : 64 , "url" : "https://i.scdn.co/image/9b42589732a9e135fb6ddf9981f2ec02c315291e" , "width" : 64 } ] , "name" : "Cover Sessions - The Ladies Vol.1" , "type" : "album" , "uri" : "spotify:album:700BwLHula23dItGVoJhgH" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/5n9E5vGRtLsPzqk39eA29T" } , "href" : "https://api.spotify.com/v1/artists/5n9E5vGRtLsPzqk39eA29T" , "id" : "5n9E5vGRtLsPzqk39eA29T" , "name" : "Keywest" , "type" : "artist" , "uri" : "spotify:artist:5n9E5vGRtLsPzqk39eA29T" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CA" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MX" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "US" , "UY" ] , "disc_number" : 1 , "duration_ms" : 224927 , "explicit" : false , "external_ids" : { "isrc" : "GBDMT1400466" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/742YzMHtvtvbssU6O1JbaD" } , "href" : "https://api.spotify.com/v1/tracks/742YzMHtvtvbssU6O1JbaD" , "id" : "742YzMHtvtvbssU6O1JbaD" , "name" : "XO" , "popularity" : 42 , "preview_url" : "https://p.scdn.co/mp3-preview/3e2f105879083e30ffde29b233d13d729845b887?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 10 , "type" : "track" , "uri" : "spotify:track:742YzMHtvtvbssU6O1JbaD" } , { "album" : { "album_type" : "album" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/5keDbKEPwrbe36cPzRpzsK" } , "href" : "https://api.spotify.com/v1/artists/5keDbKEPwrbe36cPzRpzsK" , "id" : "5keDbKEPwrbe36cPzRpzsK" , "name" : "Jane XØ" , "type" : "artist" , "uri" : "spotify:artist:5keDbKEPwrbe36cPzRpzsK" } ] , "available_markets" : [ "AD" , "AT" , "BE" , "BG" , "CH" , "CY" , "CZ" , "DE" , "DK" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "HU" , "IE" , "IS" , "IT" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "NL" , "NO" , "PL" , "PT" , "SE" , "SK" , "TR" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/1jc1aeRfN1pdZVCwg4Kbez" } , "href" : "https://api.spotify.com/v1/albums/1jc1aeRfN1pdZVCwg4Kbez" , "id" : "1jc1aeRfN1pdZVCwg4Kbez" , "images" : [ { "height" : 640 , "url" : "https://i.scdn.co/image/e1820177a2fbefd67dc48bfe4d1c4a1a53f1df48" , "width" : 640 } , { "height" : 300 , "url" : "https://i.scdn.co/image/2cc3a807bce58a92a2fd5285964a694b5b474ea8" , "width" : 300 } , { "height" : 64 , "url" : "https://i.scdn.co/image/e5900bd78735028d06c567adbbf58954b761477a" , "width" : 64 } ] , "name" : "Hard to Forget (EP)" , "type" : "album" , "uri" : "spotify:album:1jc1aeRfN1pdZVCwg4Kbez" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/5keDbKEPwrbe36cPzRpzsK" } , "href" : "https://api.spotify.com/v1/artists/5keDbKEPwrbe36cPzRpzsK" , "id" : "5keDbKEPwrbe36cPzRpzsK" , "name" : "Jane XØ" , "type" : "artist" , "uri" : "spotify:artist:5keDbKEPwrbe36cPzRpzsK" } ] , "available_markets" : [ "AD" , "AT" , "BE" , "BG" , "CH" , "CY" , "CZ" , "DE" , "DK" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "HU" , "IE" , "IS" , "IT" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "NL" , "NO" , "PL" , "PT" , "SE" , "SK" , "TR" ] , "disc_number" : 1 , "duration_ms" : 173693 , "explicit" : false , "external_ids" : { "isrc" : "TCACP1603825" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/6Y9V7eRu11UUWHiKtD0AAN" } , "href" : "https://api.spotify.com/v1/tracks/6Y9V7eRu11UUWHiKtD0AAN" , "id" : "6Y9V7eRu11UUWHiKtD0AAN" , "name" : "Dreams" , "popularity" : 36 , "preview_url" : "https://p.scdn.co/mp3-preview/279efa04d5706c2db082bc6e4afac45426cc237b?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 3 , "type" : "track" , "uri" : "spotify:track:6Y9V7eRu11UUWHiKtD0AAN" } ] , "limit" : 20 , "next" : "https://api.spotify.com/v1/search?query=XO&type=track&market=FR&offset=20&limit=20" , "offset" : 0 , "previous" : null , "total" : 2367 } } ; let xoTrack = { "album" : { "album_type" : "single" , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/0hEurMDQu99nJRq8pTxO14" } , "href" : "https://api.spotify.com/v1/artists/0hEurMDQu99nJRq8pTxO14" , "id" : "0hEurMDQu99nJRq8pTxO14" , "name" : "John Mayer" , "type" : "artist" , "uri" : "spotify:artist:0hEurMDQu99nJRq8pTxO14" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CA" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MX" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "US" , "UY" ] , "external_urls" : { "spotify" : "https://open.spotify.com/album/305TANxsPTFkiqS4cEilx1" } , "href" : "https://api.spotify.com/v1/albums/305TANxsPTFkiqS4cEilx1" , "id" : "305TANxsPTFkiqS4cEilx1" , "images" : [ { "height" : 640 , "url" : "https://i.scdn.co/image/2442264c9a8d3d51d5e9c59d92b4ef74bb8f17c2" , "width" : 640 } , { "height" : 300 , "url" : "https://i.scdn.co/image/59102400469d20a7a7d788305bb6f9487133bb0e" , "width" : 300 } , { "height" : 64 , "url" : "https://i.scdn.co/image/6f580263bed783cb7972fce54116431e74d4fd39" , "width" : 64 } ] , "name" : "XO" , "type" : "album" , "uri" : "spotify:album:305TANxsPTFkiqS4cEilx1" } , "artists" : [ { "external_urls" : { "spotify" : "https://open.spotify.com/artist/0hEurMDQu99nJRq8pTxO14" } , "href" : "https://api.spotify.com/v1/artists/0hEurMDQu99nJRq8pTxO14" , "id" : "0hEurMDQu99nJRq8pTxO14" , "name" : "John Mayer" , "type" : "artist" , "uri" : "spotify:artist:0hEurMDQu99nJRq8pTxO14" } ] , "available_markets" : [ "AD" , "AR" , "AT" , "AU" , "BE" , "BG" , "BO" , "BR" , "CA" , "CH" , "CL" , "CO" , "CR" , "CY" , "CZ" , "DE" , "DK" , "DO" , "EC" , "EE" , "ES" , "FI" , "FR" , "GB" , "GR" , "GT" , "HK" , "HN" , "HU" , "ID" , "IE" , "IS" , "IT" , "JP" , "LI" , "LT" , "LU" , "LV" , "MC" , "MT" , "MX" , "MY" , "NI" , "NL" , "NO" , "NZ" , "PA" , "PE" , "PH" , "PL" , "PT" , "PY" , "SE" , "SG" , "SK" , "SV" , "TR" , "TW" , "US" , "UY" ] , "disc_number" : 1 , "duration_ms" : 213626 , "explicit" : false , "external_ids" : { "isrc" : "USSM11403983" } , "external_urls" : { "spotify" : "https://open.spotify.com/track/7cpCU3Denug5NGZsSpQl8v" } , "href" : "https://api.spotify.com/v1/tracks/7cpCU3Denug5NGZsSpQl8v" , "id" : "7cpCU3Denug5NGZsSpQl8v" , "name" : "XO" , "popularity" : 72 , "preview_url" : "https://p.scdn.co/mp3-preview/dbc04767449ffacfdbedaf7bc410103111603295?cid=8897482848704f2a8f8d7c79726a70d4" , "track_number" : 1 , "type" : "track" , "uri" : "spotify:track:7cpCU3Denug5NGZsSpQl8v" } ; let requestTrackById ; let requestTrackByName ; beforeEach ( ( ) => { requestTrackById = nock ( 'https://api.spotify.com:443' ) . get ( '/v1/tracks/7cpCU3Denug5NGZsSpQl8v' ) . reply ( 200 , xoTrack ) ; requestTrackByName = nock ( 'https://api.spotify.com:443' ) . get ( '/v1/search/?type=track&q=XO' ) . reply ( 200 , searchResults ) ; } ) ; afterEach ( ( ) => { nock . cleanAll ( ) ; } ) ; it ( 'should call promise success callback' , ( done ) => { let onSuccess = function ( executionResult ) { let data = executionResult . data ; expect ( data . track . name ) . toBe ( 'XO' ) ; expect ( data . track . id ) . toBe ( '7cpCU3Denug5NGZsSpQl8v' ) ; expect ( ! ! executionResult . errors ) . toBeFalsy ( ) ; expect ( requestTrackByName . isDone ( ) ) . toBeTruthy ( ) ; expect ( requestTrackById . isDone ( ) ) . toBeTruthy ( ) ; done ( ) ; } ; let onError = ( ) => { throw 'should not be called' ; } ; client . query ( `
        query {
          track(name: "XO") {
            id
            name
          }
        }
       ` ) . then ( onSuccess ) . catch ( onError ) ; } ) ; } ) ; describe ( 'when fetching a non-existing Track' , ( ) => { let request ; beforeEach ( ( ) => { request = nock ( 'https://api.spotify.com:443' ) . get ( '/v1/tracks/1zHlj4dQ8ZAtrayhuDDmk4' ) . reply ( 404 , { "error" : { "status" : 404 , "message" : "non existing id" } } ) ; } ) ; afterEach ( ( ) => { nock . cleanAll ( ) ; } ) ; it ( 'should call promise success callback with errors' , ( done ) => { let onSuccess = function ( executionResult ) { expect ( ! ! executionResult . errors ) . toBeTruthy ( ) ; expect ( request . isDone ( ) ) . toBeTruthy ( ) ; done ( ) ; } ; let onError = ( ) => { throw 'should not be called' ; } ; client . query ( `
        query {
          track(id: "1zHlj4dQ8ZAtrayhuDDmk4") {
            id
            name
          }
        }
       ` ) . then ( onSuccess ) . catch ( onError ) ; } ) ; } ) ; } ) ;