├── .gemrelease ├── .rspec ├── Gemfile ├── lib ├── spotify │ ├── version.rb │ ├── utils.rb │ └── exceptions.rb ├── spotify-client.rb ├── spotify_client │ └── version.rb └── spotify_client.rb ├── spec ├── fixtures │ ├── error_id_not_found.json │ ├── user.json │ ├── me.json │ ├── create_user_playlist.json │ ├── related_artists.json │ ├── artist.json │ ├── search_artist.json │ ├── search_album.json │ ├── artists.json │ ├── track.json │ ├── me_following.json │ ├── playlist_tracks.json │ ├── user_playlist_tracks_next.json │ ├── user_playlist_tracks.json │ ├── user_playlists.json │ ├── me_tracks.json │ ├── album_tracks.json │ ├── album.json │ ├── artist_albums.json │ ├── albums.json │ ├── artist_top_tracks.json │ └── search_track.json ├── support │ ├── request_fixtures_helper.rb │ └── vcr.rb ├── spec_helper.rb └── lib │ └── spotify_client_spec.rb ├── Guardfile ├── Rakefile ├── .gitignore ├── spotify-client.gemspec ├── LICENSE └── README.md /.gemrelease: -------------------------------------------------------------------------------- 1 | bump: 2 | tag: true 3 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --require spec_helper 3 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gemspec 4 | -------------------------------------------------------------------------------- /lib/spotify/version.rb: -------------------------------------------------------------------------------- 1 | module Spotify 2 | VERSION = '0.0.9' 3 | end 4 | -------------------------------------------------------------------------------- /lib/spotify-client.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/spotify_client' 2 | -------------------------------------------------------------------------------- /lib/spotify_client/version.rb: -------------------------------------------------------------------------------- 1 | module Spotify 2 | VERSION = '0.0.10' 3 | end 4 | -------------------------------------------------------------------------------- /spec/fixtures/error_id_not_found.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "type": "not_found", 4 | "description": "non existing id" 5 | } 6 | } -------------------------------------------------------------------------------- /spec/support/request_fixtures_helper.rb: -------------------------------------------------------------------------------- 1 | module RequestFixturesHelper 2 | def request_fixture(name) 3 | File.read("spec/fixtures/#{name}.json") 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /Guardfile: -------------------------------------------------------------------------------- 1 | guard :rspec do 2 | watch(%r{^spec/.+_spec\.rb$}) 3 | watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } 4 | watch('spec/spec_helper.rb') { "spec" } 5 | end 6 | -------------------------------------------------------------------------------- /lib/spotify/utils.rb: -------------------------------------------------------------------------------- 1 | class Array 2 | def self.wrap(object) 3 | if object.nil? 4 | [] 5 | elsif object.respond_to?(:to_ary) 6 | object.to_ary || [object] 7 | else 8 | [object] 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /spec/fixtures/user.json: -------------------------------------------------------------------------------- 1 | { 2 | "external_urls": { 3 | "spotify": "https://open.spotify.com/user/masterkain" 4 | }, 5 | "href": "https://api.spotify.com/v1/users/masterkain", 6 | "id": "masterkain", 7 | "type": "user", 8 | "uri": "spotify:user:masterkain" 9 | } 10 | -------------------------------------------------------------------------------- /spec/support/vcr.rb: -------------------------------------------------------------------------------- 1 | # VCR configuration file. 2 | # require 'vcr' 3 | # 4 | # VCR.configure do |c| 5 | # c.configure_rspec_metadata! 6 | # c.hook_into :excon 7 | # c.cassette_library_dir = 'spec/fixtures' 8 | # c.default_cassette_options = { record: :none } 9 | # end 10 | -------------------------------------------------------------------------------- /lib/spotify/exceptions.rb: -------------------------------------------------------------------------------- 1 | module Spotify 2 | class ImplementationError < StandardError; end 3 | class Error < StandardError; end 4 | class AuthenticationError < Error; end 5 | class HTTPError < Error; end 6 | class InsufficientClientScopeError < Error; end 7 | class BadRequest < Error; end 8 | class ResourceNotFound < Error; end 9 | end 10 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require 'rake' 2 | require 'rake/testtask' 3 | 4 | Rake::TestTask.new do |t| 5 | t.libs << 'lib' 6 | t.pattern = 'test/**/*_test.rb' 7 | t.verbose = false 8 | end 9 | 10 | task :default => :test 11 | 12 | task :console do 13 | exec "EXCON_DEBUG=true irb -r spotify-client -I ./lib" 14 | # exec "irb -r spotify-client -I ./lib" 15 | end 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Because this is a gem, ignore Gemfile.lock: 2 | 3 | Gemfile.lock 4 | 5 | # And because this is Ruby, ignore the following 6 | # (source: https://github.com/github/gitignore/blob/master/Ruby.gitignore): 7 | 8 | *.gem 9 | *.rbc 10 | .bundle 11 | .config 12 | coverage 13 | InstalledFiles 14 | lib/bundler/man 15 | pkg 16 | rdoc 17 | spec/reports 18 | test/tmp 19 | test/version_tmp 20 | tmp 21 | 22 | # YARD artifacts 23 | .yardoc 24 | _yardoc 25 | doc/ 26 | 27 | .ruby-version 28 | .ruby-gemset 29 | -------------------------------------------------------------------------------- /spec/fixtures/me.json: -------------------------------------------------------------------------------- 1 | { 2 | "display_name": "Some Random User", 3 | "external_urls": { 4 | "spotify": "https://open.spotify.com/user/some_random_user" 5 | }, 6 | "href": "https://api.spotify.com/v1/users/some_random_user", 7 | "id": "some_random_user", 8 | "images": [ 9 | { 10 | "height": null, 11 | "url": "http://profile-images.scdn.co/images/userprofile/default/xx", 12 | "width": null 13 | } 14 | ], 15 | "product": "premium", 16 | "type": "user", 17 | "uri": "spotify:user:some_random_user" 18 | } 19 | -------------------------------------------------------------------------------- /spec/fixtures/create_user_playlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "collaborative" : false, 3 | "description" : null, 4 | "external_urls" : { 5 | "spotify" : "http://open.spotify.com/user/masterkain/playlists/7Kud0O2IdWLbEGgvBkW9di" 6 | }, 7 | "followers" : null, 8 | "href" : "https://api.spotify.com/v1/users/masterkain/playlists/7Kud0O2IdWLbEGgvBkW9di", 9 | "id" : "7Kud0O2IdWLbEGgvBkW9di", 10 | "images" : [ null ], 11 | "name" : "Test from API 3.0", 12 | "owner" : { 13 | "external_urls" : { 14 | "spotify" : "http://open.spotify.com/user/masterkain" 15 | }, 16 | "href" : "https://api.spotify.com/v1/users/masterkain", 17 | "id" : "masterkain", 18 | "type" : "user", 19 | "uri": "spotify:user:masterkain" 20 | }, 21 | "public" : true, 22 | "tracks" : null, 23 | "type" : "playlist", 24 | "uri" : "spotify:user:masterkain:playlist:7Kud0O2IdWLbEGgvBkW9di" 25 | } 26 | -------------------------------------------------------------------------------- /spotify-client.gemspec: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | 3 | $:.unshift File.expand_path('../lib', __FILE__) 4 | require 'spotify/version' 5 | 6 | Gem::Specification.new do |s| 7 | s.name = "spotify-client" 8 | s.version = Spotify::VERSION 9 | s.authors = ["Claudio Poli"] 10 | s.email = ["claudio@icorete.ch"] 11 | s.homepage = "https://github.com/icoretech/spotify-client" 12 | s.summary = "Ruby client for the Spotify Web API" 13 | s.description = "Ruby client for the Spotify Web API" 14 | 15 | s.files = `git ls-files app lib`.split("\n") 16 | s.platform = Gem::Platform::RUBY 17 | s.require_paths = ['lib'] 18 | s.rubyforge_project = '[none]' 19 | 20 | s.add_dependency 'excon', '~> 0.37' 21 | s.add_development_dependency 'rspec', '~> 3.0' 22 | # s.add_development_dependency 'vcr' 23 | s.add_development_dependency 'guard-rspec' 24 | end 25 | -------------------------------------------------------------------------------- /spec/fixtures/related_artists.json: -------------------------------------------------------------------------------- 1 | { 2 | "artists" : [ { 3 | "external_urls" : { 4 | "spotify" : "https://open.spotify.com/artist/5K4W6rqBFWDnAN6FQUkS6x" 5 | }, 6 | "genres" : [ "Alternative Rap", "East Coast Rap", "Hardcore Rap", "Hip Hop", "Midwest Rap", "Pop-Rap", "Rap" ], 7 | "href" : "https://api.spotify.com/v1/artists/5K4W6rqBFWDnAN6FQUkS6x", 8 | "id" : "5K4W6rqBFWDnAN6FQUkS6x", 9 | "images" : [ { 10 | "height" : 332, 11 | "url" : "https://i.scdn.co/image/cfb3056fbd696dfa7c49f00b95e58d310678b747", 12 | "width" : 331 13 | }, { 14 | "height" : 201, 15 | "url" : "https://i.scdn.co/image/01405d36c7091a57b873ee5a91034ba7fc8eab8c", 16 | "width" : 200 17 | }, { 18 | "height" : 64, 19 | "url" : "https://i.scdn.co/image/a2fe02386dcb76d7ecda994db995c3fb12694690", 20 | "width" : 64 21 | } ], 22 | "name" : "Kanye West", 23 | "popularity" : 93, 24 | "type" : "artist", 25 | "uri" : "spotify:artist:5K4W6rqBFWDnAN6FQUkS6x" 26 | } ] 27 | } 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT LICENSE 2 | 3 | Copyright (c) 2014 Claudio Poli 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /spec/fixtures/artist.json: -------------------------------------------------------------------------------- 1 | { 2 | "external_urls" : { 3 | "spotify" : "https://open.spotify.com/artist/0LcJLqbBmaGUft1e9Mm8HV" 4 | }, 5 | "genres" : [ "AM Pop", "Club/Dance", "Contemporary Pop/Rock", "Dance-Pop", "Early Pop/Rock", "Euro-Pop", "Pop/Rock", "Punk/New Wave", "Rock", "Soft Rock", "Swedish Pop/Rock", "Synth Pop" ], 6 | "href" : "https://api.spotify.com/v1/artists/0LcJLqbBmaGUft1e9Mm8HV", 7 | "id" : "0LcJLqbBmaGUft1e9Mm8HV", 8 | "images" : [ { 9 | "height" : 934, 10 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/1ace43eddbf6010d417d53ce77b584bd6aa11428", 11 | "width" : 936 12 | }, { 13 | "height" : 639, 14 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/c8bf08f8ffc0402b930154368258369612b67e88", 15 | "width" : 640 16 | }, { 17 | "height" : 200, 18 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/2e4302151e258b731a731d909f148c99606a0e3c", 19 | "width" : 200 20 | }, { 21 | "height" : 64, 22 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/7cccb8fe572f8d76e7d3e11e249688ed3c028aed", 23 | "width" : 64 24 | } ], 25 | "name" : "ABBA", 26 | "popularity" : 66, 27 | "type" : "artist", 28 | "uri" : "spotify:artist:0LcJLqbBmaGUft1e9Mm8HV" 29 | } 30 | -------------------------------------------------------------------------------- /spec/fixtures/search_artist.json: -------------------------------------------------------------------------------- 1 | { 2 | "artists" : { 3 | "href" : "https://api.spotify.com/v1/search?query=gatan&offset=0&limit=20&type=artist", 4 | "items" : [ { 5 | "external_urls" : { 6 | "spotify" : "https://open.spotify.com/artist/2Bw6FyyzgCc8OD7MX59TEQ" 7 | }, 8 | "genres" : [ ], 9 | "href" : "https://api.spotify.com/v1/artists/2Bw6FyyzgCc8OD7MX59TEQ", 10 | "id" : "2Bw6FyyzgCc8OD7MX59TEQ", 11 | "images" : [ { 12 | "height" : 640, 13 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/26ca12528f16760d71c6e304a747c827b6baea50", 14 | "width" : 640 15 | }, { 16 | "height" : 300, 17 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/7fc613b33c2c2cdb8b30ebb4cb989917096bff0f", 18 | "width" : 300 19 | }, { 20 | "height" : 64, 21 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/4b88a1eb9e5c9d3f72d4902d43ea342e51ace932", 22 | "width" : 64 23 | } ], 24 | "name" : "Satan I Gatan", 25 | "popularity" : 0, 26 | "type" : "artist", 27 | "uri" : "spotify:artist:2Bw6FyyzgCc8OD7MX59TEQ" 28 | } ], 29 | "limit" : 20, 30 | "next" : null, 31 | "offset" : 0, 32 | "previous" : null, 33 | "total" : 1 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /spec/fixtures/search_album.json: -------------------------------------------------------------------------------- 1 | { 2 | "albums" : { 3 | "href" : "https://api.spotify.com/v1/search?query=gatan&offset=1&limit=1&type=album", 4 | "items" : [ { 5 | "album_type" : "single", 6 | "external_urls" : { 7 | "spotify" : "https://open.spotify.com/album/5CCjGmIH483h4J9UvME0eR" 8 | }, 9 | "href" : "https://api.spotify.com/v1/albums/5CCjGmIH483h4J9UvME0eR", 10 | "id" : "5CCjGmIH483h4J9UvME0eR", 11 | "images" : [ { 12 | "height" : 640, 13 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/743f134a97aa904f90674be6f304db28c8be91f7", 14 | "width" : 640 15 | }, { 16 | "height" : 300, 17 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/09ff1e1144cc297d42acaaa839e0ad422ba7abe5", 18 | "width" : 300 19 | }, { 20 | "height" : 64, 21 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/66d320404c8f56bb7dd0c53da61f794a70a7e07c", 22 | "width" : 64 23 | } ], 24 | "name" : "Lyckliga gatan", 25 | "type" : "album", 26 | "uri" : "spotify:album:5CCjGmIH483h4J9UvME0eR" 27 | } ], 28 | "limit" : 1, 29 | "next" : "https://api.spotify.com/v1/search?query=gatan&offset=2&limit=1&type=album", 30 | "offset" : 1, 31 | "previous" : "https://api.spotify.com/v1/search?query=gatan&offset=0&limit=1&type=album", 32 | "total" : 17 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /spec/fixtures/artists.json: -------------------------------------------------------------------------------- 1 | { 2 | "external_urls" : { 3 | "spotify" : "https://open.spotify.com/artist/0oSGxfWSnnOXhD2fKuz2Gy" 4 | }, 5 | "genres" : [ "Adult Alternative Pop/Rock", "Album Rock", "Alternative Pop/Rock", "Alternative/Indie Rock", "Art Rock", "Avant-Garde", "Blue-Eyed Soul", "British Folk", "British Folk-Rock", "British Invasion", "British Psychedelia", "Christmas", "Club/Dance", "Contemporary Folk", "Contemporary Pop/Rock", "Dance-Pop", "Dance-Rock", "Experimental", "Experimental Rock", "Film Music", "Folk-Rock", "Glam Rock", "Hard Rock", "Holiday", "Holidays", "Mod", "Original Score", "Pop/Rock", "Post-Punk", "Progressive Country", "Proto-Punk", "Psychedelic", "Punk/New Wave", "Singer/Songwriter", "Sophisti-Pop", "Soundtracks", "Stage & Screen" ], 6 | "href" : "https://api.spotify.com/v1/artists/0oSGxfWSnnOXhD2fKuz2Gy", 7 | "id" : "0oSGxfWSnnOXhD2fKuz2Gy", 8 | "images" : [ { 9 | "height" : 1000, 10 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/32bd9707b42a2c081482ec9cd3ffa8879f659f95", 11 | "width" : 1000 12 | }, { 13 | "height" : 640, 14 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/865f24753e5e4f40a383bf24a9cdda598a4559a8", 15 | "width" : 640 16 | }, { 17 | "height" : 200, 18 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/7ddd6fa5cf78aee2f2e8b347616151393022b7d9", 19 | "width" : 200 20 | }, { 21 | "height" : 64, 22 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/c8dc28c191432862afce298216458a6f00bbfbd8", 23 | "width" : 64 24 | } ], 25 | "name" : "David Bowie", 26 | "popularity" : 77, 27 | "type" : "artist", 28 | "uri" : "spotify:artist:0oSGxfWSnnOXhD2fKuz2Gy" 29 | } 30 | -------------------------------------------------------------------------------- /spec/fixtures/track.json: -------------------------------------------------------------------------------- 1 | { 2 | "album" : { 3 | "album_type" : "album", 4 | "external_urls" : { 5 | "spotify" : "https://open.spotify.com/album/6TJmQnO44YE5BtTxH8pop1" 6 | }, 7 | "href" : "https://api.spotify.com/v1/albums/6TJmQnO44YE5BtTxH8pop1", 8 | "id" : "6TJmQnO44YE5BtTxH8pop1", 9 | "images" : [ { 10 | "height" : 640, 11 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/8e13218039f81b000553e25522a7f0d7a0600f2e", 12 | "width" : 629 13 | }, { 14 | "height" : 300, 15 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/8c1e066b5d1045038437d92815d49987f519e44f", 16 | "width" : 295 17 | }, { 18 | "height" : 64, 19 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/d49268a8fc0768084f4750cf1647709e89a27172", 20 | "width" : 63 21 | } ], 22 | "name" : "Hot Fuss", 23 | "type" : "album", 24 | "uri" : "spotify:album:6TJmQnO44YE5BtTxH8pop1" 25 | }, 26 | "artists" : [ { 27 | "external_urls" : { 28 | "spotify" : "https://open.spotify.com/artist/0C0XlULifJtAgn6ZNCW2eu" 29 | }, 30 | "href" : "https://api.spotify.com/v1/artists/0C0XlULifJtAgn6ZNCW2eu", 31 | "id" : "0C0XlULifJtAgn6ZNCW2eu", 32 | "name" : "The Killers", 33 | "type" : "artist", 34 | "uri" : "spotify:artist:0C0XlULifJtAgn6ZNCW2eu" 35 | } ], 36 | "available_markets" : [ "AD", "AR", "AT", "AU", "BE", "BG", "BO", "BR", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EC", "EE", "ES", "FI", "FR", "GR", "GT", "HK", "HN", "HU", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "UY" ], 37 | "disc_number" : 1, 38 | "duration_ms" : 222075, 39 | "explicit" : false, 40 | "external_ids" : { 41 | "isrc" : "USIR20400274" 42 | }, 43 | "external_urls" : { 44 | "spotify" : "https://open.spotify.com/track/0eGsygTp906u18L0Oimnem" 45 | }, 46 | "href" : "https://api.spotify.com/v1/tracks/0eGsygTp906u18L0Oimnem", 47 | "id" : "0eGsygTp906u18L0Oimnem", 48 | "name" : "Mr. Brightside", 49 | "popularity" : 0, 50 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/f454c8224828e21fa146af84916fd22cb89cedc6", 51 | "track_number" : 2, 52 | "type" : "track", 53 | "uri" : "spotify:track:0eGsygTp906u18L0Oimnem" 54 | } 55 | -------------------------------------------------------------------------------- /spec/fixtures/me_following.json: -------------------------------------------------------------------------------- 1 | { 2 | "artists": { 3 | "items": [{ 4 | "external_urls": { 5 | "spotify": "https://open.spotify.com/artist/1Cs0zKBU1kc0i8ypK3B9ai" 6 | }, 7 | "followers": { 8 | "href": null, 9 | "total": 7181623 10 | }, 11 | "genres": ["edm", "electro house", "house"], 12 | "href": "https://api.spotify.com/v1/artists/1Cs0zKBU1kc0i8ypK3B9ai", 13 | "id": "1Cs0zKBU1kc0i8ypK3B9ai", 14 | "images":[{ 15 | "height": 1500, 16 | "url": "https://i.scdn.co/image/26b98e5d8460cda21f5c6f3a487694f8b926557d", 17 | "width": 1000 18 | }, { 19 | "height": 960, 20 | "url": "https://i.scdn.co/image/de2597004ad9095d519a0cc54adecd490e390beb", 21 | "width": 640 22 | }, { 23 | "height": 300, 24 | "url": "https://i.scdn.co/image/ac58b62ef5d7ae28e6dab2d70c521eaf58e7b343", 25 | "width": 200 26 | }, { 27 | "height": 96, 28 | "url": "https://i.scdn.co/image/224f5a395a8e2b4eee9feb41b9f6e7ac2d6b7c1a", 29 | "width": 64 30 | }], 31 | "name": "David Guetta", 32 | "popularity": 89, 33 | "type": "artist", 34 | "uri": "spotify:artist:1Cs0zKBU1kc0i8ypK3B9ai" 35 | }, { 36 | "external_urls": { 37 | "spotify": "https://open.spotify.com/artist/2Hjj68yyUPiC0HKEOigcEp" 38 | }, 39 | "followers": { 40 | "href": null, 41 | "total": 189807 42 | }, 43 | "genres": ["teen pop"], 44 | "href": "https://api.spotify.com/v1/artists/2Hjj68yyUPiC0HKEOigcEp", 45 | "id": "2Hjj68yyUPiC0HKEOigcEp", 46 | "images": [{ 47 | "height": 1500, 48 | "url": "https://i.scdn.co/image/e7ad1592061c2b0314da99d5c1355a4539e6950a", 49 | "width": 1000 50 | }, { 51 | "height": 960, 52 | "url": "https://i.scdn.co/image/325f7e6200695572a035b6d1673d58abaf209dc1", 53 | "width": 640 54 | }, { 55 | "height": 300, 56 | "url": "https://i.scdn.co/image/792b729b337753edf8a0125fd203e4182765ea9a", 57 | "width": 200 58 | }, { 59 | "height": 96, 60 | "url": "https://i.scdn.co/image/61bcc608fa4a58dff09fd5dad12fcf1e7250cf2c", 61 | "width": 64 62 | }], 63 | "name": "Jesse McCartney", 64 | "popularity": 64, 65 | "type": "artist", 66 | "uri": "spotify:artist:2Hjj68yyUPiC0HKEOigcEp" 67 | }], 68 | "next": null, 69 | "total": 2, 70 | "cursors": {"after": null}, 71 | "limit": 20 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /spec/fixtures/playlist_tracks.json: -------------------------------------------------------------------------------- 1 | { 2 | "href" : "https://api.spotify.com/v1/users/wizzler/playlists/0EIVqzEcrY2a8vO0AUJar2/tracks", 3 | "items" : [ { 4 | "added_at" : "2013-08-21T15:10:32Z", 5 | "added_by" : { 6 | "external_urls" : { 7 | "spotify" : "http://open.spotify.com/user/wizzler" 8 | }, 9 | "href" : "https://api.spotify.com/v1/users/wizzler", 10 | "id" : "wizzler", 11 | "type" : "user", 12 | "uri" : "spotify:user:wizzler" 13 | }, 14 | "track" : { 15 | "album" : { 16 | "album_type" : "compilation", 17 | "external_urls" : { 18 | "spotify" : "https://open.spotify.com/album/1tlMz7hGkgAvwfSkBjjKaX" 19 | }, 20 | "href" : "https://api.spotify.com/v1/albums/1tlMz7hGkgAvwfSkBjjKaX", 21 | "id" : "1tlMz7hGkgAvwfSkBjjKaX", 22 | "images" : [ { 23 | "height" : 640, 24 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/d3a61153502e003eeb7f3fe24a14c4da21d59c27", 25 | "width" : 640 26 | }, { 27 | "height" : 300, 28 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/fbc5f6bbaf63ed3aad3b2f9fd7a039ce41575d37", 29 | "width" : 300 30 | }, { 31 | "height" : 64, 32 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/37f6f93843792d7cda0c705c0d8c407f588a98cb", 33 | "width" : 64 34 | } ], 35 | "name" : "Archive #2 (1976-1992)", 36 | "type" : "album", 37 | "uri" : "spotify:album:1tlMz7hGkgAvwfSkBjjKaX" 38 | }, 39 | "artists" : [ { 40 | "external_urls" : { 41 | "spotify" : "https://open.spotify.com/artist/3CkvROUTQ6nRi9yQOcsB50" 42 | }, 43 | "href" : "https://api.spotify.com/v1/artists/3CkvROUTQ6nRi9yQOcsB50", 44 | "id" : "3CkvROUTQ6nRi9yQOcsB50", 45 | "name" : "Genesis", 46 | "type" : "artist", 47 | "uri" : "spotify:artist:3CkvROUTQ6nRi9yQOcsB50" 48 | } ], 49 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "UY" ], 50 | "disc_number" : 1, 51 | "duration_ms" : 234066, 52 | "explicit" : false, 53 | "external_ids" : { 54 | "isrc" : "GBAAA0000806" 55 | }, 56 | "external_urls" : { 57 | "spotify" : "https://open.spotify.com/track/0ktyIiKtDZS71pIykdHZ08" 58 | }, 59 | "href" : "https://api.spotify.com/v1/tracks/0ktyIiKtDZS71pIykdHZ08", 60 | "id" : "0ktyIiKtDZS71pIykdHZ08", 61 | "name" : "Naminanu - 2000 Digital Remaster", 62 | "popularity" : 0, 63 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/f8982594262e8cdc158a7b0caede12723f84016a", 64 | "track_number" : 8, 65 | "type" : "track", 66 | "uri" : "spotify:track:0ktyIiKtDZS71pIykdHZ08" 67 | } 68 | } ], 69 | "limit" : 100, 70 | "next" : null, 71 | "offset" : 0, 72 | "previous" : null, 73 | "total" : 2 74 | } 75 | -------------------------------------------------------------------------------- /spec/fixtures/user_playlist_tracks_next.json: -------------------------------------------------------------------------------- 1 | { 2 | "href" : "https://api.spotify.com/v1/users/masterkain/playlists/6Df19VKaShrdWrAnHinwVO/tracks", 3 | "items" : [ { 4 | "added_at" : "2013-08-21T15:10:32Z", 5 | "added_by" : { 6 | "external_urls" : { 7 | "spotify" : "http://open.spotify.com/user/masterkain" 8 | }, 9 | "href" : "https://api.spotify.com/v1/users/masterkain", 10 | "id" : "masterkain", 11 | "type" : "user", 12 | "uri" : "spotify:user:masterkain" 13 | }, 14 | "track" : { 15 | "album" : { 16 | "album_type" : "compilation", 17 | "external_urls" : { 18 | "spotify" : "https://open.spotify.com/album/1tlMz7hGkgAvwfSkBjjKaX" 19 | }, 20 | "href" : "https://api.spotify.com/v1/albums/1tlMz7hGkgAvwfSkBjjKaX", 21 | "id" : "1tlMz7hGkgAvwfSkBjjKaX", 22 | "images" : [ { 23 | "height" : 640, 24 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/d3a61153502e003eeb7f3fe24a14c4da21d59c27", 25 | "width" : 640 26 | }, { 27 | "height" : 300, 28 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/fbc5f6bbaf63ed3aad3b2f9fd7a039ce41575d37", 29 | "width" : 300 30 | }, { 31 | "height" : 64, 32 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/37f6f93843792d7cda0c705c0d8c407f588a98cb", 33 | "width" : 64 34 | } ], 35 | "name" : "Archive #2 (1976-1992)", 36 | "type" : "album", 37 | "uri" : "spotify:album:1tlMz7hGkgAvwfSkBjjKaX" 38 | }, 39 | "artists" : [ { 40 | "external_urls" : { 41 | "spotify" : "https://open.spotify.com/artist/3CkvROUTQ6nRi9yQOcsB50" 42 | }, 43 | "href" : "https://api.spotify.com/v1/artists/3CkvROUTQ6nRi9yQOcsB50", 44 | "id" : "3CkvROUTQ6nRi9yQOcsB50", 45 | "name" : "Genesis", 46 | "type" : "artist", 47 | "uri" : "spotify:artist:3CkvROUTQ6nRi9yQOcsB50" 48 | } ], 49 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "UY" ], 50 | "disc_number" : 1, 51 | "duration_ms" : 234066, 52 | "explicit" : false, 53 | "external_ids" : { 54 | "isrc" : "GBAAA0000806" 55 | }, 56 | "external_urls" : { 57 | "spotify" : "https://open.spotify.com/track/0ktyIiKtDZS71pIykdHZ08" 58 | }, 59 | "href" : "https://api.spotify.com/v1/tracks/0ktyIiKtDZS71pIykdHZ08", 60 | "id" : "0ktyIiKtDZS71pIykdHZ08", 61 | "name" : "Naminanu - 2000 Digital Remaster", 62 | "popularity" : 0, 63 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/f8982594262e8cdc158a7b0caede12723f84016a", 64 | "track_number" : 8, 65 | "type" : "track", 66 | "uri" : "spotify:track:0ktyIiKtDZS71pIykdHZ08" 67 | } 68 | } ], 69 | "limit" : 1, 70 | "next" : null, 71 | "offset" : 1, 72 | "previous" : null, 73 | "total" : 2 74 | } 75 | -------------------------------------------------------------------------------- /spec/fixtures/user_playlist_tracks.json: -------------------------------------------------------------------------------- 1 | { 2 | "href" : "https://api.spotify.com/v1/users/masterkain/playlists/6Df19VKaShrdWrAnHinwVO/tracks", 3 | "items" : [ { 4 | "added_at" : "2013-08-21T15:10:32Z", 5 | "added_by" : { 6 | "external_urls" : { 7 | "spotify" : "http://open.spotify.com/user/masterkain" 8 | }, 9 | "href" : "https://api.spotify.com/v1/users/masterkain", 10 | "id" : "masterkain", 11 | "type" : "user", 12 | "uri" : "spotify:user:masterkain" 13 | }, 14 | "track" : { 15 | "album" : { 16 | "album_type" : "compilation", 17 | "external_urls" : { 18 | "spotify" : "https://open.spotify.com/album/1tlMz7hGkgAvwfSkBjjKaX" 19 | }, 20 | "href" : "https://api.spotify.com/v1/albums/1tlMz7hGkgAvwfSkBjjKaX", 21 | "id" : "1tlMz7hGkgAvwfSkBjjKaX", 22 | "images" : [ { 23 | "height" : 640, 24 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/d3a61153502e003eeb7f3fe24a14c4da21d59c27", 25 | "width" : 640 26 | }, { 27 | "height" : 300, 28 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/fbc5f6bbaf63ed3aad3b2f9fd7a039ce41575d37", 29 | "width" : 300 30 | }, { 31 | "height" : 64, 32 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/37f6f93843792d7cda0c705c0d8c407f588a98cb", 33 | "width" : 64 34 | } ], 35 | "name" : "Archive #2 (1976-1992)", 36 | "type" : "album", 37 | "uri" : "spotify:album:1tlMz7hGkgAvwfSkBjjKaX" 38 | }, 39 | "artists" : [ { 40 | "external_urls" : { 41 | "spotify" : "https://open.spotify.com/artist/3CkvROUTQ6nRi9yQOcsB50" 42 | }, 43 | "href" : "https://api.spotify.com/v1/artists/3CkvROUTQ6nRi9yQOcsB50", 44 | "id" : "3CkvROUTQ6nRi9yQOcsB50", 45 | "name" : "Genesis", 46 | "type" : "artist", 47 | "uri" : "spotify:artist:3CkvROUTQ6nRi9yQOcsB50" 48 | } ], 49 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "UY" ], 50 | "disc_number" : 1, 51 | "duration_ms" : 234066, 52 | "explicit" : false, 53 | "external_ids" : { 54 | "isrc" : "GBAAA0000806" 55 | }, 56 | "external_urls" : { 57 | "spotify" : "https://open.spotify.com/track/0ktyIiKtDZS71pIykdHZ08" 58 | }, 59 | "href" : "https://api.spotify.com/v1/tracks/0ktyIiKtDZS71pIykdHZ08", 60 | "id" : "0ktyIiKtDZS71pIykdHZ08", 61 | "name" : "Naminanu - 2000 Digital Remaster", 62 | "popularity" : 0, 63 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/f8982594262e8cdc158a7b0caede12723f84016a", 64 | "track_number" : 8, 65 | "type" : "track", 66 | "uri" : "spotify:track:0ktyIiKtDZS71pIykdHZ08" 67 | } 68 | } ], 69 | "limit" : 1, 70 | "next" : "https://api.spotify.com/v1/users/masterkain/playlists/6Df19VKaShrdWrAnHinwVO/tracks?offset=1&limit=1", 71 | "offset" : 0, 72 | "previous" : null, 73 | "total" : 2 74 | } 75 | -------------------------------------------------------------------------------- /spec/fixtures/user_playlists.json: -------------------------------------------------------------------------------- 1 | { 2 | "href" : "https://api.spotify.com/v1/users/some_random_user/playlists", 3 | "total" : 4, 4 | "items" : [ { 5 | "name" : "Starred", 6 | "collaborative" : false, 7 | "tracks" : { 8 | "href" : "https://api.spotify.com/v1/users/some_random_user/starred/tracks", 9 | "total" : 33 10 | }, 11 | "public" : true, 12 | "href" : "https://api.spotify.com/v1/users/some_random_user/starred/", 13 | "id" : null, 14 | "type" : "playlist", 15 | "owner" : { 16 | "id" : "some_random_user", 17 | "uri" : "spotify:user:some_random_user", 18 | "type" : "user", 19 | "href" : "https://api.spotify.com/v1/users/some_random_user", 20 | "external_urls" : { 21 | "spotify" : "http://open.spotify.com/user/some_random_user" 22 | } 23 | }, 24 | "uri" : "spotify:user:some_random_user:starred", 25 | "external_urls" : { 26 | "spotify" : "http://open.spotify.com/user/some_random_user/starred/" 27 | } 28 | }, { 29 | "name" : "Brit Awards 2010", 30 | "collaborative" : false, 31 | "tracks" : { 32 | "href" : "https://api.spotify.com/v1/users/brit-awards/playlists/4ONAkfFuy4HXrsDUXpaqqw/tracks", 33 | "total" : 68 34 | }, 35 | "public" : true, 36 | "href" : "https://api.spotify.com/v1/users/brit-awards/playlists/4ONAkfFuy4HXrsDUXpaqqw", 37 | "id" : "4ONAkfFuy4HXrsDUXpaqqw", 38 | "type" : "playlist", 39 | "owner" : { 40 | "id" : "brit-awards", 41 | "uri" : "spotify:user:brit-awards", 42 | "type" : "user", 43 | "href" : "https://api.spotify.com/v1/users/brit-awards", 44 | "external_urls" : { 45 | "spotify" : "http://open.spotify.com/user/brit-awards" 46 | } 47 | }, 48 | "uri" : "spotify:user:brit-awards:playlist:4ONAkfFuy4HXrsDUXpaqqw", 49 | "external_urls" : { 50 | "spotify" : "http://open.spotify.com/user/brit-awards/playlists/4ONAkfFuy4HXrsDUXpaqqw" 51 | } 52 | }, { 53 | "name" : "groove", 54 | "collaborative" : false, 55 | "tracks" : { 56 | "href" : "https://api.spotify.com/v1/users/mapachespotify/playlists/02FePCZXzu6rIhUxAsvFJ0/tracks", 57 | "total" : 9 58 | }, 59 | "public" : true, 60 | "href" : "https://api.spotify.com/v1/users/mapachespotify/playlists/02FePCZXzu6rIhUxAsvFJ0", 61 | "id" : "02FePCZXzu6rIhUxAsvFJ0", 62 | "type" : "playlist", 63 | "owner" : { 64 | "id" : "mapachespotify", 65 | "uri" : "spotify:user:mapachespotify", 66 | "type" : "user", 67 | "href" : "https://api.spotify.com/v1/users/mapachespotify", 68 | "external_urls" : { 69 | "spotify" : "http://open.spotify.com/user/mapachespotify" 70 | } 71 | }, 72 | "uri" : "spotify:user:mapachespotify:playlist:02FePCZXzu6rIhUxAsvFJ0", 73 | "external_urls" : { 74 | "spotify" : "http://open.spotify.com/user/mapachespotify/playlists/02FePCZXzu6rIhUxAsvFJ0" 75 | } 76 | }, { 77 | "name" : "Indie", 78 | "collaborative" : false, 79 | "tracks" : { 80 | "href" : "https://api.spotify.com/v1/users/some_random_user/playlists/6GtlPiJzs7zxtmcjKMz7fr/tracks", 81 | "total" : 3 82 | }, 83 | "public" : true, 84 | "href" : "https://api.spotify.com/v1/users/some_random_user/playlists/6GtlPiJzs7zxtmcjKMz7fr", 85 | "id" : "6GtlPiJzs7zxtmcjKMz7fr", 86 | "type" : "playlist", 87 | "owner" : { 88 | "id" : "some_random_user", 89 | "uri" : "spotify:user:some_random_user", 90 | "type" : "user", 91 | "href" : "https://api.spotify.com/v1/users/some_random_user", 92 | "external_urls" : { 93 | "spotify" : "http://open.spotify.com/user/some_random_user" 94 | } 95 | }, 96 | "uri" : "spotify:user:some_random_user:playlist:6GtlPiJzs7zxtmcjKMz7fr", 97 | "external_urls" : { 98 | "spotify" : "http://open.spotify.com/user/some_random_user/playlists/6GtlPiJzs7zxtmcjKMz7fr" 99 | } 100 | }] 101 | } 102 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # spotify-client 2 | 3 | Ruby Client for the [Spotify Web API](https://developer.spotify.com/web-api/). 4 | 5 | [![Gem Version](https://badge.fury.io/rb/spotify-client.svg)](http://badge.fury.io/rb/spotify-client) 6 | 7 | ## Installation 8 | 9 | Add this line to your application's `Gemfile`: 10 | 11 | ```ruby 12 | gem 'spotify-client' 13 | ``` 14 | 15 | And then execute: 16 | 17 | ```bash 18 | $ bundle 19 | ``` 20 | 21 | Or install it yourself as: 22 | 23 | ```bash 24 | $ gem install spotify-client 25 | ``` 26 | 27 | ## Features and Goals 28 | 29 | * Optional persistent connections 30 | * Ease of use 31 | * Extremely light footprint, memory is always a concern. 32 | * Be future-proof. 33 | 34 | ## Usage / Notes 35 | 36 | This gem is pretty new and it should not be used in production environments yet. 37 | 38 | It has been tested on Ruby 2.1+ only. Feel free to play around with it. 39 | 40 | ```ruby 41 | # Sample configuration: 42 | config = { 43 | :access_token => 'tk', # initialize the client with an access token to perform authenticated calls 44 | :raise_errors => true, # choose between returning false or raising a proper exception when API calls fails 45 | 46 | # Connection properties 47 | :retries => 0, # automatically retry a certain number of times before returning 48 | :read_timeout => 10, # set longer read_timeout, default is 10 seconds 49 | :write_timeout => 10, # set longer write_timeout, default is 10 seconds 50 | :persistent => false # when true, make multiple requests calls using a single persistent connection. Use +close_connection+ method on the client to manually clean up sockets 51 | } 52 | client = Spotify::Client.new(config) 53 | # or with default options: 54 | client = Spotify::Client.new 55 | ``` 56 | 57 | If you want to perform authenticated calls include `access_token` during initialization. 58 | Note that there are particular calls that not only requires authentication but the correct scopes. 59 | 60 | Read more about scopes [here](https://developer.spotify.com/web-api/using-scopes/). 61 | 62 | ```ruby 63 | # Current methods' signatures 64 | client.me 65 | client.user(user_id) 66 | client.me_tracks 67 | client.user_playlists(user_id) 68 | client.user_playlist(user_id, playlist_id) 69 | client.user_playlist_tracks(user_id, playlist_id, params = {}) 70 | client.create_user_playlist(user_id, name, is_public = true) 71 | client.add_user_tracks_to_playlist(user_id, playlist_id, uris = [], position = nil) 72 | client.remove_user_tracks_from_playlist(user_id, playlist_id, tracks) 73 | client.replace_user_tracks_in_playlist(user_id, playlist_id, tracks) 74 | client.truncate_user_playlist(user_id, playlist_id) 75 | client.album(album_id) 76 | client.album_tracks(album_id) 77 | client.albums(album_ids) 78 | client.track(track_id) 79 | client.tracks(track_ids) 80 | client.artist(artist_id) 81 | client.artists(artist_ids) 82 | client.artist_albums(artist_id) 83 | client.search(entity, term) 84 | client.artist_top_tracks(artist_id, country_id) 85 | client.related_artists(artist_id) 86 | client.follow(type, ids) 87 | client.follow_playlist(user_id, playlist_id, is_public = true) 88 | ``` 89 | 90 | Please also refer to the source file [spotify_client.rb](https://github.com/icoretech/spotify-client/blob/master/lib/spotify_client.rb). 91 | 92 | More documentation will follow soon. 93 | 94 | ## Authentication 95 | 96 | In order to use authenticated features you need to obtain access tokens. 97 | This feature is not supported (yet) by this gem, but if you'd like to let users authenticate against Spotify in a Rails/OmniAuth app you can use [icoretech/omniauth-spotify](https://github.com/icoretech/omniauth-spotify). 98 | 99 | ## TODO 100 | 101 | * Finish the spec suite and start implementing VCR instead of single response mocks, which doesn't add much value. 102 | * More OAuth2 features? 103 | * Modeling / Hashie / Indifferent Access response encapsulation? 104 | * CI setup 105 | 106 | ## License 107 | 108 | Please refer to [LICENSE.md](https://github.com/icoretech/spotify-client/blob/master/LICENSE). 109 | -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | # This file was generated by the `rspec --init` command. Conventionally, all 2 | # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. 3 | # The generated `.rspec` file contains `--require spec_helper` which will cause this 4 | # file to always be loaded, without a need to explicitly require it in any files. 5 | # 6 | # Given that it is always loaded, you are encouraged to keep this file as 7 | # light-weight as possible. Requiring heavyweight dependencies from this file 8 | # will add to the boot time of your test suite on EVERY test run, even for an 9 | # individual file that may not need all of that loaded. Instead, make a 10 | # separate helper file that requires this one and then use it only in the specs 11 | # that actually need it. 12 | # 13 | # The `.rspec` file also contains a few flags that are not defaults but that 14 | # users commonly want. 15 | # 16 | # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration 17 | require 'spotify-client' 18 | 19 | Dir["./spec/support/**/*.rb"].sort.each { |f| require f } 20 | 21 | RSpec.configure do |config| 22 | # The settings below are suggested to provide a good initial experience 23 | # with RSpec, but feel free to customize to your heart's content. 24 | 25 | # These two settings work together to allow you to limit a spec run 26 | # to individual examples or groups you care about by tagging them with 27 | # `:focus` metadata. When nothing is tagged with `:focus`, all examples 28 | # get run. 29 | config.filter_run :focus 30 | config.run_all_when_everything_filtered = true 31 | 32 | # This setting enables warnings. It's recommended, but in some cases may 33 | # be too noisy due to issues in dependencies. 34 | config.warnings = false 35 | 36 | # Many RSpec users commonly either run the entire suite or an individual 37 | # file, and it's useful to allow more verbose output when running an 38 | # individual spec file. 39 | if config.files_to_run.one? 40 | # Use the documentation formatter for detailed output, 41 | # unless a formatter has already been configured 42 | # (e.g. via a command-line flag). 43 | config.default_formatter = 'doc' 44 | end 45 | 46 | # Print the 10 slowest examples and example groups at the 47 | # end of the spec run, to help surface which specs are running 48 | # particularly slow. 49 | # config.profile_examples = 10 50 | 51 | # Run specs in random order to surface order dependencies. If you find an 52 | # order dependency and want to debug it, you can fix the order by providing 53 | # the seed, which is printed after each run. 54 | # --seed 1234 55 | config.order = :random 56 | 57 | # Seed global randomization in this process using the `--seed` CLI option. 58 | # Setting this allows you to use `--seed` to deterministically reproduce 59 | # test failures related to randomization by passing the same `--seed` value 60 | # as the one that triggered the failure. 61 | Kernel.srand config.seed 62 | 63 | # rspec-expectations config goes here. You can use an alternate 64 | # assertion/expectation library such as wrong or the stdlib/minitest 65 | # assertions if you prefer. 66 | config.expect_with :rspec do |expectations| 67 | # Enable only the newer, non-monkey-patching expect syntax. 68 | # For more details, see: 69 | # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax 70 | expectations.syntax = :expect 71 | end 72 | 73 | # rspec-mocks config goes here. You can use an alternate test double 74 | # library (such as bogus or mocha) by changing the `mock_with` option here. 75 | config.mock_with :rspec do |mocks| 76 | # Enable only the newer, non-monkey-patching expect syntax. 77 | # For more details, see: 78 | # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/ 79 | mocks.syntax = :expect 80 | 81 | # Prevents you from mocking or stubbing a method that does not exist on 82 | # a real object. This is generally recommended. 83 | mocks.verify_partial_doubles = true 84 | end 85 | 86 | config.include RequestFixturesHelper 87 | 88 | config.before(:all) do 89 | Excon.defaults[:mock] = true 90 | end 91 | 92 | config.after(:each) do 93 | Excon.stubs.clear 94 | end 95 | end 96 | -------------------------------------------------------------------------------- /spec/lib/spotify_client_spec.rb: -------------------------------------------------------------------------------- 1 | describe Spotify::Client do 2 | let(:authenticated_client) { described_class.new(access_token: 'test', raise_errors: true) } 3 | let(:anonymous_client) { described_class.new(raise_errors: true) } 4 | 5 | describe "BASE_URI" do 6 | it "should have correct value" do 7 | expect(Spotify::Client::BASE_URI).to eq('https://api.spotify.com') 8 | end 9 | end 10 | 11 | describe ".me" do 12 | let(:fixture) { request_fixture('me') } 13 | 14 | it "should raise error as authenticated client" do 15 | Excon.stub({ :method => :get, :path => '/v1/me', :headers => { 'Authorization' => "Bearer test" } }, { :status => 401 }) 16 | expect {authenticated_client.me}.to raise_error(Spotify::AuthenticationError) 17 | end 18 | it "should raise error as anonymous client" do 19 | Excon.stub({ :method => :get, :path => '/v1/me' }, { :status => 401 }) 20 | expect {anonymous_client.me}.to raise_error(Spotify::AuthenticationError) 21 | end 22 | it "should get response" do 23 | Excon.stub({ :method => :get, :path => '/v1/me', :headers => { 'Authorization' => "Bearer test" } }, { :status => 200, :body => fixture }) 24 | response = authenticated_client.me 25 | expect(response.keys.count).to eq(8) 26 | expect(response['id']).to eq('some_random_user') 27 | expect(response['display_name']).to eq('Some Random User') 28 | end 29 | end 30 | 31 | describe ".me_tracks" do 32 | let(:fixture) { request_fixture('me_tracks') } 33 | 34 | it "should raise error as authenticated client" do 35 | Excon.stub({ :method => :get, :path => '/v1/me/tracks', :headers => { 'Authorization' => "Bearer test" } }, { :status => 401 }) 36 | expect {authenticated_client.me_tracks}.to raise_error(Spotify::AuthenticationError) 37 | end 38 | it "should raise error as anonymous client" do 39 | Excon.stub({ :method => :get, :path => '/v1/me/tracks' }, { :status => 401 }) 40 | expect {anonymous_client.me_tracks}.to raise_error(Spotify::AuthenticationError) 41 | end 42 | it "should get response" do 43 | Excon.stub({ :method => :get, :path => '/v1/me/tracks', :headers => { 'Authorization' => "Bearer test" } }, { :status => 200, :body => fixture }) 44 | response = authenticated_client.me_tracks 45 | 46 | expect(response.keys.count).to eq(7) 47 | expect(response['href']).to match(/http/) 48 | expect(response['total']).to be_a(Integer) 49 | expect(response['items']).to be_a(Array) 50 | end 51 | end 52 | 53 | describe ".me_following" do 54 | let(:fixture) { request_fixture('me_following') } 55 | 56 | it "should rails error as authenticated client" do 57 | Excon.stub({ :method => :get, :path => '/v1/me/following', :headers => { 'Authorization' => "Bearer test" } }, { :status => 401 }) 58 | expect {authenticated_client.me_following}.to raise_error(Spotify::AuthenticationError) 59 | end 60 | it "should raise error as anonymous client" do 61 | Excon.stub({ :method => :get, :path => '/v1/me/following' }, { :status => 401 }) 62 | expect {anonymous_client.me_following}.to raise_error(Spotify::AuthenticationError) 63 | end 64 | it "should get response" do 65 | Excon.stub({ :method => :get, :path => '/v1/me/following', :headers => { 'Authorization' => "Bearer test" } }, { :status => 200, :body => fixture }) 66 | response = authenticated_client.me_following 67 | 68 | expect(response['artists']).to be_a(Hash) 69 | expect(response['artists'].keys.count).to eq(5) 70 | expect(response['artists']['items']).to be_a(Array) 71 | expect(response['artists']['total']).to be_a(Integer) 72 | expect(response['artists']['limit']).to eq(20) 73 | expect(response['artists']).to have_key('next') 74 | expect(response['artists']['cursors']).to be_a(Hash) 75 | expect(response['artists']['cursors']).to have_key("after") 76 | end 77 | end 78 | 79 | describe ".user" do 80 | let(:fixture) { request_fixture('user') } 81 | 82 | it "should raise error as authenticated client" do 83 | Excon.stub({ :method => :get, :path => "/v1/users/masterkain", :headers => { 'Authorization' => "Bearer test" } }, { :status => 401 }) 84 | expect {authenticated_client.user('masterkain')}.to raise_error(Spotify::AuthenticationError) 85 | end 86 | it "should raise error as anonymous client" do 87 | Excon.stub({ :method => :get, :path => "/v1/users/masterkain" }, { :status => 401 }) 88 | expect {anonymous_client.user('masterkain')}.to raise_error(Spotify::AuthenticationError) 89 | end 90 | it "should get response" do 91 | Excon.stub({ :method => :get, :path => "/v1/users/masterkain", :headers => { 'Authorization' => "Bearer test" } }, { :status => 200, :body => fixture }) 92 | response = authenticated_client.user('masterkain') 93 | expect(response.keys.count).to eq(5) 94 | expect(response['id']).to eq('masterkain') 95 | expect(response['type']).to eq('user') 96 | end 97 | end 98 | 99 | describe ".user_playlists" do 100 | let(:fixture) { request_fixture('user_playlists') } 101 | 102 | it "should raise error as authenticated client" do 103 | Excon.stub({ :method => :get, :path => "/v1/users/masterkain/playlists", :headers => { 'Authorization' => "Bearer test" } }, { :status => 401 }) 104 | expect {authenticated_client.user_playlists('masterkain')}.to raise_error(Spotify::AuthenticationError) 105 | end 106 | it "should raise error as anonymous client" do 107 | Excon.stub({ :method => :get, :path => "/v1/users/masterkain/playlists" }, { :status => 401 }) 108 | expect {anonymous_client.user_playlists('masterkain')}.to raise_error(Spotify::AuthenticationError) 109 | end 110 | it "should get response" do 111 | Excon.stub({ :method => :get, :path => "/v1/users/masterkain/playlists", :headers => { 'Authorization' => "Bearer test" } }, { :status => 200, :body => fixture }) 112 | response = authenticated_client.user_playlists('masterkain') 113 | expect(response.keys.count).to eq(3) 114 | expect(response['href']).to match(/http/) 115 | expect(response['total']).to be_a(Integer) 116 | expect(response['items']).to be_a(Array) 117 | end 118 | end 119 | 120 | describe ".user_playlist_tracks" do 121 | let(:fixture) { request_fixture('user_playlist_tracks') } 122 | let(:next_fixture) { request_fixture('user_playlist_tracks_next') } 123 | 124 | it "should raise error as authenticated client" do 125 | Excon.stub({ :method => :get, :path => "/v1/users/masterkain/playlists/my/tracks", :headers => { 'Authorization' => "Bearer test" } }, { :status => 401 }) 126 | expect {authenticated_client.user_playlist_tracks('masterkain', 'my')}.to raise_error(Spotify::AuthenticationError) 127 | end 128 | it "should raise error as anonymous client" do 129 | Excon.stub({ :method => :get, :path => "/v1/users/masterkain/playlists/my/tracks" }, { :status => 401 }) 130 | expect {anonymous_client.user_playlist_tracks('masterkain', 'my')}.to raise_error(Spotify::AuthenticationError) 131 | end 132 | it "should get response" do 133 | Excon.stub({ :method => :get, :path => "/v1/users/masterkain/playlists/my/tracks", :headers => { 'Authorization' => "Bearer test" } }, { :status => 200, :body => fixture }) 134 | Excon.stub({ :method => :get, :path => "/v1/users/masterkain/playlists/6Df19VKaShrdWrAnHinwVO/tracks?offset=1&limit=1", :headers => { 'Authorization' => "Bearer test" } }, { :status => 200, :body => next_fixture }) 135 | response = authenticated_client.user_playlist_tracks('masterkain', 'my') 136 | expect(response.keys.count).to eq(7) 137 | expect(response['items']).to be_a(Array) 138 | expect(response['items'].count).to eq(2) 139 | end 140 | end 141 | 142 | describe ".create_user_playlist" do 143 | let(:fixture) { request_fixture('create_user_playlist') } 144 | 145 | it "should raise error as authenticated client" do 146 | Excon.stub({ :method => :post, :path => "/v1/users/masterkain/playlists", :headers => { 'Authorization' => "Bearer test" } }, { :status => 401 }) 147 | expect {authenticated_client.create_user_playlist('masterkain', 'my')}.to raise_error(Spotify::AuthenticationError) 148 | end 149 | it "should raise error as anonymous client" do 150 | Excon.stub({ :method => :post, :path => "/v1/users/masterkain/playlists" }, { :status => 401 }) 151 | expect {anonymous_client.create_user_playlist('masterkain', 'my')}.to raise_error(Spotify::AuthenticationError) 152 | end 153 | it "should get response" do 154 | Excon.stub({ :method => :post, :path => "/v1/users/masterkain/playlists", :headers => { 'Authorization' => "Bearer test" } }, { :status => 201, :body => fixture }) 155 | response = authenticated_client.create_user_playlist('masterkain', 'my') 156 | expect(response.keys.count).to eq(13) 157 | # expect(response['tracks']).to be_a(Array) 158 | end 159 | end 160 | 161 | describe ".search" do 162 | it "should pass additional options as search parameters" do 163 | Excon.stub({ :method => :get, :path => "/v1/search" }, { :status => 200 }) 164 | expect(authenticated_client).to receive(:run).with(any_args, hash_including(q: "bob", limit: 5)) 165 | authenticated_client.search(:artist, "bob", limit: 5) 166 | end 167 | end 168 | end 169 | -------------------------------------------------------------------------------- /spec/fixtures/me_tracks.json: -------------------------------------------------------------------------------- 1 | { 2 | "href" : "https://api.spotify.com/v1/me/tracks?offset=0&limit=20", 3 | "items" : [ { 4 | "added_at" : "2015-05-14T10:06:13Z", 5 | "track" : { 6 | "album" : { 7 | "album_type" : "single", 8 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "US", "UY" ], 9 | "external_urls" : { 10 | "spotify" : "https://open.spotify.com/album/237eTYMbbCNnA4IQG1CpTO" 11 | }, 12 | "href" : "https://api.spotify.com/v1/albums/237eTYMbbCNnA4IQG1CpTO", 13 | "id" : "237eTYMbbCNnA4IQG1CpTO", 14 | "images" : [ { 15 | "height" : 640, 16 | "url" : "https://i.scdn.co/image/b28dab031b12b88ff8ab57e509bd963028d7b9ee", 17 | "width" : 640 18 | }, { 19 | "height" : 300, 20 | "url" : "https://i.scdn.co/image/0985ce7118843655e30ca22462fa8055fe78e577", 21 | "width" : 300 22 | }, { 23 | "height" : 64, 24 | "url" : "https://i.scdn.co/image/e3751e043b886eafeb11dff0e829eabb9f04fa1c", 25 | "width" : 64 26 | } ], 27 | "name" : "Питон, что за заварушка?", 28 | "type" : "album", 29 | "uri" : "spotify:album:237eTYMbbCNnA4IQG1CpTO" 30 | }, 31 | "artists" : [ { 32 | "external_urls" : { 33 | "spotify" : "https://open.spotify.com/artist/04pgbTmxJbzxlVSV0sHLAV" 34 | }, 35 | "href" : "https://api.spotify.com/v1/artists/04pgbTmxJbzxlVSV0sHLAV", 36 | "id" : "04pgbTmxJbzxlVSV0sHLAV", 37 | "name" : "Ноггано", 38 | "type" : "artist", 39 | "uri" : "spotify:artist:04pgbTmxJbzxlVSV0sHLAV" 40 | } ], 41 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "US", "UY" ], 42 | "disc_number" : 1, 43 | "duration_ms" : 312633, 44 | "explicit" : true, 45 | "external_ids" : { 46 | "isrc" : "FRX201556034" 47 | }, 48 | "external_urls" : { 49 | "spotify" : "https://open.spotify.com/track/5HJRGwFBX3MMOlpo1MY3cK" 50 | }, 51 | "href" : "https://api.spotify.com/v1/tracks/5HJRGwFBX3MMOlpo1MY3cK", 52 | "id" : "5HJRGwFBX3MMOlpo1MY3cK", 53 | "name" : "Питон, что за заварушка?", 54 | "popularity" : 15, 55 | "preview_url" : "https://p.scdn.co/mp3-preview/0419d5b28b729fcf8ae14770a3163a6e1795a073", 56 | "track_number" : 1, 57 | "type" : "track", 58 | "uri" : "spotify:track:5HJRGwFBX3MMOlpo1MY3cK" 59 | } 60 | }, { 61 | "added_at" : "2015-05-14T09:44:31Z", 62 | "track" : { 63 | "album" : { 64 | "album_type" : "single", 65 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "US", "UY" ], 66 | "external_urls" : { 67 | "spotify" : "https://open.spotify.com/album/4nv5GFXmlbxwXfgl9l3Fvy" 68 | }, 69 | "href" : "https://api.spotify.com/v1/albums/4nv5GFXmlbxwXfgl9l3Fvy", 70 | "id" : "4nv5GFXmlbxwXfgl9l3Fvy", 71 | "images" : [ { 72 | "height" : 640, 73 | "url" : "https://i.scdn.co/image/0bf2fb6638cecb5ec4712e92abd53e6ed03bd307", 74 | "width" : 640 75 | }, { 76 | "height" : 300, 77 | "url" : "https://i.scdn.co/image/a663218d898b5a58c78583476f5e9be5a909ecfb", 78 | "width" : 300 79 | }, { 80 | "height" : 64, 81 | "url" : "https://i.scdn.co/image/b9c1c1dc2b4e89543241ffe76c8854a87ce654bb", 82 | "width" : 64 83 | } ], 84 | "name" : "Дети капитана Гранта", 85 | "type" : "album", 86 | "uri" : "spotify:album:4nv5GFXmlbxwXfgl9l3Fvy" 87 | }, 88 | "artists" : [ { 89 | "external_urls" : { 90 | "spotify" : "https://open.spotify.com/artist/04pgbTmxJbzxlVSV0sHLAV" 91 | }, 92 | "href" : "https://api.spotify.com/v1/artists/04pgbTmxJbzxlVSV0sHLAV", 93 | "id" : "04pgbTmxJbzxlVSV0sHLAV", 94 | "name" : "Ноггано", 95 | "type" : "artist", 96 | "uri" : "spotify:artist:04pgbTmxJbzxlVSV0sHLAV" 97 | } ], 98 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "US", "UY" ], 99 | "disc_number" : 1, 100 | "duration_ms" : 321858, 101 | "explicit" : true, 102 | "external_ids" : { 103 | "isrc" : "FRX201540232" 104 | }, 105 | "external_urls" : { 106 | "spotify" : "https://open.spotify.com/track/1ZcwV0mqWLUvIdKg5sj2RX" 107 | }, 108 | "href" : "https://api.spotify.com/v1/tracks/1ZcwV0mqWLUvIdKg5sj2RX", 109 | "id" : "1ZcwV0mqWLUvIdKg5sj2RX", 110 | "name" : "Дети капитана Гранта", 111 | "popularity" : 17, 112 | "preview_url" : "https://p.scdn.co/mp3-preview/5291268f2c4ace5ebcf2990032a8e38707a557a1", 113 | "track_number" : 1, 114 | "type" : "track", 115 | "uri" : "spotify:track:1ZcwV0mqWLUvIdKg5sj2RX" 116 | } 117 | }, { 118 | "added_at" : "2015-05-14T09:44:29Z", 119 | "track" : { 120 | "album" : { 121 | "album_type" : "compilation", 122 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "US", "UY" ], 123 | "external_urls" : { 124 | "spotify" : "https://open.spotify.com/album/59Yeoeap2KE19ki78Ni0iE" 125 | }, 126 | "href" : "https://api.spotify.com/v1/albums/59Yeoeap2KE19ki78Ni0iE", 127 | "id" : "59Yeoeap2KE19ki78Ni0iE", 128 | "images" : [ { 129 | "height" : 640, 130 | "url" : "https://i.scdn.co/image/e60b8950edb6f54ad9f83c50bb26cb1efb5c3a1d", 131 | "width" : 640 132 | }, { 133 | "height" : 300, 134 | "url" : "https://i.scdn.co/image/a6923ed116b7267ac2cb99d0b623c4eee285b990", 135 | "width" : 300 136 | }, { 137 | "height" : 64, 138 | "url" : "https://i.scdn.co/image/6e443b2b44cbe01bb7f7e8032a816ef1fbdca4d8", 139 | "width" : 64 140 | } ], 141 | "name" : "Газгольдер саундтрек", 142 | "type" : "album", 143 | "uri" : "spotify:album:59Yeoeap2KE19ki78Ni0iE" 144 | }, 145 | "artists" : [ { 146 | "external_urls" : { 147 | "spotify" : "https://open.spotify.com/artist/04pgbTmxJbzxlVSV0sHLAV" 148 | }, 149 | "href" : "https://api.spotify.com/v1/artists/04pgbTmxJbzxlVSV0sHLAV", 150 | "id" : "04pgbTmxJbzxlVSV0sHLAV", 151 | "name" : "Ноггано", 152 | "type" : "artist", 153 | "uri" : "spotify:artist:04pgbTmxJbzxlVSV0sHLAV" 154 | }, { 155 | "external_urls" : { 156 | "spotify" : "https://open.spotify.com/artist/1V662Xly7vfsecWoSbsBtT" 157 | }, 158 | "href" : "https://api.spotify.com/v1/artists/1V662Xly7vfsecWoSbsBtT", 159 | "id" : "1V662Xly7vfsecWoSbsBtT", 160 | "name" : "АК-47", 161 | "type" : "artist", 162 | "uri" : "spotify:artist:1V662Xly7vfsecWoSbsBtT" 163 | } ], 164 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "US", "UY" ], 165 | "disc_number" : 1, 166 | "duration_ms" : 319090, 167 | "explicit" : true, 168 | "external_ids" : { 169 | "isrc" : "FR6V82456865" 170 | }, 171 | "external_urls" : { 172 | "spotify" : "https://open.spotify.com/track/7nLYWwBtp1v8bVPDHg7dx8" 173 | }, 174 | "href" : "https://api.spotify.com/v1/tracks/7nLYWwBtp1v8bVPDHg7dx8", 175 | "id" : "7nLYWwBtp1v8bVPDHg7dx8", 176 | "name" : "Russian Paradise", 177 | "popularity" : 28, 178 | "preview_url" : "https://p.scdn.co/mp3-preview/753305b71151421231e556dbcfa5275113a4a18e", 179 | "track_number" : 1, 180 | "type" : "track", 181 | "uri" : "spotify:track:7nLYWwBtp1v8bVPDHg7dx8" 182 | } 183 | } ], 184 | "limit" : 20, 185 | "next" : null, 186 | "offset" : 0, 187 | "previous" : null, 188 | "total" : 3 189 | } -------------------------------------------------------------------------------- /lib/spotify_client.rb: -------------------------------------------------------------------------------- 1 | require 'excon' 2 | require 'json' 3 | 4 | require File.dirname(__FILE__) + '/spotify/utils' 5 | require File.dirname(__FILE__) + '/spotify/exceptions' 6 | 7 | module Spotify 8 | class Client 9 | BASE_URI = 'https://api.spotify.com'.freeze 10 | 11 | attr_accessor :access_token 12 | 13 | # Initialize the client. 14 | # 15 | # @example 16 | # client = Spotify::Client.new(:access_token => 'longtoken', retries: 0, raise_errors: true) 17 | # 18 | # @param [Hash] configuration. 19 | def initialize(config = {}) 20 | @access_token = config[:access_token] 21 | @raise_errors = config[:raise_errors] || false 22 | @retries = config[:retries] || 0 23 | @read_timeout = config[:read_timeout] || 10 24 | @write_timeout = config[:write_timeout] || 10 25 | @connection = Excon.new(BASE_URI, persistent: config[:persistent] || false) 26 | end 27 | 28 | def inspect 29 | vars = instance_variables.map { |v| "#{v}=#{instance_variable_get(v).inspect}" }.join(', ') 30 | "<#{self.class}: #{vars}>" 31 | end 32 | 33 | # Closes the connection underlying socket. 34 | # Use when you employ persistent connections and are done with your requests. 35 | def close_connection 36 | @connection.reset 37 | end 38 | 39 | def me 40 | run(:get, '/v1/me', [200]) 41 | end 42 | 43 | def me_tracks 44 | run(:get, '/v1/me/tracks', [200]) 45 | end 46 | 47 | # params: 48 | # - type: Required, The ID type, currently only 'artist' is supported 49 | # - limit: Optional. The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50. 50 | # - after: Optional. The last artist ID retrieved from the previous request. 51 | def me_following(params={}) 52 | params = params.merge(type: 'artist') 53 | run(:get, "/v1/me/following", [200], params) 54 | end 55 | 56 | def user(user_id) 57 | run(:get, "/v1/users/#{user_id}", [200]) 58 | end 59 | 60 | def user_playlists(user_id) 61 | run(:get, "/v1/users/#{user_id}/playlists", [200]) 62 | end 63 | 64 | def user_playlist(user_id, playlist_id) 65 | run(:get, "/v1/users/#{user_id}/playlists/#{playlist_id}", [200]) 66 | end 67 | 68 | def user_playlist_tracks(user_id, playlist_id, params = {}) 69 | tracks = { 'items' => [] } 70 | path = "/v1/users/#{user_id}/playlists/#{playlist_id}/tracks" 71 | 72 | while path 73 | response = run(:get, path, [200], params) 74 | tracks['items'].concat(response.delete('items')) 75 | tracks.merge!(response) 76 | 77 | path = if response['next'] 78 | response['next'].gsub(BASE_URI, '') 79 | else 80 | nil 81 | end 82 | end 83 | 84 | tracks 85 | end 86 | 87 | # Create a playlist for a Spotify user. The playlist will be empty until you add tracks. 88 | # 89 | # Requires playlist-modify-public for a public playlist. 90 | # Requires playlist-modify-private for a private playlist. 91 | def create_user_playlist(user_id, name, is_public = true) 92 | run(:post, "/v1/users/#{user_id}/playlists", [201], JSON.dump(name: name, public: is_public), false) 93 | end 94 | 95 | # Add an Array of track uris to an existing playlist. 96 | # 97 | # Adding tracks to a user's public playlist requires authorization of the playlist-modify-public scope; 98 | # adding tracks to a private playlist requires the playlist-modify-private scope. 99 | # 100 | # client.add_user_tracks_to_playlist('1181346016', '7i3thJWDtmX04dJhFwYb0x', %w(spotify:track:4iV5W9uYEdYUVa79Axb7Rh spotify:track:2lzEz3A3XIFyhMDqzMdcss)) 101 | def add_user_tracks_to_playlist(user_id, playlist_id, uris = [], position = nil) 102 | params = { uris: Array.wrap(uris)[0..99].join(',') } 103 | if position 104 | params.merge!(position: position) 105 | end 106 | run(:post, "/v1/users/#{user_id}/playlists/#{playlist_id}/tracks", [201], JSON.dump(params), false) 107 | end 108 | 109 | # Removes tracks from playlist 110 | # 111 | # client.remove_user_tracks_from_playlist('1181346016', '7i3thJWDtmX04dJhFwYb0x', [{ uri: spotify:track:4iV5W9uYEdYUVa79Axb7Rh, positions: [0]}]) 112 | def remove_user_tracks_from_playlist(user_id, playlist_id, tracks) 113 | run(:delete, "/v1/users/#{user_id}/playlists/#{playlist_id}/tracks", [200], JSON.dump(tracks: tracks)) 114 | end 115 | 116 | # Replaces all occurrences of tracks with what's in the playlist 117 | # 118 | # client.replace_user_tracks_in_playlist('1181346016', '7i3thJWDtmX04dJhFwYb0x', %w(spotify:track:4iV5W9uYEdYUVa79Axb7Rh spotify:track:2lzEz3A3XIFyhMDqzMdcss)) 119 | def replace_user_tracks_in_playlist(user_id, playlist_id, tracks) 120 | run(:put, "/v1/users/#{user_id}/playlists/#{playlist_id}/tracks", [201], JSON.dump(uris: tracks)) 121 | end 122 | 123 | # Removes all tracks in playlist 124 | # 125 | # client.truncate_user_playlist('1181346016', '7i3thJWDtmX04dJhFwYb0x') 126 | def truncate_user_playlist(user_id, playlist_id) 127 | replace_user_tracks_in_playlist(user_id, playlist_id, []) 128 | end 129 | 130 | def album(album_id) 131 | run(:get, "/v1/albums/#{album_id}", [200]) 132 | end 133 | 134 | def album_tracks(album_id) 135 | run(:get, "/v1/albums/#{album_id}/tracks", [200]) 136 | end 137 | 138 | def albums(album_ids) 139 | params = { ids: Array.wrap(album_ids).join(',') } 140 | run(:get, '/v1/albums', [200], params) 141 | end 142 | 143 | def track(track_id) 144 | run(:get, "/v1/tracks/#{track_id}", [200]) 145 | end 146 | 147 | def tracks(track_ids) 148 | params = { ids: Array.wrap(track_ids).join(',') } 149 | run(:get, '/v1/tracks', [200], params) 150 | end 151 | 152 | def artist(artist_id) 153 | run(:get, "/v1/artists/#{artist_id}", [200]) 154 | end 155 | 156 | def artists(artist_ids) 157 | params = { ids: Array.wrap(artist_ids).join(',') } 158 | run(:get, '/v1/artists', [200], params) 159 | end 160 | 161 | def artist_albums(artist_id) 162 | run(:get, "/v1/artists/#{artist_id}/albums", [200]) 163 | end 164 | 165 | def search(entity, term, options={}) 166 | unless [:artist, :album, :track].include?(entity.to_sym) 167 | fail(ImplementationError, "entity needs to be either artist, album or track, got: #{entity}") 168 | end 169 | params = { 170 | q: term.to_s, 171 | type: entity 172 | }.merge(options) 173 | run(:get, '/v1/search', [200], params) 174 | end 175 | 176 | # Get Spotify catalog information about an artist's top 10 tracks by country. 177 | # 178 | # +country_id+ is required. An ISO 3166-1 alpha-2 country code. 179 | def artist_top_tracks(artist_id, country_id) 180 | run(:get, "/v1/artists/#{artist_id}/top-tracks", [200], country: country_id) 181 | end 182 | 183 | def related_artists(artist_id) 184 | run(:get, "/v1/artists/#{artist_id}/related-artists", [200]) 185 | end 186 | 187 | # Follow artists or users 188 | # 189 | # client.follow('artist', ['0BvkDsjIUla7X0k6CSWh1I']) 190 | def follow(type, ids) 191 | params = { type: type, ids: Array.wrap(ids).join(',') } 192 | run(:put, "/v1/me/following", [204], params) 193 | end 194 | 195 | # Follow a playlist 196 | # 197 | # client.follow_playlist('lukebryan', '0obRj9nNySESpFelMCLSya') 198 | def follow_playlist(user_id, playlist_id, is_public = true) 199 | run(:put, "/v1/users/#{user_id}/playlists/#{playlist_id}/followers", [200], { public: is_public }) 200 | end 201 | 202 | protected 203 | 204 | def run(verb, path, expected_status_codes, params = {}, idempotent = true) 205 | run!(verb, path, expected_status_codes, params, idempotent) 206 | rescue Error => e 207 | if @raise_errors 208 | raise e 209 | else 210 | false 211 | end 212 | end 213 | 214 | def run!(verb, path, expected_status_codes, params_or_body = nil, idempotent = true) 215 | packet = { 216 | idempotent: idempotent, 217 | expects: expected_status_codes, 218 | method: verb, 219 | path: path, 220 | read_timeout: @read_timeout, 221 | write_timeout: @write_timeout, 222 | retry_limit: @retries, 223 | headers: { 224 | 'Content-Type' => 'application/json', 225 | 'User-Agent' => 'Spotify Ruby Client' 226 | } 227 | } 228 | if params_or_body.is_a?(Hash) 229 | packet.merge!(query: params_or_body) 230 | else 231 | packet.merge!(body: params_or_body) 232 | end 233 | 234 | if !@access_token.nil? && @access_token != '' 235 | packet[:headers].merge!('Authorization' => "Bearer #{@access_token}") 236 | end 237 | 238 | # puts "\033[31m [Spotify] HTTP Request: #{verb.upcase} #{BASE_URI}#{path} #{packet[:headers].inspect} \e[0m" 239 | response = @connection.request(packet) 240 | ::JSON.load(response.body) 241 | 242 | rescue Excon::Errors::NotFound => exception 243 | raise(ResourceNotFound, "Error: #{exception.message}") 244 | rescue Excon::Errors::BadRequest => exception 245 | raise(BadRequest, "Error: #{exception.message}") 246 | rescue Excon::Errors::Forbidden => exception 247 | raise(InsufficientClientScopeError, "Error: #{exception.message}") 248 | rescue Excon::Errors::Unauthorized => exception 249 | raise(AuthenticationError, "Error: #{exception.message}") 250 | rescue Excon::Errors::Error => exception 251 | # Catch all others errors. Samples: 252 | # 253 | # 254 | # Actual(500 InternalServerError)> 255 | # 256 | # Actual(502 Bad Gateway)> 257 | raise(HTTPError, "Error: #{exception.message}") 258 | end 259 | end 260 | end 261 | -------------------------------------------------------------------------------- /spec/fixtures/album_tracks.json: -------------------------------------------------------------------------------- 1 | { 2 | "href" : "https://api.spotify.com/v1/albums/0sNOF9WDwhWunNAHPD3Baj/tracks?offset=0&limit=50", 3 | "items" : [ { 4 | "artists" : [ { 5 | "external_urls" : { 6 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 7 | }, 8 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 9 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 10 | "name" : "Cyndi Lauper", 11 | "type" : "artist", 12 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 13 | } ], 14 | "disc_number" : 1, 15 | "duration_ms" : 305560, 16 | "explicit" : false, 17 | "external_urls" : { 18 | "spotify" : "https://open.spotify.com/track/3f9zqUnrnIq0LANhmnaF0V" 19 | }, 20 | "href" : "https://api.spotify.com/v1/tracks/3f9zqUnrnIq0LANhmnaF0V", 21 | "id" : "3f9zqUnrnIq0LANhmnaF0V", 22 | "name" : "Money Changes Everything", 23 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/01bb2a6c9a89c05a4300aea427241b1719a26b06", 24 | "track_number" : 1, 25 | "type" : "track", 26 | "uri" : "spotify:track:3f9zqUnrnIq0LANhmnaF0V" 27 | }, { 28 | "artists" : [ { 29 | "external_urls" : { 30 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 31 | }, 32 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 33 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 34 | "name" : "Cyndi Lauper", 35 | "type" : "artist", 36 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 37 | } ], 38 | "disc_number" : 1, 39 | "duration_ms" : 238266, 40 | "explicit" : false, 41 | "external_urls" : { 42 | "spotify" : "https://open.spotify.com/track/2joHDtKFVDDyWDHnOxZMAX" 43 | }, 44 | "href" : "https://api.spotify.com/v1/tracks/2joHDtKFVDDyWDHnOxZMAX", 45 | "id" : "2joHDtKFVDDyWDHnOxZMAX", 46 | "name" : "Girls Just Want to Have Fun", 47 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/4fb5dfb0f1d60d23d1072548847e26906951ead9", 48 | "track_number" : 2, 49 | "type" : "track", 50 | "uri" : "spotify:track:2joHDtKFVDDyWDHnOxZMAX" 51 | }, { 52 | "artists" : [ { 53 | "external_urls" : { 54 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 55 | }, 56 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 57 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 58 | "name" : "Cyndi Lauper", 59 | "type" : "artist", 60 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 61 | } ], 62 | "disc_number" : 1, 63 | "duration_ms" : 306706, 64 | "explicit" : false, 65 | "external_urls" : { 66 | "spotify" : "https://open.spotify.com/track/6ClztHzretmPHCeiNqR5wD" 67 | }, 68 | "href" : "https://api.spotify.com/v1/tracks/6ClztHzretmPHCeiNqR5wD", 69 | "id" : "6ClztHzretmPHCeiNqR5wD", 70 | "name" : "When You Were Mine", 71 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/7ce74522fabed32d7310084541bf38f906bb33bc", 72 | "track_number" : 3, 73 | "type" : "track", 74 | "uri" : "spotify:track:6ClztHzretmPHCeiNqR5wD" 75 | }, { 76 | "artists" : [ { 77 | "external_urls" : { 78 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 79 | }, 80 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 81 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 82 | "name" : "Cyndi Lauper", 83 | "type" : "artist", 84 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 85 | } ], 86 | "disc_number" : 1, 87 | "duration_ms" : 241333, 88 | "explicit" : false, 89 | "external_urls" : { 90 | "spotify" : "https://open.spotify.com/track/2tVHvZK4YYzTloSCBPm2tg" 91 | }, 92 | "href" : "https://api.spotify.com/v1/tracks/2tVHvZK4YYzTloSCBPm2tg", 93 | "id" : "2tVHvZK4YYzTloSCBPm2tg", 94 | "name" : "Time After Time", 95 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/0b0b522f1412996c5c0c8d44f886d76d43f33f6c", 96 | "track_number" : 4, 97 | "type" : "track", 98 | "uri" : "spotify:track:2tVHvZK4YYzTloSCBPm2tg" 99 | }, { 100 | "artists" : [ { 101 | "external_urls" : { 102 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 103 | }, 104 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 105 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 106 | "name" : "Cyndi Lauper", 107 | "type" : "artist", 108 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 109 | } ], 110 | "disc_number" : 1, 111 | "duration_ms" : 229266, 112 | "explicit" : false, 113 | "external_urls" : { 114 | "spotify" : "https://open.spotify.com/track/6iLhMDtOr52OVXaZdha5M6" 115 | }, 116 | "href" : "https://api.spotify.com/v1/tracks/6iLhMDtOr52OVXaZdha5M6", 117 | "id" : "6iLhMDtOr52OVXaZdha5M6", 118 | "name" : "She Bop", 119 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/95bbe8eb0ea9d64c8bed6a95a0484250068ffd57", 120 | "track_number" : 5, 121 | "type" : "track", 122 | "uri" : "spotify:track:6iLhMDtOr52OVXaZdha5M6" 123 | }, { 124 | "artists" : [ { 125 | "external_urls" : { 126 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 127 | }, 128 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 129 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 130 | "name" : "Cyndi Lauper", 131 | "type" : "artist", 132 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 133 | } ], 134 | "disc_number" : 1, 135 | "duration_ms" : 272840, 136 | "explicit" : false, 137 | "external_urls" : { 138 | "spotify" : "https://open.spotify.com/track/3csiLr2B2wRj4lsExn6jLf" 139 | }, 140 | "href" : "https://api.spotify.com/v1/tracks/3csiLr2B2wRj4lsExn6jLf", 141 | "id" : "3csiLr2B2wRj4lsExn6jLf", 142 | "name" : "All Through the Night", 143 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/e2dfc024cc4653ecc07f9c9e14fd882f8150cdb7", 144 | "track_number" : 6, 145 | "type" : "track", 146 | "uri" : "spotify:track:3csiLr2B2wRj4lsExn6jLf" 147 | }, { 148 | "artists" : [ { 149 | "external_urls" : { 150 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 151 | }, 152 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 153 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 154 | "name" : "Cyndi Lauper", 155 | "type" : "artist", 156 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 157 | } ], 158 | "disc_number" : 1, 159 | "duration_ms" : 220333, 160 | "explicit" : false, 161 | "external_urls" : { 162 | "spotify" : "https://open.spotify.com/track/4mRAnuBGYsW4WGbpW0QUkp" 163 | }, 164 | "href" : "https://api.spotify.com/v1/tracks/4mRAnuBGYsW4WGbpW0QUkp", 165 | "id" : "4mRAnuBGYsW4WGbpW0QUkp", 166 | "name" : "Witness", 167 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/9be78ca9a07914db151f1e970c068970769d2731", 168 | "track_number" : 7, 169 | "type" : "track", 170 | "uri" : "spotify:track:4mRAnuBGYsW4WGbpW0QUkp" 171 | }, { 172 | "artists" : [ { 173 | "external_urls" : { 174 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 175 | }, 176 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 177 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 178 | "name" : "Cyndi Lauper", 179 | "type" : "artist", 180 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 181 | } ], 182 | "disc_number" : 1, 183 | "duration_ms" : 252626, 184 | "explicit" : false, 185 | "external_urls" : { 186 | "spotify" : "https://open.spotify.com/track/3AIeUnffkLQaUaX1pkHyeD" 187 | }, 188 | "href" : "https://api.spotify.com/v1/tracks/3AIeUnffkLQaUaX1pkHyeD", 189 | "id" : "3AIeUnffkLQaUaX1pkHyeD", 190 | "name" : "I'll Kiss You", 191 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/9031f915fbe2d62cbac7e22eb4e17c69bbcc72b8", 192 | "track_number" : 8, 193 | "type" : "track", 194 | "uri" : "spotify:track:3AIeUnffkLQaUaX1pkHyeD" 195 | }, { 196 | "artists" : [ { 197 | "external_urls" : { 198 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 199 | }, 200 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 201 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 202 | "name" : "Cyndi Lauper", 203 | "type" : "artist", 204 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 205 | } ], 206 | "disc_number" : 1, 207 | "duration_ms" : 45933, 208 | "explicit" : false, 209 | "external_urls" : { 210 | "spotify" : "https://open.spotify.com/track/53eCpAFNbA9MQNfLilN3CH" 211 | }, 212 | "href" : "https://api.spotify.com/v1/tracks/53eCpAFNbA9MQNfLilN3CH", 213 | "id" : "53eCpAFNbA9MQNfLilN3CH", 214 | "name" : "He's so Unusual", 215 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/3b86ffe73440aeb1dca36ab9edb4245e0d7124c7", 216 | "track_number" : 9, 217 | "type" : "track", 218 | "uri" : "spotify:track:53eCpAFNbA9MQNfLilN3CH" 219 | }, { 220 | "artists" : [ { 221 | "external_urls" : { 222 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 223 | }, 224 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 225 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 226 | "name" : "Cyndi Lauper", 227 | "type" : "artist", 228 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 229 | } ], 230 | "disc_number" : 1, 231 | "duration_ms" : 196373, 232 | "explicit" : false, 233 | "external_urls" : { 234 | "spotify" : "https://open.spotify.com/track/51JS0KXziu9U1T8EBdRTUF" 235 | }, 236 | "href" : "https://api.spotify.com/v1/tracks/51JS0KXziu9U1T8EBdRTUF", 237 | "id" : "51JS0KXziu9U1T8EBdRTUF", 238 | "name" : "Yeah Yeah", 239 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/113b4d4b560cddd344fe9ea7d3704d8f8f1600a5", 240 | "track_number" : 10, 241 | "type" : "track", 242 | "uri" : "spotify:track:51JS0KXziu9U1T8EBdRTUF" 243 | }, { 244 | "artists" : [ { 245 | "external_urls" : { 246 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 247 | }, 248 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 249 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 250 | "name" : "Cyndi Lauper", 251 | "type" : "artist", 252 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 253 | } ], 254 | "disc_number" : 1, 255 | "duration_ms" : 275560, 256 | "explicit" : false, 257 | "external_urls" : { 258 | "spotify" : "https://open.spotify.com/track/2BGJvRarwOa2kiIGpLjIXT" 259 | }, 260 | "href" : "https://api.spotify.com/v1/tracks/2BGJvRarwOa2kiIGpLjIXT", 261 | "id" : "2BGJvRarwOa2kiIGpLjIXT", 262 | "name" : "Money Changes Everything", 263 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/76ac67ccd4f27eb0deaf9d789436def22def2304", 264 | "track_number" : 11, 265 | "type" : "track", 266 | "uri" : "spotify:track:2BGJvRarwOa2kiIGpLjIXT" 267 | }, { 268 | "artists" : [ { 269 | "external_urls" : { 270 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 271 | }, 272 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 273 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 274 | "name" : "Cyndi Lauper", 275 | "type" : "artist", 276 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 277 | } ], 278 | "disc_number" : 1, 279 | "duration_ms" : 320400, 280 | "explicit" : false, 281 | "external_urls" : { 282 | "spotify" : "https://open.spotify.com/track/5ggatiDTbCIJsUAa7IUP65" 283 | }, 284 | "href" : "https://api.spotify.com/v1/tracks/5ggatiDTbCIJsUAa7IUP65", 285 | "id" : "5ggatiDTbCIJsUAa7IUP65", 286 | "name" : "She Bop - Live", 287 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/ea6b57b35d2bcf5caddc7e6e3655fc3215eec8a4", 288 | "track_number" : 12, 289 | "type" : "track", 290 | "uri" : "spotify:track:5ggatiDTbCIJsUAa7IUP65" 291 | }, { 292 | "artists" : [ { 293 | "external_urls" : { 294 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 295 | }, 296 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 297 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 298 | "name" : "Cyndi Lauper", 299 | "type" : "artist", 300 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 301 | } ], 302 | "disc_number" : 1, 303 | "duration_ms" : 288240, 304 | "explicit" : false, 305 | "external_urls" : { 306 | "spotify" : "https://open.spotify.com/track/5ZBxoa2kBrBah3qNIV4rm7" 307 | }, 308 | "href" : "https://api.spotify.com/v1/tracks/5ZBxoa2kBrBah3qNIV4rm7", 309 | "id" : "5ZBxoa2kBrBah3qNIV4rm7", 310 | "name" : "All Through The Night - Live", 311 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/cc8d13b1ce2e41f915a126bc6723a9cf7c491e08", 312 | "track_number" : 13, 313 | "type" : "track", 314 | "uri" : "spotify:track:5ZBxoa2kBrBah3qNIV4rm7" 315 | } ], 316 | "limit" : 50, 317 | "next" : null, 318 | "offset" : 0, 319 | "previous" : null, 320 | "total" : 13 321 | } 322 | -------------------------------------------------------------------------------- /spec/fixtures/album.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "album_type" : "album", 4 | "artists" : [ { 5 | "external_urls" : { 6 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 7 | }, 8 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 9 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 10 | "name" : "Cyndi Lauper", 11 | "type" : "artist", 12 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 13 | } ], 14 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TW", "UY" ], 15 | "external_ids" : { 16 | "upc" : "5099749994324" 17 | }, 18 | "external_urls" : { 19 | "spotify" : "https://open.spotify.com/album/0sNOF9WDwhWunNAHPD3Baj" 20 | }, 21 | "genres" : [ ], 22 | "href" : "https://api.spotify.com/v1/albums/0sNOF9WDwhWunNAHPD3Baj", 23 | "id" : "0sNOF9WDwhWunNAHPD3Baj", 24 | "images" : [ { 25 | "height" : 640, 26 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/07c323340e03e25a8e5dd5b9a8ec72b69c50089d", 27 | "width" : 640 28 | }, { 29 | "height" : 300, 30 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/8b662d81966a0ec40dc10563807696a8479cd48b", 31 | "width" : 300 32 | }, { 33 | "height" : 64, 34 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/54b3222c8aaa77890d1ac37b3aaaa1fc9ba630ae", 35 | "width" : 64 36 | } ], 37 | "name" : "She's So Unusual", 38 | "popularity" : 38, 39 | "release_date" : { 40 | "day" : null, 41 | "month" : null, 42 | "year" : 1983 43 | }, 44 | "tracks" : { 45 | "href" : "https://api.spotify.com/v1/albums/0sNOF9WDwhWunNAHPD3Baj/tracks?offset=0&limit=50", 46 | "items" : [ { 47 | "artists" : [ { 48 | "external_urls" : { 49 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 50 | }, 51 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 52 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 53 | "name" : "Cyndi Lauper", 54 | "type" : "artist", 55 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 56 | } ], 57 | "disc_number" : 1, 58 | "duration_ms" : 305560, 59 | "explicit" : false, 60 | "external_urls" : { 61 | "spotify" : "https://open.spotify.com/track/3f9zqUnrnIq0LANhmnaF0V" 62 | }, 63 | "href" : "https://api.spotify.com/v1/tracks/3f9zqUnrnIq0LANhmnaF0V", 64 | "id" : "3f9zqUnrnIq0LANhmnaF0V", 65 | "name" : "Money Changes Everything", 66 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/01bb2a6c9a89c05a4300aea427241b1719a26b06", 67 | "track_number" : 1, 68 | "type" : "track", 69 | "uri" : "spotify:track:3f9zqUnrnIq0LANhmnaF0V" 70 | }, { 71 | "artists" : [ { 72 | "external_urls" : { 73 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 74 | }, 75 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 76 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 77 | "name" : "Cyndi Lauper", 78 | "type" : "artist", 79 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 80 | } ], 81 | "disc_number" : 1, 82 | "duration_ms" : 238266, 83 | "explicit" : false, 84 | "external_urls" : { 85 | "spotify" : "https://open.spotify.com/track/2joHDtKFVDDyWDHnOxZMAX" 86 | }, 87 | "href" : "https://api.spotify.com/v1/tracks/2joHDtKFVDDyWDHnOxZMAX", 88 | "id" : "2joHDtKFVDDyWDHnOxZMAX", 89 | "name" : "Girls Just Want to Have Fun", 90 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/4fb5dfb0f1d60d23d1072548847e26906951ead9", 91 | "track_number" : 2, 92 | "type" : "track", 93 | "uri" : "spotify:track:2joHDtKFVDDyWDHnOxZMAX" 94 | }, { 95 | "artists" : [ { 96 | "external_urls" : { 97 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 98 | }, 99 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 100 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 101 | "name" : "Cyndi Lauper", 102 | "type" : "artist", 103 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 104 | } ], 105 | "disc_number" : 1, 106 | "duration_ms" : 306706, 107 | "explicit" : false, 108 | "external_urls" : { 109 | "spotify" : "https://open.spotify.com/track/6ClztHzretmPHCeiNqR5wD" 110 | }, 111 | "href" : "https://api.spotify.com/v1/tracks/6ClztHzretmPHCeiNqR5wD", 112 | "id" : "6ClztHzretmPHCeiNqR5wD", 113 | "name" : "When You Were Mine", 114 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/7ce74522fabed32d7310084541bf38f906bb33bc", 115 | "track_number" : 3, 116 | "type" : "track", 117 | "uri" : "spotify:track:6ClztHzretmPHCeiNqR5wD" 118 | }, { 119 | "artists" : [ { 120 | "external_urls" : { 121 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 122 | }, 123 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 124 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 125 | "name" : "Cyndi Lauper", 126 | "type" : "artist", 127 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 128 | } ], 129 | "disc_number" : 1, 130 | "duration_ms" : 241333, 131 | "explicit" : false, 132 | "external_urls" : { 133 | "spotify" : "https://open.spotify.com/track/2tVHvZK4YYzTloSCBPm2tg" 134 | }, 135 | "href" : "https://api.spotify.com/v1/tracks/2tVHvZK4YYzTloSCBPm2tg", 136 | "id" : "2tVHvZK4YYzTloSCBPm2tg", 137 | "name" : "Time After Time", 138 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/0b0b522f1412996c5c0c8d44f886d76d43f33f6c", 139 | "track_number" : 4, 140 | "type" : "track", 141 | "uri" : "spotify:track:2tVHvZK4YYzTloSCBPm2tg" 142 | }, { 143 | "artists" : [ { 144 | "external_urls" : { 145 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 146 | }, 147 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 148 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 149 | "name" : "Cyndi Lauper", 150 | "type" : "artist", 151 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 152 | } ], 153 | "disc_number" : 1, 154 | "duration_ms" : 229266, 155 | "explicit" : false, 156 | "external_urls" : { 157 | "spotify" : "https://open.spotify.com/track/6iLhMDtOr52OVXaZdha5M6" 158 | }, 159 | "href" : "https://api.spotify.com/v1/tracks/6iLhMDtOr52OVXaZdha5M6", 160 | "id" : "6iLhMDtOr52OVXaZdha5M6", 161 | "name" : "She Bop", 162 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/95bbe8eb0ea9d64c8bed6a95a0484250068ffd57", 163 | "track_number" : 5, 164 | "type" : "track", 165 | "uri" : "spotify:track:6iLhMDtOr52OVXaZdha5M6" 166 | }, { 167 | "artists" : [ { 168 | "external_urls" : { 169 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 170 | }, 171 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 172 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 173 | "name" : "Cyndi Lauper", 174 | "type" : "artist", 175 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 176 | } ], 177 | "disc_number" : 1, 178 | "duration_ms" : 272840, 179 | "explicit" : false, 180 | "external_urls" : { 181 | "spotify" : "https://open.spotify.com/track/3csiLr2B2wRj4lsExn6jLf" 182 | }, 183 | "href" : "https://api.spotify.com/v1/tracks/3csiLr2B2wRj4lsExn6jLf", 184 | "id" : "3csiLr2B2wRj4lsExn6jLf", 185 | "name" : "All Through the Night", 186 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/e2dfc024cc4653ecc07f9c9e14fd882f8150cdb7", 187 | "track_number" : 6, 188 | "type" : "track", 189 | "uri" : "spotify:track:3csiLr2B2wRj4lsExn6jLf" 190 | }, { 191 | "artists" : [ { 192 | "external_urls" : { 193 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 194 | }, 195 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 196 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 197 | "name" : "Cyndi Lauper", 198 | "type" : "artist", 199 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 200 | } ], 201 | "disc_number" : 1, 202 | "duration_ms" : 220333, 203 | "explicit" : false, 204 | "external_urls" : { 205 | "spotify" : "https://open.spotify.com/track/4mRAnuBGYsW4WGbpW0QUkp" 206 | }, 207 | "href" : "https://api.spotify.com/v1/tracks/4mRAnuBGYsW4WGbpW0QUkp", 208 | "id" : "4mRAnuBGYsW4WGbpW0QUkp", 209 | "name" : "Witness", 210 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/9be78ca9a07914db151f1e970c068970769d2731", 211 | "track_number" : 7, 212 | "type" : "track", 213 | "uri" : "spotify:track:4mRAnuBGYsW4WGbpW0QUkp" 214 | }, { 215 | "artists" : [ { 216 | "external_urls" : { 217 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 218 | }, 219 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 220 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 221 | "name" : "Cyndi Lauper", 222 | "type" : "artist", 223 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 224 | } ], 225 | "disc_number" : 1, 226 | "duration_ms" : 252626, 227 | "explicit" : false, 228 | "external_urls" : { 229 | "spotify" : "https://open.spotify.com/track/3AIeUnffkLQaUaX1pkHyeD" 230 | }, 231 | "href" : "https://api.spotify.com/v1/tracks/3AIeUnffkLQaUaX1pkHyeD", 232 | "id" : "3AIeUnffkLQaUaX1pkHyeD", 233 | "name" : "I'll Kiss You", 234 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/9031f915fbe2d62cbac7e22eb4e17c69bbcc72b8", 235 | "track_number" : 8, 236 | "type" : "track", 237 | "uri" : "spotify:track:3AIeUnffkLQaUaX1pkHyeD" 238 | }, { 239 | "artists" : [ { 240 | "external_urls" : { 241 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 242 | }, 243 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 244 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 245 | "name" : "Cyndi Lauper", 246 | "type" : "artist", 247 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 248 | } ], 249 | "disc_number" : 1, 250 | "duration_ms" : 45933, 251 | "explicit" : false, 252 | "external_urls" : { 253 | "spotify" : "https://open.spotify.com/track/53eCpAFNbA9MQNfLilN3CH" 254 | }, 255 | "href" : "https://api.spotify.com/v1/tracks/53eCpAFNbA9MQNfLilN3CH", 256 | "id" : "53eCpAFNbA9MQNfLilN3CH", 257 | "name" : "He's so Unusual", 258 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/3b86ffe73440aeb1dca36ab9edb4245e0d7124c7", 259 | "track_number" : 9, 260 | "type" : "track", 261 | "uri" : "spotify:track:53eCpAFNbA9MQNfLilN3CH" 262 | }, { 263 | "artists" : [ { 264 | "external_urls" : { 265 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 266 | }, 267 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 268 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 269 | "name" : "Cyndi Lauper", 270 | "type" : "artist", 271 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 272 | } ], 273 | "disc_number" : 1, 274 | "duration_ms" : 196373, 275 | "explicit" : false, 276 | "external_urls" : { 277 | "spotify" : "https://open.spotify.com/track/51JS0KXziu9U1T8EBdRTUF" 278 | }, 279 | "href" : "https://api.spotify.com/v1/tracks/51JS0KXziu9U1T8EBdRTUF", 280 | "id" : "51JS0KXziu9U1T8EBdRTUF", 281 | "name" : "Yeah Yeah", 282 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/113b4d4b560cddd344fe9ea7d3704d8f8f1600a5", 283 | "track_number" : 10, 284 | "type" : "track", 285 | "uri" : "spotify:track:51JS0KXziu9U1T8EBdRTUF" 286 | }, { 287 | "artists" : [ { 288 | "external_urls" : { 289 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 290 | }, 291 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 292 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 293 | "name" : "Cyndi Lauper", 294 | "type" : "artist", 295 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 296 | } ], 297 | "disc_number" : 1, 298 | "duration_ms" : 275560, 299 | "explicit" : false, 300 | "external_urls" : { 301 | "spotify" : "https://open.spotify.com/track/2BGJvRarwOa2kiIGpLjIXT" 302 | }, 303 | "href" : "https://api.spotify.com/v1/tracks/2BGJvRarwOa2kiIGpLjIXT", 304 | "id" : "2BGJvRarwOa2kiIGpLjIXT", 305 | "name" : "Money Changes Everything", 306 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/76ac67ccd4f27eb0deaf9d789436def22def2304", 307 | "track_number" : 11, 308 | "type" : "track", 309 | "uri" : "spotify:track:2BGJvRarwOa2kiIGpLjIXT" 310 | }, { 311 | "artists" : [ { 312 | "external_urls" : { 313 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 314 | }, 315 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 316 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 317 | "name" : "Cyndi Lauper", 318 | "type" : "artist", 319 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 320 | } ], 321 | "disc_number" : 1, 322 | "duration_ms" : 320400, 323 | "explicit" : false, 324 | "external_urls" : { 325 | "spotify" : "https://open.spotify.com/track/5ggatiDTbCIJsUAa7IUP65" 326 | }, 327 | "href" : "https://api.spotify.com/v1/tracks/5ggatiDTbCIJsUAa7IUP65", 328 | "id" : "5ggatiDTbCIJsUAa7IUP65", 329 | "name" : "She Bop - Live", 330 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/ea6b57b35d2bcf5caddc7e6e3655fc3215eec8a4", 331 | "track_number" : 12, 332 | "type" : "track", 333 | "uri" : "spotify:track:5ggatiDTbCIJsUAa7IUP65" 334 | }, { 335 | "artists" : [ { 336 | "external_urls" : { 337 | "spotify" : "https://open.spotify.com/artist/2BTZIqw0ntH9MvilQ3ewNY" 338 | }, 339 | "href" : "https://api.spotify.com/v1/artists/2BTZIqw0ntH9MvilQ3ewNY", 340 | "id" : "2BTZIqw0ntH9MvilQ3ewNY", 341 | "name" : "Cyndi Lauper", 342 | "type" : "artist", 343 | "uri" : "spotify:artist:2BTZIqw0ntH9MvilQ3ewNY" 344 | } ], 345 | "disc_number" : 1, 346 | "duration_ms" : 288240, 347 | "explicit" : false, 348 | "external_urls" : { 349 | "spotify" : "https://open.spotify.com/track/5ZBxoa2kBrBah3qNIV4rm7" 350 | }, 351 | "href" : "https://api.spotify.com/v1/tracks/5ZBxoa2kBrBah3qNIV4rm7", 352 | "id" : "5ZBxoa2kBrBah3qNIV4rm7", 353 | "name" : "All Through The Night - Live", 354 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/cc8d13b1ce2e41f915a126bc6723a9cf7c491e08", 355 | "track_number" : 13, 356 | "type" : "track", 357 | "uri" : "spotify:track:5ZBxoa2kBrBah3qNIV4rm7" 358 | } ], 359 | "limit" : 50, 360 | "next" : null, 361 | "offset" : 0, 362 | "previous" : null, 363 | "total" : 13 364 | }, 365 | "type" : "album", 366 | "uri" : "spotify:album:0sNOF9WDwhWunNAHPD3Baj" 367 | } 368 | -------------------------------------------------------------------------------- /spec/fixtures/artist_albums.json: -------------------------------------------------------------------------------- 1 | { 2 | "href" : "https://api.spotify.com/v1/artists/5YyScSZOuBHpoFhGvHFedc/albums?offset=0&limit=20&album_type=single,album,compilation,appears_on", 3 | "items" : [ { 4 | "album_type" : "album", 5 | "external_urls" : { 6 | "spotify" : "https://open.spotify.com/album/45P1TztZZFbxpmMNuQdR21" 7 | }, 8 | "href" : "https://api.spotify.com/v1/albums/45P1TztZZFbxpmMNuQdR21", 9 | "id" : "45P1TztZZFbxpmMNuQdR21", 10 | "images" : [ { 11 | "height" : 640, 12 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/54533347f41c7d0afaa3e51f127ec93ea5e70311", 13 | "width" : 640 14 | }, { 15 | "height" : 300, 16 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/23e03d404f2b2e203022240d0b555b0ef953c757", 17 | "width" : 300 18 | }, { 19 | "height" : 64, 20 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/92cc17359e1c3f4a2faf42ff8dfc98390c9550b4", 21 | "width" : 64 22 | } ], 23 | "name" : "Mas de Cien Amaneceres", 24 | "type" : "album", 25 | "uri" : "spotify:album:45P1TztZZFbxpmMNuQdR21" 26 | }, { 27 | "album_type" : "album", 28 | "external_urls" : { 29 | "spotify" : "https://open.spotify.com/album/6M9uDidhgXknM1AIO5Pkb4" 30 | }, 31 | "href" : "https://api.spotify.com/v1/albums/6M9uDidhgXknM1AIO5Pkb4", 32 | "id" : "6M9uDidhgXknM1AIO5Pkb4", 33 | "images" : [ { 34 | "height" : 640, 35 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/abe64732d0d16bef25dd27e35870dae76fb9eafb", 36 | "width" : 640 37 | }, { 38 | "height" : 300, 39 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/9e47cff4b5dc38ab6fb836ea3109e8046cad4d2b", 40 | "width" : 300 41 | }, { 42 | "height" : 64, 43 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/c8cd3b5e20281000e28682f2fc5313cf21b594f6", 44 | "width" : 64 45 | } ], 46 | "name" : "Mas de Cien Amaneceres", 47 | "type" : "album", 48 | "uri" : "spotify:album:6M9uDidhgXknM1AIO5Pkb4" 49 | }, { 50 | "album_type" : "album", 51 | "external_urls" : { 52 | "spotify" : "https://open.spotify.com/album/1TYQD5E50a3Csg7So0qKiO" 53 | }, 54 | "href" : "https://api.spotify.com/v1/albums/1TYQD5E50a3Csg7So0qKiO", 55 | "id" : "1TYQD5E50a3Csg7So0qKiO", 56 | "images" : [ { 57 | "height" : 640, 58 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/edbdaea5d63d272b5d824e1e6006c286b2cb1331", 59 | "width" : 640 60 | }, { 61 | "height" : 300, 62 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/1bef3119361825ad1956379fc022c394cbca24f8", 63 | "width" : 300 64 | }, { 65 | "height" : 64, 66 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/dbdfe988b037f5f9ca3d5f5f660f9b48f5ba268f", 67 | "width" : 64 68 | } ], 69 | "name" : "Raices", 70 | "type" : "album", 71 | "uri" : "spotify:album:1TYQD5E50a3Csg7So0qKiO" 72 | }, { 73 | "album_type" : "album", 74 | "external_urls" : { 75 | "spotify" : "https://open.spotify.com/album/2kpb7D2hUNrzJF7DPaxFyZ" 76 | }, 77 | "href" : "https://api.spotify.com/v1/albums/2kpb7D2hUNrzJF7DPaxFyZ", 78 | "id" : "2kpb7D2hUNrzJF7DPaxFyZ", 79 | "images" : [ { 80 | "height" : 640, 81 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/edbdaea5d63d272b5d824e1e6006c286b2cb1331", 82 | "width" : 640 83 | }, { 84 | "height" : 300, 85 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/1bef3119361825ad1956379fc022c394cbca24f8", 86 | "width" : 300 87 | }, { 88 | "height" : 64, 89 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/dbdfe988b037f5f9ca3d5f5f660f9b48f5ba268f", 90 | "width" : 64 91 | } ], 92 | "name" : "Raices", 93 | "type" : "album", 94 | "uri" : "spotify:album:2kpb7D2hUNrzJF7DPaxFyZ" 95 | }, { 96 | "album_type" : "album", 97 | "external_urls" : { 98 | "spotify" : "https://open.spotify.com/album/2qZt4hXKcszH8qS3pesaI7" 99 | }, 100 | "href" : "https://api.spotify.com/v1/albums/2qZt4hXKcszH8qS3pesaI7", 101 | "id" : "2qZt4hXKcszH8qS3pesaI7", 102 | "images" : [ { 103 | "height" : 640, 104 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/b42728aa1cf2bc1211b8b6b13f7ce26a7e243020", 105 | "width" : 621 106 | }, { 107 | "height" : 300, 108 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/2d2aa4ee7a42598797376e044122243c8ed9e1aa", 109 | "width" : 291 110 | }, { 111 | "height" : 64, 112 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/4a1494cbeffd96eba7c06f1eee18881141c81ca2", 113 | "width" : 62 114 | } ], 115 | "name" : "Asuntos pendientes", 116 | "type" : "album", 117 | "uri" : "spotify:album:2qZt4hXKcszH8qS3pesaI7" 118 | }, { 119 | "album_type" : "album", 120 | "external_urls" : { 121 | "spotify" : "https://open.spotify.com/album/5TS9CJQ4nbmzenjv1WOG9J" 122 | }, 123 | "href" : "https://api.spotify.com/v1/albums/5TS9CJQ4nbmzenjv1WOG9J", 124 | "id" : "5TS9CJQ4nbmzenjv1WOG9J", 125 | "images" : [ { 126 | "height" : 634, 127 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/83acce73648c5019ce961ed9512da08d0f0dd08d", 128 | "width" : 640 129 | }, { 130 | "height" : 297, 131 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/c4913259971d1b75d65b590e9a0b2c01acc2a17f", 132 | "width" : 300 133 | }, { 134 | "height" : 63, 135 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/fef203f2e674a804992c28a6a15c1b0e0a3d4ea4", 136 | "width" : 64 137 | } ], 138 | "name" : "Nubes y claros- Acustico 2006-", 139 | "type" : "album", 140 | "uri" : "spotify:album:5TS9CJQ4nbmzenjv1WOG9J" 141 | }, { 142 | "album_type" : "album", 143 | "external_urls" : { 144 | "spotify" : "https://open.spotify.com/album/6Y1HdCcAfs6Oawt73kuKpx" 145 | }, 146 | "href" : "https://api.spotify.com/v1/albums/6Y1HdCcAfs6Oawt73kuKpx", 147 | "id" : "6Y1HdCcAfs6Oawt73kuKpx", 148 | "images" : [ { 149 | "height" : 640, 150 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/53bc47ee843490570199789915ae233be71c3d08", 151 | "width" : 630 152 | }, { 153 | "height" : 300, 154 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/94a8324bff9a8695ffac957f03b916144c3ebd42", 155 | "width" : 295 156 | }, { 157 | "height" : 64, 158 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/d076ab98e29615e0d0c8fab4d49a9d95bea79afa", 159 | "width" : 63 160 | } ], 161 | "name" : "En directo", 162 | "type" : "album", 163 | "uri" : "spotify:album:6Y1HdCcAfs6Oawt73kuKpx" 164 | }, { 165 | "album_type" : "album", 166 | "external_urls" : { 167 | "spotify" : "https://open.spotify.com/album/1hCwejZJomHEdOP7sZmGUR" 168 | }, 169 | "href" : "https://api.spotify.com/v1/albums/1hCwejZJomHEdOP7sZmGUR", 170 | "id" : "1hCwejZJomHEdOP7sZmGUR", 171 | "images" : [ { 172 | "height" : 640, 173 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/74dfaa37903f73ad94088c9daac6fd8d556d99fd", 174 | "width" : 640 175 | }, { 176 | "height" : 300, 177 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/88fb3247c3e4e5db094e01375e76929fe1cbde51", 178 | "width" : 300 179 | }, { 180 | "height" : 64, 181 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/7e04567fd71483b35ed7c3a7cc3f2f20d7daff16", 182 | "width" : 64 183 | } ], 184 | "name" : "Negociando gasolina", 185 | "type" : "album", 186 | "uri" : "spotify:album:1hCwejZJomHEdOP7sZmGUR" 187 | }, { 188 | "album_type" : "album", 189 | "external_urls" : { 190 | "spotify" : "https://open.spotify.com/album/4HNiEBlDqik3hvD1D5Gptx" 191 | }, 192 | "href" : "https://api.spotify.com/v1/albums/4HNiEBlDqik3hvD1D5Gptx", 193 | "id" : "4HNiEBlDqik3hvD1D5Gptx", 194 | "images" : [ { 195 | "height" : 632, 196 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/c2d0a176e80f01ed6a9295b3818567d164033652", 197 | "width" : 640 198 | }, { 199 | "height" : 296, 200 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/9dee070734448f1fd589dc9eb54d4f96862763a0", 201 | "width" : 300 202 | }, { 203 | "height" : 63, 204 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/ee6f7437a97ff155284c2996be1a8daf2714e068", 205 | "width" : 64 206 | } ], 207 | "name" : "Calles de Papel", 208 | "type" : "album", 209 | "uri" : "spotify:album:4HNiEBlDqik3hvD1D5Gptx" 210 | }, { 211 | "album_type" : "album", 212 | "external_urls" : { 213 | "spotify" : "https://open.spotify.com/album/3dg7xWe5EU25bFZQMW0hFP" 214 | }, 215 | "href" : "https://api.spotify.com/v1/albums/3dg7xWe5EU25bFZQMW0hFP", 216 | "id" : "3dg7xWe5EU25bFZQMW0hFP", 217 | "images" : [ { 218 | "height" : 640, 219 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/91be30e13aa15bf20172d496eb992006b350a442", 220 | "width" : 640 221 | }, { 222 | "height" : 300, 223 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/8f536eb3839b6b34c90d6cee419f70d75148e982", 224 | "width" : 300 225 | }, { 226 | "height" : 64, 227 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/3db81afbb5ce855ea42684d53a9c666d381533ec", 228 | "width" : 64 229 | } ], 230 | "name" : "A las 12", 231 | "type" : "album", 232 | "uri" : "spotify:album:3dg7xWe5EU25bFZQMW0hFP" 233 | }, { 234 | "album_type" : "album", 235 | "external_urls" : { 236 | "spotify" : "https://open.spotify.com/album/7hwGksKIvfyqDj6iAAm1LV" 237 | }, 238 | "href" : "https://api.spotify.com/v1/albums/7hwGksKIvfyqDj6iAAm1LV", 239 | "id" : "7hwGksKIvfyqDj6iAAm1LV", 240 | "images" : [ { 241 | "height" : 640, 242 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/cd0edbe758a4f4329e005be8379171eb04e65111", 243 | "width" : 640 244 | }, { 245 | "height" : 300, 246 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/2ba17331b432cd01d4b157d9071ae81719447cd9", 247 | "width" : 300 248 | }, { 249 | "height" : 64, 250 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/79e009a2067a17a4905009e05977534ec57db371", 251 | "width" : 64 252 | } ], 253 | "name" : "A golpes de Rock'n'Roll", 254 | "type" : "album", 255 | "uri" : "spotify:album:7hwGksKIvfyqDj6iAAm1LV" 256 | }, { 257 | "album_type" : "album", 258 | "external_urls" : { 259 | "spotify" : "https://open.spotify.com/album/7EpE7UsapcAWKmuzWVNa18" 260 | }, 261 | "href" : "https://api.spotify.com/v1/albums/7EpE7UsapcAWKmuzWVNa18", 262 | "id" : "7EpE7UsapcAWKmuzWVNa18", 263 | "images" : [ { 264 | "height" : 640, 265 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/dff7abe81ba3faca88fa74c31798b25935eca72e", 266 | "width" : 640 267 | }, { 268 | "height" : 300, 269 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/e0b960e265c9b46331848493686e8f8e3a2e8a5f", 270 | "width" : 300 271 | }, { 272 | "height" : 64, 273 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/b1ebbd7556100693e0c916245e0a147ac7f42350", 274 | "width" : 64 275 | } ], 276 | "name" : "Mira", 277 | "type" : "album", 278 | "uri" : "spotify:album:7EpE7UsapcAWKmuzWVNa18" 279 | }, { 280 | "album_type" : "single", 281 | "external_urls" : { 282 | "spotify" : "https://open.spotify.com/album/6yA6LLpparGE1OYSUHbsya" 283 | }, 284 | "href" : "https://api.spotify.com/v1/albums/6yA6LLpparGE1OYSUHbsya", 285 | "id" : "6yA6LLpparGE1OYSUHbsya", 286 | "images" : [ { 287 | "height" : 640, 288 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/8e7e0365aacd414fd012ddb6833c4943f0f5c96f", 289 | "width" : 640 290 | }, { 291 | "height" : 300, 292 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/10ce04e98bf2915b2488a517a3f4b383e94f9a1b", 293 | "width" : 300 294 | }, { 295 | "height" : 64, 296 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/79174847b703dfede79ea388a053adc7f4bf8f17", 297 | "width" : 64 298 | } ], 299 | "name" : "Camarote", 300 | "type" : "album", 301 | "uri" : "spotify:album:6yA6LLpparGE1OYSUHbsya" 302 | }, { 303 | "album_type" : "single", 304 | "external_urls" : { 305 | "spotify" : "https://open.spotify.com/album/4uLSj4AhMO86FUiWSmQY85" 306 | }, 307 | "href" : "https://api.spotify.com/v1/albums/4uLSj4AhMO86FUiWSmQY85", 308 | "id" : "4uLSj4AhMO86FUiWSmQY85", 309 | "images" : [ { 310 | "height" : 640, 311 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/a236fc9e36f403b4386a6757e8c81dc140c4fd0d", 312 | "width" : 640 313 | }, { 314 | "height" : 300, 315 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/2f426b7d56223b2987cf54dbdf4fddea1ec0d972", 316 | "width" : 300 317 | }, { 318 | "height" : 64, 319 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/4662fda2a8a31fee83769409b2d973c18d6a6135", 320 | "width" : 64 321 | } ], 322 | "name" : "Lunes de Olvido", 323 | "type" : "album", 324 | "uri" : "spotify:album:4uLSj4AhMO86FUiWSmQY85" 325 | }, { 326 | "album_type" : "single", 327 | "external_urls" : { 328 | "spotify" : "https://open.spotify.com/album/19cvmOoDSrQSeWrewHpItq" 329 | }, 330 | "href" : "https://api.spotify.com/v1/albums/19cvmOoDSrQSeWrewHpItq", 331 | "id" : "19cvmOoDSrQSeWrewHpItq", 332 | "images" : [ { 333 | "height" : 640, 334 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/fa964187fc31c8b9d147ac87f6dc25d227462499", 335 | "width" : 640 336 | }, { 337 | "height" : 300, 338 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/5192f08e7f6f377fb589ebca652c1f6f1dae3f06", 339 | "width" : 300 340 | }, { 341 | "height" : 64, 342 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/156eae72c3c9e6a32fd578d53b8ee0ff612b792f", 343 | "width" : 64 344 | } ], 345 | "name" : "Lunes de Olvido", 346 | "type" : "album", 347 | "uri" : "spotify:album:19cvmOoDSrQSeWrewHpItq" 348 | }, { 349 | "album_type" : "single", 350 | "external_urls" : { 351 | "spotify" : "https://open.spotify.com/album/4Jkf8mvWG3Ck3fR6ITtbia" 352 | }, 353 | "href" : "https://api.spotify.com/v1/albums/4Jkf8mvWG3Ck3fR6ITtbia", 354 | "id" : "4Jkf8mvWG3Ck3fR6ITtbia", 355 | "images" : [ { 356 | "height" : 640, 357 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/549f41a6f955cdb6137e7356da71a2c8f1b7f931", 358 | "width" : 640 359 | }, { 360 | "height" : 300, 361 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/fd4b1d6835e9ec2d7975c77c7b919472eec67b0e", 362 | "width" : 300 363 | }, { 364 | "height" : 64, 365 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/303d39684a21ba61a43b04e534d8af9ef3aa7883", 366 | "width" : 64 367 | } ], 368 | "name" : "Ganas", 369 | "type" : "album", 370 | "uri" : "spotify:album:4Jkf8mvWG3Ck3fR6ITtbia" 371 | }, { 372 | "album_type" : "single", 373 | "external_urls" : { 374 | "spotify" : "https://open.spotify.com/album/010mTPPbvCLqTkMrcPXmh2" 375 | }, 376 | "href" : "https://api.spotify.com/v1/albums/010mTPPbvCLqTkMrcPXmh2", 377 | "id" : "010mTPPbvCLqTkMrcPXmh2", 378 | "images" : [ { 379 | "height" : 640, 380 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/00159cdb83398ea261f317087d77d304c8485e33", 381 | "width" : 640 382 | }, { 383 | "height" : 300, 384 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/bd1d588ee377ee99e831d09025b3f3f695a8c35b", 385 | "width" : 300 386 | }, { 387 | "height" : 64, 388 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/6f32ab09762c127980c50ad067fcd1af6796ce95", 389 | "width" : 64 390 | } ], 391 | "name" : "Opciones", 392 | "type" : "album", 393 | "uri" : "spotify:album:010mTPPbvCLqTkMrcPXmh2" 394 | }, { 395 | "album_type" : "album", 396 | "external_urls" : { 397 | "spotify" : "https://open.spotify.com/album/4yemN6Hd7jibsKraFT6Jbz" 398 | }, 399 | "href" : "https://api.spotify.com/v1/albums/4yemN6Hd7jibsKraFT6Jbz", 400 | "id" : "4yemN6Hd7jibsKraFT6Jbz", 401 | "images" : [ { 402 | "height" : 640, 403 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/cd0c2f91a04bb131c9928606787019b18c02cb51", 404 | "width" : 640 405 | }, { 406 | "height" : 300, 407 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/0c8090ef628b0a3624af861513425e737e081764", 408 | "width" : 300 409 | }, { 410 | "height" : 64, 411 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/ecbdfdf8ffd98d334b59b41e4d2c406dbd5e296c", 412 | "width" : 64 413 | } ], 414 | "name" : "Que siga la función", 415 | "type" : "album", 416 | "uri" : "spotify:album:4yemN6Hd7jibsKraFT6Jbz" 417 | }, { 418 | "album_type" : "album", 419 | "external_urls" : { 420 | "spotify" : "https://open.spotify.com/album/4UWMB8sGHR1HzwwgX3knpZ" 421 | }, 422 | "href" : "https://api.spotify.com/v1/albums/4UWMB8sGHR1HzwwgX3knpZ", 423 | "id" : "4UWMB8sGHR1HzwwgX3knpZ", 424 | "images" : [ { 425 | "height" : 582, 426 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/18c48170fe71d7f7264f5e16de6da6be182d4951", 427 | "width" : 640 428 | }, { 429 | "height" : 273, 430 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/23de2ac5ec3f1dfd6435b102bbf5fa9b245bd920", 431 | "width" : 300 432 | }, { 433 | "height" : 58, 434 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/3c2f1d5f793058e6a7e41556bf260656c006acef", 435 | "width" : 64 436 | } ], 437 | "name" : "Aquí huele a romero", 438 | "type" : "album", 439 | "uri" : "spotify:album:4UWMB8sGHR1HzwwgX3knpZ" 440 | }, { 441 | "album_type" : "album", 442 | "external_urls" : { 443 | "spotify" : "https://open.spotify.com/album/6ERD7RXP7URF4LadMa17M1" 444 | }, 445 | "href" : "https://api.spotify.com/v1/albums/6ERD7RXP7URF4LadMa17M1", 446 | "id" : "6ERD7RXP7URF4LadMa17M1", 447 | "images" : [ { 448 | "height" : 640, 449 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/5658820aaee39be3a4e9dd755dda38b20c778b07", 450 | "width" : 640 451 | }, { 452 | "height" : 300, 453 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/a76a637cc0526182b13fc783a288c2bce1fbc6af", 454 | "width" : 300 455 | }, { 456 | "height" : 64, 457 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/b3ced46c79ca52a6087165a645fdebfc5e24f73c", 458 | "width" : 64 459 | } ], 460 | "name" : "Todos Fuimos Heroes", 461 | "type" : "album", 462 | "uri" : "spotify:album:6ERD7RXP7URF4LadMa17M1" 463 | } ], 464 | "limit" : 20, 465 | "next" : "https://api.spotify.com/v1/artists/5YyScSZOuBHpoFhGvHFedc/albums?offset=20&limit=11&album_type=single,album,compilation,appears_on", 466 | "offset" : 0, 467 | "previous" : null, 468 | "total" : 31 469 | } 470 | -------------------------------------------------------------------------------- /spec/fixtures/albums.json: -------------------------------------------------------------------------------- 1 | { 2 | "album_type" : "album", 3 | "artists" : [ { 4 | "external_urls" : { 5 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 6 | }, 7 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 8 | "id" : "53A0W3U0s8diEn9RhXQhVz", 9 | "name" : "Keane", 10 | "type" : "artist", 11 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 12 | } ], 13 | "available_markets" : [ "CA", "MX", "US" ], 14 | "external_ids" : { 15 | "upc" : "00602537518333" 16 | }, 17 | "external_urls" : { 18 | "spotify" : "https://open.spotify.com/album/4O0zifDfVvsBV4C4gwyrom" 19 | }, 20 | "genres" : [ ], 21 | "href" : "https://api.spotify.com/v1/albums/4O0zifDfVvsBV4C4gwyrom", 22 | "id" : "4O0zifDfVvsBV4C4gwyrom", 23 | "images" : [ { 24 | "height" : 640, 25 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/ea3945d0e8081860745be94b506f435a667f73ff", 26 | "width" : 640 27 | }, { 28 | "height" : 300, 29 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/517b0f68260b2151bbf452d4f225ad447baed2b3", 30 | "width" : 300 31 | }, { 32 | "height" : 64, 33 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/7744f859322399016c9ffca75f4eb0fe32028ed6", 34 | "width" : 64 35 | } ], 36 | "name" : "The Best Of Keane", 37 | "popularity" : 58, 38 | "release_date" : { 39 | "day" : 11, 40 | "month" : 11, 41 | "year" : 2013 42 | }, 43 | "tracks" : { 44 | "href" : "https://api.spotify.com/v1/albums/4O0zifDfVvsBV4C4gwyrom/tracks?offset=0&limit=50", 45 | "items" : [ { 46 | "artists" : [ { 47 | "external_urls" : { 48 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 49 | }, 50 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 51 | "id" : "53A0W3U0s8diEn9RhXQhVz", 52 | "name" : "Keane", 53 | "type" : "artist", 54 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 55 | } ], 56 | "disc_number" : 1, 57 | "duration_ms" : 215986, 58 | "explicit" : false, 59 | "external_urls" : { 60 | "spotify" : "https://open.spotify.com/track/6hpDMWlzMz5XYGRaOAMO4z" 61 | }, 62 | "href" : "https://api.spotify.com/v1/tracks/6hpDMWlzMz5XYGRaOAMO4z", 63 | "id" : "6hpDMWlzMz5XYGRaOAMO4z", 64 | "name" : "Everybody's Changing", 65 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/ff5c93d41a2e59c1ca9dab405976951ce8b32a43", 66 | "track_number" : 1, 67 | "type" : "track", 68 | "uri" : "spotify:track:6hpDMWlzMz5XYGRaOAMO4z" 69 | }, { 70 | "artists" : [ { 71 | "external_urls" : { 72 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 73 | }, 74 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 75 | "id" : "53A0W3U0s8diEn9RhXQhVz", 76 | "name" : "Keane", 77 | "type" : "artist", 78 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 79 | } ], 80 | "disc_number" : 1, 81 | "duration_ms" : 235880, 82 | "explicit" : false, 83 | "external_urls" : { 84 | "spotify" : "https://open.spotify.com/track/3NDhKtd9RMJRxevIsDgIax" 85 | }, 86 | "href" : "https://api.spotify.com/v1/tracks/3NDhKtd9RMJRxevIsDgIax", 87 | "id" : "3NDhKtd9RMJRxevIsDgIax", 88 | "name" : "Somewhere Only We Know", 89 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/34e5df2ccd0fb9e7fa3cde02d0a34d53c8da12d3", 90 | "track_number" : 2, 91 | "type" : "track", 92 | "uri" : "spotify:track:3NDhKtd9RMJRxevIsDgIax" 93 | }, { 94 | "artists" : [ { 95 | "external_urls" : { 96 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 97 | }, 98 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 99 | "id" : "53A0W3U0s8diEn9RhXQhVz", 100 | "name" : "Keane", 101 | "type" : "artist", 102 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 103 | } ], 104 | "disc_number" : 1, 105 | "duration_ms" : 218426, 106 | "explicit" : false, 107 | "external_urls" : { 108 | "spotify" : "https://open.spotify.com/track/7km95ZyOYSj4jcQbHKfTAf" 109 | }, 110 | "href" : "https://api.spotify.com/v1/tracks/7km95ZyOYSj4jcQbHKfTAf", 111 | "id" : "7km95ZyOYSj4jcQbHKfTAf", 112 | "name" : "Bend & Break", 113 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/6e546f70d9464f08ca7d77265e61dde37f43a570", 114 | "track_number" : 3, 115 | "type" : "track", 116 | "uri" : "spotify:track:7km95ZyOYSj4jcQbHKfTAf" 117 | }, { 118 | "artists" : [ { 119 | "external_urls" : { 120 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 121 | }, 122 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 123 | "id" : "53A0W3U0s8diEn9RhXQhVz", 124 | "name" : "Keane", 125 | "type" : "artist", 126 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 127 | } ], 128 | "disc_number" : 1, 129 | "duration_ms" : 275093, 130 | "explicit" : false, 131 | "external_urls" : { 132 | "spotify" : "https://open.spotify.com/track/4z3KrHWKIuZU7OHj06lEVH" 133 | }, 134 | "href" : "https://api.spotify.com/v1/tracks/4z3KrHWKIuZU7OHj06lEVH", 135 | "id" : "4z3KrHWKIuZU7OHj06lEVH", 136 | "name" : "Bedshaped", 137 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/c4e98369be92da5ab4bab7ea2f2c0f9ce95cd82b", 138 | "track_number" : 4, 139 | "type" : "track", 140 | "uri" : "spotify:track:4z3KrHWKIuZU7OHj06lEVH" 141 | }, { 142 | "artists" : [ { 143 | "external_urls" : { 144 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 145 | }, 146 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 147 | "id" : "53A0W3U0s8diEn9RhXQhVz", 148 | "name" : "Keane", 149 | "type" : "artist", 150 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 151 | } ], 152 | "disc_number" : 1, 153 | "duration_ms" : 207653, 154 | "explicit" : false, 155 | "external_urls" : { 156 | "spotify" : "https://open.spotify.com/track/6jg6GUEAgTT2vsdjRsadoJ" 157 | }, 158 | "href" : "https://api.spotify.com/v1/tracks/6jg6GUEAgTT2vsdjRsadoJ", 159 | "id" : "6jg6GUEAgTT2vsdjRsadoJ", 160 | "name" : "This Is The Last Time", 161 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/b6e78b25a9b219a2a16f8811bbbc862b1ed33a45", 162 | "track_number" : 5, 163 | "type" : "track", 164 | "uri" : "spotify:track:6jg6GUEAgTT2vsdjRsadoJ" 165 | }, { 166 | "artists" : [ { 167 | "external_urls" : { 168 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 169 | }, 170 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 171 | "id" : "53A0W3U0s8diEn9RhXQhVz", 172 | "name" : "Keane", 173 | "type" : "artist", 174 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 175 | } ], 176 | "disc_number" : 1, 177 | "duration_ms" : 250786, 178 | "explicit" : false, 179 | "external_urls" : { 180 | "spotify" : "https://open.spotify.com/track/1ArhTTV8J4PTGmdayG1wPd" 181 | }, 182 | "href" : "https://api.spotify.com/v1/tracks/1ArhTTV8J4PTGmdayG1wPd", 183 | "id" : "1ArhTTV8J4PTGmdayG1wPd", 184 | "name" : "Atlantic", 185 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/9533d821cf76fd69403c73abfd717ea981e7b86a", 186 | "track_number" : 6, 187 | "type" : "track", 188 | "uri" : "spotify:track:1ArhTTV8J4PTGmdayG1wPd" 189 | }, { 190 | "artists" : [ { 191 | "external_urls" : { 192 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 193 | }, 194 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 195 | "id" : "53A0W3U0s8diEn9RhXQhVz", 196 | "name" : "Keane", 197 | "type" : "artist", 198 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 199 | } ], 200 | "disc_number" : 1, 201 | "duration_ms" : 185813, 202 | "explicit" : false, 203 | "external_urls" : { 204 | "spotify" : "https://open.spotify.com/track/7uvK9jZZJ0D6eFZGdlVvvc" 205 | }, 206 | "href" : "https://api.spotify.com/v1/tracks/7uvK9jZZJ0D6eFZGdlVvvc", 207 | "id" : "7uvK9jZZJ0D6eFZGdlVvvc", 208 | "name" : "Is It Any Wonder?", 209 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/02c437348f981eae28db7d2c8ab6de7afbaf96d8", 210 | "track_number" : 7, 211 | "type" : "track", 212 | "uri" : "spotify:track:7uvK9jZZJ0D6eFZGdlVvvc" 213 | }, { 214 | "artists" : [ { 215 | "external_urls" : { 216 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 217 | }, 218 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 219 | "id" : "53A0W3U0s8diEn9RhXQhVz", 220 | "name" : "Keane", 221 | "type" : "artist", 222 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 223 | } ], 224 | "disc_number" : 1, 225 | "duration_ms" : 239986, 226 | "explicit" : false, 227 | "external_urls" : { 228 | "spotify" : "https://open.spotify.com/track/1Hfvndy2EKJhc9rnuy1lB7" 229 | }, 230 | "href" : "https://api.spotify.com/v1/tracks/1Hfvndy2EKJhc9rnuy1lB7", 231 | "id" : "1Hfvndy2EKJhc9rnuy1lB7", 232 | "name" : "Nothing In My Way", 233 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/ffe06806c2475363254c4d6e94df15735c013b89", 234 | "track_number" : 8, 235 | "type" : "track", 236 | "uri" : "spotify:track:1Hfvndy2EKJhc9rnuy1lB7" 237 | }, { 238 | "artists" : [ { 239 | "external_urls" : { 240 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 241 | }, 242 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 243 | "id" : "53A0W3U0s8diEn9RhXQhVz", 244 | "name" : "Keane", 245 | "type" : "artist", 246 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 247 | } ], 248 | "disc_number" : 1, 249 | "duration_ms" : 277360, 250 | "explicit" : false, 251 | "external_urls" : { 252 | "spotify" : "https://open.spotify.com/track/59aw5lXI7XHflL5zptOq1r" 253 | }, 254 | "href" : "https://api.spotify.com/v1/tracks/59aw5lXI7XHflL5zptOq1r", 255 | "id" : "59aw5lXI7XHflL5zptOq1r", 256 | "name" : "Hamburg Song", 257 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/8a6f6f51f20130dc91b6e27beeb8305869e4586a", 258 | "track_number" : 9, 259 | "type" : "track", 260 | "uri" : "spotify:track:59aw5lXI7XHflL5zptOq1r" 261 | }, { 262 | "artists" : [ { 263 | "external_urls" : { 264 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 265 | }, 266 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 267 | "id" : "53A0W3U0s8diEn9RhXQhVz", 268 | "name" : "Keane", 269 | "type" : "artist", 270 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 271 | } ], 272 | "disc_number" : 1, 273 | "duration_ms" : 233520, 274 | "explicit" : false, 275 | "external_urls" : { 276 | "spotify" : "https://open.spotify.com/track/4Vv6AHvrrwdMQ1KNIvcuBI" 277 | }, 278 | "href" : "https://api.spotify.com/v1/tracks/4Vv6AHvrrwdMQ1KNIvcuBI", 279 | "id" : "4Vv6AHvrrwdMQ1KNIvcuBI", 280 | "name" : "Crystal Ball", 281 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/8e0d3659d390ccea870d1c27d35ed19b4c35e6af", 282 | "track_number" : 10, 283 | "type" : "track", 284 | "uri" : "spotify:track:4Vv6AHvrrwdMQ1KNIvcuBI" 285 | }, { 286 | "artists" : [ { 287 | "external_urls" : { 288 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 289 | }, 290 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 291 | "id" : "53A0W3U0s8diEn9RhXQhVz", 292 | "name" : "Keane", 293 | "type" : "artist", 294 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 295 | } ], 296 | "disc_number" : 1, 297 | "duration_ms" : 302813, 298 | "explicit" : false, 299 | "external_urls" : { 300 | "spotify" : "https://open.spotify.com/track/3e723Lej8vdPBZWC38Du6X" 301 | }, 302 | "href" : "https://api.spotify.com/v1/tracks/3e723Lej8vdPBZWC38Du6X", 303 | "id" : "3e723Lej8vdPBZWC38Du6X", 304 | "name" : "A Bad Dream", 305 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/cd141c56febc9c91ddce44376fba0189eb167301", 306 | "track_number" : 11, 307 | "type" : "track", 308 | "uri" : "spotify:track:3e723Lej8vdPBZWC38Du6X" 309 | }, { 310 | "artists" : [ { 311 | "external_urls" : { 312 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 313 | }, 314 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 315 | "id" : "53A0W3U0s8diEn9RhXQhVz", 316 | "name" : "Keane", 317 | "type" : "artist", 318 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 319 | } ], 320 | "disc_number" : 1, 321 | "duration_ms" : 267320, 322 | "explicit" : false, 323 | "external_urls" : { 324 | "spotify" : "https://open.spotify.com/track/3mCfE1Bpkbqs43cn7umnyD" 325 | }, 326 | "href" : "https://api.spotify.com/v1/tracks/3mCfE1Bpkbqs43cn7umnyD", 327 | "id" : "3mCfE1Bpkbqs43cn7umnyD", 328 | "name" : "Try Again", 329 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/54d3a90bc74bbcc65245461ea4f4546117edfd3d", 330 | "track_number" : 12, 331 | "type" : "track", 332 | "uri" : "spotify:track:3mCfE1Bpkbqs43cn7umnyD" 333 | }, { 334 | "artists" : [ { 335 | "external_urls" : { 336 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 337 | }, 338 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 339 | "id" : "53A0W3U0s8diEn9RhXQhVz", 340 | "name" : "Keane", 341 | "type" : "artist", 342 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 343 | } ], 344 | "disc_number" : 1, 345 | "duration_ms" : 204013, 346 | "explicit" : false, 347 | "external_urls" : { 348 | "spotify" : "https://open.spotify.com/track/67FPZEEW1bzaJRFigaunNB" 349 | }, 350 | "href" : "https://api.spotify.com/v1/tracks/67FPZEEW1bzaJRFigaunNB", 351 | "id" : "67FPZEEW1bzaJRFigaunNB", 352 | "name" : "Spiralling", 353 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/e779f28125b4f3dcadc4cba7319a55fccb63fdff", 354 | "track_number" : 13, 355 | "type" : "track", 356 | "uri" : "spotify:track:67FPZEEW1bzaJRFigaunNB" 357 | }, { 358 | "artists" : [ { 359 | "external_urls" : { 360 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 361 | }, 362 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 363 | "id" : "53A0W3U0s8diEn9RhXQhVz", 364 | "name" : "Keane", 365 | "type" : "artist", 366 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 367 | } ], 368 | "disc_number" : 1, 369 | "duration_ms" : 311533, 370 | "explicit" : false, 371 | "external_urls" : { 372 | "spotify" : "https://open.spotify.com/track/0watxV2JAuh0ynBvyoQYUD" 373 | }, 374 | "href" : "https://api.spotify.com/v1/tracks/0watxV2JAuh0ynBvyoQYUD", 375 | "id" : "0watxV2JAuh0ynBvyoQYUD", 376 | "name" : "Perfect Symmetry", 377 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/5174b246a138ff89d89fa2cf9c48084c0458a697", 378 | "track_number" : 14, 379 | "type" : "track", 380 | "uri" : "spotify:track:0watxV2JAuh0ynBvyoQYUD" 381 | }, { 382 | "artists" : [ { 383 | "external_urls" : { 384 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 385 | }, 386 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 387 | "id" : "53A0W3U0s8diEn9RhXQhVz", 388 | "name" : "Keane", 389 | "type" : "artist", 390 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 391 | } ], 392 | "disc_number" : 1, 393 | "duration_ms" : 289386, 394 | "explicit" : false, 395 | "external_urls" : { 396 | "spotify" : "https://open.spotify.com/track/5imGLA1TCZxj1XhbHg1aBf" 397 | }, 398 | "href" : "https://api.spotify.com/v1/tracks/5imGLA1TCZxj1XhbHg1aBf", 399 | "id" : "5imGLA1TCZxj1XhbHg1aBf", 400 | "name" : "My Shadow", 401 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/1c68d6ec921947b73b41b615fb897e2539ac14fc", 402 | "track_number" : 15, 403 | "type" : "track", 404 | "uri" : "spotify:track:5imGLA1TCZxj1XhbHg1aBf" 405 | }, { 406 | "artists" : [ { 407 | "external_urls" : { 408 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 409 | }, 410 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 411 | "id" : "53A0W3U0s8diEn9RhXQhVz", 412 | "name" : "Keane", 413 | "type" : "artist", 414 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 415 | } ], 416 | "disc_number" : 1, 417 | "duration_ms" : 196333, 418 | "explicit" : false, 419 | "external_urls" : { 420 | "spotify" : "https://open.spotify.com/track/7kqUw6kLH07YbwSsmt7mv6" 421 | }, 422 | "href" : "https://api.spotify.com/v1/tracks/7kqUw6kLH07YbwSsmt7mv6", 423 | "id" : "7kqUw6kLH07YbwSsmt7mv6", 424 | "name" : "Silenced By The Night", 425 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/135b4f5c7fea5f1943935ba60d968d8c47d218ac", 426 | "track_number" : 16, 427 | "type" : "track", 428 | "uri" : "spotify:track:7kqUw6kLH07YbwSsmt7mv6" 429 | }, { 430 | "artists" : [ { 431 | "external_urls" : { 432 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 433 | }, 434 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 435 | "id" : "53A0W3U0s8diEn9RhXQhVz", 436 | "name" : "Keane", 437 | "type" : "artist", 438 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 439 | } ], 440 | "disc_number" : 1, 441 | "duration_ms" : 236973, 442 | "explicit" : false, 443 | "external_urls" : { 444 | "spotify" : "https://open.spotify.com/track/5z5WJVTVygJ1j2JrLupFgV" 445 | }, 446 | "href" : "https://api.spotify.com/v1/tracks/5z5WJVTVygJ1j2JrLupFgV", 447 | "id" : "5z5WJVTVygJ1j2JrLupFgV", 448 | "name" : "Disconnected", 449 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/224fe326be753ecdff3dc2361e0ef801f6f9aab4", 450 | "track_number" : 17, 451 | "type" : "track", 452 | "uri" : "spotify:track:5z5WJVTVygJ1j2JrLupFgV" 453 | }, { 454 | "artists" : [ { 455 | "external_urls" : { 456 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 457 | }, 458 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 459 | "id" : "53A0W3U0s8diEn9RhXQhVz", 460 | "name" : "Keane", 461 | "type" : "artist", 462 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 463 | } ], 464 | "disc_number" : 1, 465 | "duration_ms" : 208133, 466 | "explicit" : false, 467 | "external_urls" : { 468 | "spotify" : "https://open.spotify.com/track/6RSVIVkxiCbG9a1z48gU0a" 469 | }, 470 | "href" : "https://api.spotify.com/v1/tracks/6RSVIVkxiCbG9a1z48gU0a", 471 | "id" : "6RSVIVkxiCbG9a1z48gU0a", 472 | "name" : "Sovereign Light Café", 473 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/72f6a875d90f2e8a50c91a5fe5b6c6a9d55bfc9f", 474 | "track_number" : 18, 475 | "type" : "track", 476 | "uri" : "spotify:track:6RSVIVkxiCbG9a1z48gU0a" 477 | }, { 478 | "artists" : [ { 479 | "external_urls" : { 480 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 481 | }, 482 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 483 | "id" : "53A0W3U0s8diEn9RhXQhVz", 484 | "name" : "Keane", 485 | "type" : "artist", 486 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 487 | } ], 488 | "disc_number" : 1, 489 | "duration_ms" : 201653, 490 | "explicit" : false, 491 | "external_urls" : { 492 | "spotify" : "https://open.spotify.com/track/0I67XU9xOD2ptzwluiYgKT" 493 | }, 494 | "href" : "https://api.spotify.com/v1/tracks/0I67XU9xOD2ptzwluiYgKT", 495 | "id" : "0I67XU9xOD2ptzwluiYgKT", 496 | "name" : "Higher Than The Sun", 497 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/3505c411cc93c082bf5a2f6e90c538abb00cf4b6", 498 | "track_number" : 19, 499 | "type" : "track", 500 | "uri" : "spotify:track:0I67XU9xOD2ptzwluiYgKT" 501 | }, { 502 | "artists" : [ { 503 | "external_urls" : { 504 | "spotify" : "https://open.spotify.com/artist/53A0W3U0s8diEn9RhXQhVz" 505 | }, 506 | "href" : "https://api.spotify.com/v1/artists/53A0W3U0s8diEn9RhXQhVz", 507 | "id" : "53A0W3U0s8diEn9RhXQhVz", 508 | "name" : "Keane", 509 | "type" : "artist", 510 | "uri" : "spotify:artist:53A0W3U0s8diEn9RhXQhVz" 511 | } ], 512 | "disc_number" : 1, 513 | "duration_ms" : 222426, 514 | "explicit" : false, 515 | "external_urls" : { 516 | "spotify" : "https://open.spotify.com/track/1sKHyjgqSO9mkTkZB60TUQ" 517 | }, 518 | "href" : "https://api.spotify.com/v1/tracks/1sKHyjgqSO9mkTkZB60TUQ", 519 | "id" : "1sKHyjgqSO9mkTkZB60TUQ", 520 | "name" : "Won't Be Broken", 521 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/d58d1d04c9aff7dc4ed45b82f98f727764e59fe9", 522 | "track_number" : 20, 523 | "type" : "track", 524 | "uri" : "spotify:track:1sKHyjgqSO9mkTkZB60TUQ" 525 | } ], 526 | "limit" : 50, 527 | "next" : null, 528 | "offset" : 0, 529 | "previous" : null, 530 | "total" : 20 531 | }, 532 | "type" : "album", 533 | "uri" : "spotify:album:4O0zifDfVvsBV4C4gwyrom" 534 | } 535 | -------------------------------------------------------------------------------- /spec/fixtures/artist_top_tracks.json: -------------------------------------------------------------------------------- 1 | { 2 | "tracks" : [ { 3 | "album" : { 4 | "album_type" : "album", 5 | "external_urls" : { 6 | "spotify" : "https://open.spotify.com/album/1hCwejZJomHEdOP7sZmGUR" 7 | }, 8 | "href" : "https://api.spotify.com/v1/albums/1hCwejZJomHEdOP7sZmGUR", 9 | "id" : "1hCwejZJomHEdOP7sZmGUR", 10 | "images" : [ { 11 | "height" : 640, 12 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/74dfaa37903f73ad94088c9daac6fd8d556d99fd", 13 | "width" : 640 14 | }, { 15 | "height" : 300, 16 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/88fb3247c3e4e5db094e01375e76929fe1cbde51", 17 | "width" : 300 18 | }, { 19 | "height" : 64, 20 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/7e04567fd71483b35ed7c3a7cc3f2f20d7daff16", 21 | "width" : 64 22 | } ], 23 | "name" : "Negociando gasolina", 24 | "type" : "album", 25 | "uri" : "spotify:album:1hCwejZJomHEdOP7sZmGUR" 26 | }, 27 | "artists" : [ { 28 | "external_urls" : { 29 | "spotify" : "https://open.spotify.com/artist/5YyScSZOuBHpoFhGvHFedc" 30 | }, 31 | "href" : "https://api.spotify.com/v1/artists/5YyScSZOuBHpoFhGvHFedc", 32 | "id" : "5YyScSZOuBHpoFhGvHFedc", 33 | "name" : "La Fuga", 34 | "type" : "artist", 35 | "uri" : "spotify:artist:5YyScSZOuBHpoFhGvHFedc" 36 | } ], 37 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "US", "UY" ], 38 | "disc_number" : 1, 39 | "duration_ms" : 208839, 40 | "explicit" : false, 41 | "external_ids" : { 42 | "isrc" : "ES5010500075" 43 | }, 44 | "external_urls" : { 45 | "spotify" : "https://open.spotify.com/track/46Yp4JsZIh8ceg5WBqW1ZB" 46 | }, 47 | "href" : "https://api.spotify.com/v1/tracks/46Yp4JsZIh8ceg5WBqW1ZB", 48 | "id" : "46Yp4JsZIh8ceg5WBqW1ZB", 49 | "name" : "Buscando en la basura", 50 | "popularity" : 0, 51 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/da9caef9eec49d8bd6c2c3ea552a06c8c0a77e55", 52 | "track_number" : 1, 53 | "type" : "track", 54 | "uri" : "spotify:track:46Yp4JsZIh8ceg5WBqW1ZB" 55 | }, { 56 | "album" : { 57 | "album_type" : "album", 58 | "external_urls" : { 59 | "spotify" : "https://open.spotify.com/album/7hwGksKIvfyqDj6iAAm1LV" 60 | }, 61 | "href" : "https://api.spotify.com/v1/albums/7hwGksKIvfyqDj6iAAm1LV", 62 | "id" : "7hwGksKIvfyqDj6iAAm1LV", 63 | "images" : [ { 64 | "height" : 640, 65 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/cd0edbe758a4f4329e005be8379171eb04e65111", 66 | "width" : 640 67 | }, { 68 | "height" : 300, 69 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/2ba17331b432cd01d4b157d9071ae81719447cd9", 70 | "width" : 300 71 | }, { 72 | "height" : 64, 73 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/79e009a2067a17a4905009e05977534ec57db371", 74 | "width" : 64 75 | } ], 76 | "name" : "A golpes de Rock'n'Roll", 77 | "type" : "album", 78 | "uri" : "spotify:album:7hwGksKIvfyqDj6iAAm1LV" 79 | }, 80 | "artists" : [ { 81 | "external_urls" : { 82 | "spotify" : "https://open.spotify.com/artist/5YyScSZOuBHpoFhGvHFedc" 83 | }, 84 | "href" : "https://api.spotify.com/v1/artists/5YyScSZOuBHpoFhGvHFedc", 85 | "id" : "5YyScSZOuBHpoFhGvHFedc", 86 | "name" : "La Fuga", 87 | "type" : "artist", 88 | "uri" : "spotify:artist:5YyScSZOuBHpoFhGvHFedc" 89 | } ], 90 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "US", "UY" ], 91 | "disc_number" : 1, 92 | "duration_ms" : 256213, 93 | "explicit" : false, 94 | "external_ids" : { 95 | "isrc" : "ES5010300550" 96 | }, 97 | "external_urls" : { 98 | "spotify" : "https://open.spotify.com/track/4OeGTfPIF6sURCstaEqf4R" 99 | }, 100 | "href" : "https://api.spotify.com/v1/tracks/4OeGTfPIF6sURCstaEqf4R", 101 | "id" : "4OeGTfPIF6sURCstaEqf4R", 102 | "name" : "P' aqui, p' alla", 103 | "popularity" : 0, 104 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/cf5238829eb56e95d226dd47d1d5ee24fac370aa", 105 | "track_number" : 9, 106 | "type" : "track", 107 | "uri" : "spotify:track:4OeGTfPIF6sURCstaEqf4R" 108 | }, { 109 | "album" : { 110 | "album_type" : "album", 111 | "external_urls" : { 112 | "spotify" : "https://open.spotify.com/album/7EpE7UsapcAWKmuzWVNa18" 113 | }, 114 | "href" : "https://api.spotify.com/v1/albums/7EpE7UsapcAWKmuzWVNa18", 115 | "id" : "7EpE7UsapcAWKmuzWVNa18", 116 | "images" : [ { 117 | "height" : 640, 118 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/dff7abe81ba3faca88fa74c31798b25935eca72e", 119 | "width" : 640 120 | }, { 121 | "height" : 300, 122 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/e0b960e265c9b46331848493686e8f8e3a2e8a5f", 123 | "width" : 300 124 | }, { 125 | "height" : 64, 126 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/b1ebbd7556100693e0c916245e0a147ac7f42350", 127 | "width" : 64 128 | } ], 129 | "name" : "Mira", 130 | "type" : "album", 131 | "uri" : "spotify:album:7EpE7UsapcAWKmuzWVNa18" 132 | }, 133 | "artists" : [ { 134 | "external_urls" : { 135 | "spotify" : "https://open.spotify.com/artist/5YyScSZOuBHpoFhGvHFedc" 136 | }, 137 | "href" : "https://api.spotify.com/v1/artists/5YyScSZOuBHpoFhGvHFedc", 138 | "id" : "5YyScSZOuBHpoFhGvHFedc", 139 | "name" : "La Fuga", 140 | "type" : "artist", 141 | "uri" : "spotify:artist:5YyScSZOuBHpoFhGvHFedc" 142 | } ], 143 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "US", "UY" ], 144 | "disc_number" : 1, 145 | "duration_ms" : 400480, 146 | "explicit" : false, 147 | "external_ids" : { 148 | "isrc" : "ES5010300538" 149 | }, 150 | "external_urls" : { 151 | "spotify" : "https://open.spotify.com/track/6tGUkobti5ztrb9aQ0UDEx" 152 | }, 153 | "href" : "https://api.spotify.com/v1/tracks/6tGUkobti5ztrb9aQ0UDEx", 154 | "id" : "6tGUkobti5ztrb9aQ0UDEx", 155 | "name" : "Por verte sonreir", 156 | "popularity" : 0, 157 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/5a32ba099159a21664080df4488eb4faed4884e3", 158 | "track_number" : 9, 159 | "type" : "track", 160 | "uri" : "spotify:track:6tGUkobti5ztrb9aQ0UDEx" 161 | }, { 162 | "album" : { 163 | "album_type" : "album", 164 | "external_urls" : { 165 | "spotify" : "https://open.spotify.com/album/7hwGksKIvfyqDj6iAAm1LV" 166 | }, 167 | "href" : "https://api.spotify.com/v1/albums/7hwGksKIvfyqDj6iAAm1LV", 168 | "id" : "7hwGksKIvfyqDj6iAAm1LV", 169 | "images" : [ { 170 | "height" : 640, 171 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/cd0edbe758a4f4329e005be8379171eb04e65111", 172 | "width" : 640 173 | }, { 174 | "height" : 300, 175 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/2ba17331b432cd01d4b157d9071ae81719447cd9", 176 | "width" : 300 177 | }, { 178 | "height" : 64, 179 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/79e009a2067a17a4905009e05977534ec57db371", 180 | "width" : 64 181 | } ], 182 | "name" : "A golpes de Rock'n'Roll", 183 | "type" : "album", 184 | "uri" : "spotify:album:7hwGksKIvfyqDj6iAAm1LV" 185 | }, 186 | "artists" : [ { 187 | "external_urls" : { 188 | "spotify" : "https://open.spotify.com/artist/5YyScSZOuBHpoFhGvHFedc" 189 | }, 190 | "href" : "https://api.spotify.com/v1/artists/5YyScSZOuBHpoFhGvHFedc", 191 | "id" : "5YyScSZOuBHpoFhGvHFedc", 192 | "name" : "La Fuga", 193 | "type" : "artist", 194 | "uri" : "spotify:artist:5YyScSZOuBHpoFhGvHFedc" 195 | } ], 196 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "US", "UY" ], 197 | "disc_number" : 1, 198 | "duration_ms" : 218493, 199 | "explicit" : false, 200 | "external_ids" : { 201 | "isrc" : "ES5010300544" 202 | }, 203 | "external_urls" : { 204 | "spotify" : "https://open.spotify.com/track/0FtwJkdBXBHZ4Yy20Xt56u" 205 | }, 206 | "href" : "https://api.spotify.com/v1/tracks/0FtwJkdBXBHZ4Yy20Xt56u", 207 | "id" : "0FtwJkdBXBHZ4Yy20Xt56u", 208 | "name" : "Pedazo de morron", 209 | "popularity" : 0, 210 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/0d64d167ab87053c213d321a3c876cb35afd727c", 211 | "track_number" : 3, 212 | "type" : "track", 213 | "uri" : "spotify:track:0FtwJkdBXBHZ4Yy20Xt56u" 214 | }, { 215 | "album" : { 216 | "album_type" : "album", 217 | "external_urls" : { 218 | "spotify" : "https://open.spotify.com/album/1hCwejZJomHEdOP7sZmGUR" 219 | }, 220 | "href" : "https://api.spotify.com/v1/albums/1hCwejZJomHEdOP7sZmGUR", 221 | "id" : "1hCwejZJomHEdOP7sZmGUR", 222 | "images" : [ { 223 | "height" : 640, 224 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/74dfaa37903f73ad94088c9daac6fd8d556d99fd", 225 | "width" : 640 226 | }, { 227 | "height" : 300, 228 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/88fb3247c3e4e5db094e01375e76929fe1cbde51", 229 | "width" : 300 230 | }, { 231 | "height" : 64, 232 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/7e04567fd71483b35ed7c3a7cc3f2f20d7daff16", 233 | "width" : 64 234 | } ], 235 | "name" : "Negociando gasolina", 236 | "type" : "album", 237 | "uri" : "spotify:album:1hCwejZJomHEdOP7sZmGUR" 238 | }, 239 | "artists" : [ { 240 | "external_urls" : { 241 | "spotify" : "https://open.spotify.com/artist/5YyScSZOuBHpoFhGvHFedc" 242 | }, 243 | "href" : "https://api.spotify.com/v1/artists/5YyScSZOuBHpoFhGvHFedc", 244 | "id" : "5YyScSZOuBHpoFhGvHFedc", 245 | "name" : "La Fuga", 246 | "type" : "artist", 247 | "uri" : "spotify:artist:5YyScSZOuBHpoFhGvHFedc" 248 | } ], 249 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "US", "UY" ], 250 | "disc_number" : 1, 251 | "duration_ms" : 259426, 252 | "explicit" : false, 253 | "external_ids" : { 254 | "isrc" : "ES5010500085" 255 | }, 256 | "external_urls" : { 257 | "spotify" : "https://open.spotify.com/track/66hWIxJIeJDDutXLhxpFJ5" 258 | }, 259 | "href" : "https://api.spotify.com/v1/tracks/66hWIxJIeJDDutXLhxpFJ5", 260 | "id" : "66hWIxJIeJDDutXLhxpFJ5", 261 | "name" : "Heroina", 262 | "popularity" : 0, 263 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/d4f367184b2547af46eba8399d7e5cbe3269f597", 264 | "track_number" : 11, 265 | "type" : "track", 266 | "uri" : "spotify:track:66hWIxJIeJDDutXLhxpFJ5" 267 | }, { 268 | "album" : { 269 | "album_type" : "album", 270 | "external_urls" : { 271 | "spotify" : "https://open.spotify.com/album/1hCwejZJomHEdOP7sZmGUR" 272 | }, 273 | "href" : "https://api.spotify.com/v1/albums/1hCwejZJomHEdOP7sZmGUR", 274 | "id" : "1hCwejZJomHEdOP7sZmGUR", 275 | "images" : [ { 276 | "height" : 640, 277 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/74dfaa37903f73ad94088c9daac6fd8d556d99fd", 278 | "width" : 640 279 | }, { 280 | "height" : 300, 281 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/88fb3247c3e4e5db094e01375e76929fe1cbde51", 282 | "width" : 300 283 | }, { 284 | "height" : 64, 285 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/7e04567fd71483b35ed7c3a7cc3f2f20d7daff16", 286 | "width" : 64 287 | } ], 288 | "name" : "Negociando gasolina", 289 | "type" : "album", 290 | "uri" : "spotify:album:1hCwejZJomHEdOP7sZmGUR" 291 | }, 292 | "artists" : [ { 293 | "external_urls" : { 294 | "spotify" : "https://open.spotify.com/artist/5YyScSZOuBHpoFhGvHFedc" 295 | }, 296 | "href" : "https://api.spotify.com/v1/artists/5YyScSZOuBHpoFhGvHFedc", 297 | "id" : "5YyScSZOuBHpoFhGvHFedc", 298 | "name" : "La Fuga", 299 | "type" : "artist", 300 | "uri" : "spotify:artist:5YyScSZOuBHpoFhGvHFedc" 301 | } ], 302 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "US", "UY" ], 303 | "disc_number" : 1, 304 | "duration_ms" : 218080, 305 | "explicit" : false, 306 | "external_ids" : { 307 | "isrc" : "ES5010500078" 308 | }, 309 | "external_urls" : { 310 | "spotify" : "https://open.spotify.com/track/4oV2PvimswAwkDeNWHGQz7" 311 | }, 312 | "href" : "https://api.spotify.com/v1/tracks/4oV2PvimswAwkDeNWHGQz7", 313 | "id" : "4oV2PvimswAwkDeNWHGQz7", 314 | "name" : "Baja por diversion", 315 | "popularity" : 0, 316 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/d881ef91af184effc8ef481d206576c852eef23a", 317 | "track_number" : 4, 318 | "type" : "track", 319 | "uri" : "spotify:track:4oV2PvimswAwkDeNWHGQz7" 320 | }, { 321 | "album" : { 322 | "album_type" : "album", 323 | "external_urls" : { 324 | "spotify" : "https://open.spotify.com/album/2qZt4hXKcszH8qS3pesaI7" 325 | }, 326 | "href" : "https://api.spotify.com/v1/albums/2qZt4hXKcszH8qS3pesaI7", 327 | "id" : "2qZt4hXKcszH8qS3pesaI7", 328 | "images" : [ { 329 | "height" : 640, 330 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/b42728aa1cf2bc1211b8b6b13f7ce26a7e243020", 331 | "width" : 621 332 | }, { 333 | "height" : 300, 334 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/2d2aa4ee7a42598797376e044122243c8ed9e1aa", 335 | "width" : 291 336 | }, { 337 | "height" : 64, 338 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/4a1494cbeffd96eba7c06f1eee18881141c81ca2", 339 | "width" : 62 340 | } ], 341 | "name" : "Asuntos pendientes", 342 | "type" : "album", 343 | "uri" : "spotify:album:2qZt4hXKcszH8qS3pesaI7" 344 | }, 345 | "artists" : [ { 346 | "external_urls" : { 347 | "spotify" : "https://open.spotify.com/artist/5YyScSZOuBHpoFhGvHFedc" 348 | }, 349 | "href" : "https://api.spotify.com/v1/artists/5YyScSZOuBHpoFhGvHFedc", 350 | "id" : "5YyScSZOuBHpoFhGvHFedc", 351 | "name" : "La Fuga", 352 | "type" : "artist", 353 | "uri" : "spotify:artist:5YyScSZOuBHpoFhGvHFedc" 354 | } ], 355 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "UY" ], 356 | "disc_number" : 1, 357 | "duration_ms" : 201920, 358 | "explicit" : false, 359 | "external_ids" : { 360 | "isrc" : "ES5150800381" 361 | }, 362 | "external_urls" : { 363 | "spotify" : "https://open.spotify.com/track/4TKQWmPapqekEDfCUr8wQl" 364 | }, 365 | "href" : "https://api.spotify.com/v1/tracks/4TKQWmPapqekEDfCUr8wQl", 366 | "id" : "4TKQWmPapqekEDfCUr8wQl", 367 | "name" : "Jaleo", 368 | "popularity" : 0, 369 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/44857a545fa577607d297aebd06bf72199a4dd20", 370 | "track_number" : 3, 371 | "type" : "track", 372 | "uri" : "spotify:track:4TKQWmPapqekEDfCUr8wQl" 373 | }, { 374 | "album" : { 375 | "album_type" : "album", 376 | "external_urls" : { 377 | "spotify" : "https://open.spotify.com/album/1hCwejZJomHEdOP7sZmGUR" 378 | }, 379 | "href" : "https://api.spotify.com/v1/albums/1hCwejZJomHEdOP7sZmGUR", 380 | "id" : "1hCwejZJomHEdOP7sZmGUR", 381 | "images" : [ { 382 | "height" : 640, 383 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/74dfaa37903f73ad94088c9daac6fd8d556d99fd", 384 | "width" : 640 385 | }, { 386 | "height" : 300, 387 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/88fb3247c3e4e5db094e01375e76929fe1cbde51", 388 | "width" : 300 389 | }, { 390 | "height" : 64, 391 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/7e04567fd71483b35ed7c3a7cc3f2f20d7daff16", 392 | "width" : 64 393 | } ], 394 | "name" : "Negociando gasolina", 395 | "type" : "album", 396 | "uri" : "spotify:album:1hCwejZJomHEdOP7sZmGUR" 397 | }, 398 | "artists" : [ { 399 | "external_urls" : { 400 | "spotify" : "https://open.spotify.com/artist/5YyScSZOuBHpoFhGvHFedc" 401 | }, 402 | "href" : "https://api.spotify.com/v1/artists/5YyScSZOuBHpoFhGvHFedc", 403 | "id" : "5YyScSZOuBHpoFhGvHFedc", 404 | "name" : "La Fuga", 405 | "type" : "artist", 406 | "uri" : "spotify:artist:5YyScSZOuBHpoFhGvHFedc" 407 | } ], 408 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "US", "UY" ], 409 | "disc_number" : 1, 410 | "duration_ms" : 235040, 411 | "explicit" : false, 412 | "external_ids" : { 413 | "isrc" : "ES5010500084" 414 | }, 415 | "external_urls" : { 416 | "spotify" : "https://open.spotify.com/track/5otY9fPV6oYSz0WA1D81sE" 417 | }, 418 | "href" : "https://api.spotify.com/v1/tracks/5otY9fPV6oYSz0WA1D81sE", 419 | "id" : "5otY9fPV6oYSz0WA1D81sE", 420 | "name" : "Luna de miel", 421 | "popularity" : 0, 422 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/64eca7a1f77316c8b384566f50ed1ad230399da9", 423 | "track_number" : 10, 424 | "type" : "track", 425 | "uri" : "spotify:track:5otY9fPV6oYSz0WA1D81sE" 426 | }, { 427 | "album" : { 428 | "album_type" : "album", 429 | "external_urls" : { 430 | "spotify" : "https://open.spotify.com/album/3dg7xWe5EU25bFZQMW0hFP" 431 | }, 432 | "href" : "https://api.spotify.com/v1/albums/3dg7xWe5EU25bFZQMW0hFP", 433 | "id" : "3dg7xWe5EU25bFZQMW0hFP", 434 | "images" : [ { 435 | "height" : 640, 436 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/91be30e13aa15bf20172d496eb992006b350a442", 437 | "width" : 640 438 | }, { 439 | "height" : 300, 440 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/8f536eb3839b6b34c90d6cee419f70d75148e982", 441 | "width" : 300 442 | }, { 443 | "height" : 64, 444 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/3db81afbb5ce855ea42684d53a9c666d381533ec", 445 | "width" : 64 446 | } ], 447 | "name" : "A las 12", 448 | "type" : "album", 449 | "uri" : "spotify:album:3dg7xWe5EU25bFZQMW0hFP" 450 | }, 451 | "artists" : [ { 452 | "external_urls" : { 453 | "spotify" : "https://open.spotify.com/artist/5YyScSZOuBHpoFhGvHFedc" 454 | }, 455 | "href" : "https://api.spotify.com/v1/artists/5YyScSZOuBHpoFhGvHFedc", 456 | "id" : "5YyScSZOuBHpoFhGvHFedc", 457 | "name" : "La Fuga", 458 | "type" : "artist", 459 | "uri" : "spotify:artist:5YyScSZOuBHpoFhGvHFedc" 460 | } ], 461 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "US", "UY" ], 462 | "disc_number" : 1, 463 | "duration_ms" : 167386, 464 | "explicit" : false, 465 | "external_ids" : { 466 | "isrc" : "ES5010200657" 467 | }, 468 | "external_urls" : { 469 | "spotify" : "https://open.spotify.com/track/3njI5vWbMeZWcTYy6a30Tt" 470 | }, 471 | "href" : "https://api.spotify.com/v1/tracks/3njI5vWbMeZWcTYy6a30Tt", 472 | "id" : "3njI5vWbMeZWcTYy6a30Tt", 473 | "name" : "Majareta", 474 | "popularity" : 0, 475 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/954a8bf4dc4449f8dd8af21f9267c6982fbafe8d", 476 | "track_number" : 2, 477 | "type" : "track", 478 | "uri" : "spotify:track:3njI5vWbMeZWcTYy6a30Tt" 479 | }, { 480 | "album" : { 481 | "album_type" : "album", 482 | "external_urls" : { 483 | "spotify" : "https://open.spotify.com/album/2qZt4hXKcszH8qS3pesaI7" 484 | }, 485 | "href" : "https://api.spotify.com/v1/albums/2qZt4hXKcszH8qS3pesaI7", 486 | "id" : "2qZt4hXKcszH8qS3pesaI7", 487 | "images" : [ { 488 | "height" : 640, 489 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/b42728aa1cf2bc1211b8b6b13f7ce26a7e243020", 490 | "width" : 621 491 | }, { 492 | "height" : 300, 493 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/2d2aa4ee7a42598797376e044122243c8ed9e1aa", 494 | "width" : 291 495 | }, { 496 | "height" : 64, 497 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/4a1494cbeffd96eba7c06f1eee18881141c81ca2", 498 | "width" : 62 499 | } ], 500 | "name" : "Asuntos pendientes", 501 | "type" : "album", 502 | "uri" : "spotify:album:2qZt4hXKcszH8qS3pesaI7" 503 | }, 504 | "artists" : [ { 505 | "external_urls" : { 506 | "spotify" : "https://open.spotify.com/artist/5YyScSZOuBHpoFhGvHFedc" 507 | }, 508 | "href" : "https://api.spotify.com/v1/artists/5YyScSZOuBHpoFhGvHFedc", 509 | "id" : "5YyScSZOuBHpoFhGvHFedc", 510 | "name" : "La Fuga", 511 | "type" : "artist", 512 | "uri" : "spotify:artist:5YyScSZOuBHpoFhGvHFedc" 513 | } ], 514 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "UY" ], 515 | "disc_number" : 1, 516 | "duration_ms" : 232826, 517 | "explicit" : false, 518 | "external_ids" : { 519 | "isrc" : "ES5150800382" 520 | }, 521 | "external_urls" : { 522 | "spotify" : "https://open.spotify.com/track/2FpyAQLrwqHbvtw6KXx5qu" 523 | }, 524 | "href" : "https://api.spotify.com/v1/tracks/2FpyAQLrwqHbvtw6KXx5qu", 525 | "id" : "2FpyAQLrwqHbvtw6KXx5qu", 526 | "name" : "No solo respirar", 527 | "popularity" : 0, 528 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/ac7c02dc3ca824142e910e81701284a1165bbbe1", 529 | "track_number" : 4, 530 | "type" : "track", 531 | "uri" : "spotify:track:2FpyAQLrwqHbvtw6KXx5qu" 532 | } ] 533 | } 534 | -------------------------------------------------------------------------------- /spec/fixtures/search_track.json: -------------------------------------------------------------------------------- 1 | { 2 | "tracks" : { 3 | "href" : "https://api.spotify.com/v1/search?query=gatan&offset=0&limit=20&type=track", 4 | "items" : [ { 5 | "album" : { 6 | "album_type" : "album", 7 | "external_urls" : { 8 | "spotify" : "https://open.spotify.com/album/2fOs6I0CgvaZj9agU8EAlH" 9 | }, 10 | "href" : "https://api.spotify.com/v1/albums/2fOs6I0CgvaZj9agU8EAlH", 11 | "id" : "2fOs6I0CgvaZj9agU8EAlH", 12 | "images" : [ { 13 | "height" : 640, 14 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/cad98ee963d47be0d1daad7038a1d783403d474c", 15 | "width" : 640 16 | }, { 17 | "height" : 300, 18 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/eefdfc1e9043005b0e5a662faafb7bd879ca4c5d", 19 | "width" : 300 20 | }, { 21 | "height" : 64, 22 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/863cea2cbe59afd1f5dedf1fc84cd48e40e3c363", 23 | "width" : 64 24 | } ], 25 | "name" : "Satan i gatan (Bonus Version)", 26 | "type" : "album", 27 | "uri" : "spotify:album:2fOs6I0CgvaZj9agU8EAlH" 28 | }, 29 | "artists" : [ { 30 | "external_urls" : { 31 | "spotify" : "https://open.spotify.com/artist/2OIWxN9xUhgUHkeUCWCaNs" 32 | }, 33 | "href" : "https://api.spotify.com/v1/artists/2OIWxN9xUhgUHkeUCWCaNs", 34 | "id" : "2OIWxN9xUhgUHkeUCWCaNs", 35 | "name" : "Veronica Maggio", 36 | "type" : "artist", 37 | "uri" : "spotify:artist:2OIWxN9xUhgUHkeUCWCaNs" 38 | } ], 39 | "available_markets" : [ "AR", "AT", "AU", "BE", "BO", "BR", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EC", "EE", "ES", "FI", "FR", "GB", "GR", "GT", "HK", "HN", "HU", "IE", "IS", "IT", "LT", "LU", "LV", "MT", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW" ], 40 | "disc_number" : 1, 41 | "duration_ms" : 195146, 42 | "explicit" : false, 43 | "external_ids" : { 44 | "isrc" : "SEUM71100167" 45 | }, 46 | "external_urls" : { 47 | "spotify" : "https://open.spotify.com/track/3q8WojYJVZsGClFGFBYdTc" 48 | }, 49 | "href" : "https://api.spotify.com/v1/tracks/3q8WojYJVZsGClFGFBYdTc", 50 | "id" : "3q8WojYJVZsGClFGFBYdTc", 51 | "name" : "Satan i gatan", 52 | "popularity" : 0, 53 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/e91ad6c6987da40df2c4b225759157f0416e66e5", 54 | "track_number" : 1, 55 | "type" : "track", 56 | "uri" : "spotify:track:3q8WojYJVZsGClFGFBYdTc" 57 | }, { 58 | "album" : { 59 | "album_type" : "album", 60 | "external_urls" : { 61 | "spotify" : "https://open.spotify.com/album/2fOs6I0CgvaZj9agU8EAlH" 62 | }, 63 | "href" : "https://api.spotify.com/v1/albums/2fOs6I0CgvaZj9agU8EAlH", 64 | "id" : "2fOs6I0CgvaZj9agU8EAlH", 65 | "images" : [ { 66 | "height" : 640, 67 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/cad98ee963d47be0d1daad7038a1d783403d474c", 68 | "width" : 640 69 | }, { 70 | "height" : 300, 71 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/eefdfc1e9043005b0e5a662faafb7bd879ca4c5d", 72 | "width" : 300 73 | }, { 74 | "height" : 64, 75 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/863cea2cbe59afd1f5dedf1fc84cd48e40e3c363", 76 | "width" : 64 77 | } ], 78 | "name" : "Satan i gatan (Bonus Version)", 79 | "type" : "album", 80 | "uri" : "spotify:album:2fOs6I0CgvaZj9agU8EAlH" 81 | }, 82 | "artists" : [ { 83 | "external_urls" : { 84 | "spotify" : "https://open.spotify.com/artist/2OIWxN9xUhgUHkeUCWCaNs" 85 | }, 86 | "href" : "https://api.spotify.com/v1/artists/2OIWxN9xUhgUHkeUCWCaNs", 87 | "id" : "2OIWxN9xUhgUHkeUCWCaNs", 88 | "name" : "Veronica Maggio", 89 | "type" : "artist", 90 | "uri" : "spotify:artist:2OIWxN9xUhgUHkeUCWCaNs" 91 | } ], 92 | "available_markets" : [ "AR", "AT", "AU", "BE", "BO", "BR", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EC", "EE", "ES", "FI", "FR", "GB", "GR", "GT", "HK", "HN", "HU", "IE", "IS", "IT", "LT", "LU", "LV", "MT", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW" ], 93 | "disc_number" : 1, 94 | "duration_ms" : 159093, 95 | "explicit" : false, 96 | "external_ids" : { 97 | "isrc" : "SEUM71100341" 98 | }, 99 | "external_urls" : { 100 | "spotify" : "https://open.spotify.com/track/2jEPQKvz7dh1pfpRyq6G1C" 101 | }, 102 | "href" : "https://api.spotify.com/v1/tracks/2jEPQKvz7dh1pfpRyq6G1C", 103 | "id" : "2jEPQKvz7dh1pfpRyq6G1C", 104 | "name" : "Snälla bli min", 105 | "popularity" : 0, 106 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/7af74baccddd50b7860994d62907c3a107fdfc91", 107 | "track_number" : 8, 108 | "type" : "track", 109 | "uri" : "spotify:track:2jEPQKvz7dh1pfpRyq6G1C" 110 | }, { 111 | "album" : { 112 | "album_type" : "album", 113 | "external_urls" : { 114 | "spotify" : "https://open.spotify.com/album/2fOs6I0CgvaZj9agU8EAlH" 115 | }, 116 | "href" : "https://api.spotify.com/v1/albums/2fOs6I0CgvaZj9agU8EAlH", 117 | "id" : "2fOs6I0CgvaZj9agU8EAlH", 118 | "images" : [ { 119 | "height" : 640, 120 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/cad98ee963d47be0d1daad7038a1d783403d474c", 121 | "width" : 640 122 | }, { 123 | "height" : 300, 124 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/eefdfc1e9043005b0e5a662faafb7bd879ca4c5d", 125 | "width" : 300 126 | }, { 127 | "height" : 64, 128 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/863cea2cbe59afd1f5dedf1fc84cd48e40e3c363", 129 | "width" : 64 130 | } ], 131 | "name" : "Satan i gatan (Bonus Version)", 132 | "type" : "album", 133 | "uri" : "spotify:album:2fOs6I0CgvaZj9agU8EAlH" 134 | }, 135 | "artists" : [ { 136 | "external_urls" : { 137 | "spotify" : "https://open.spotify.com/artist/2OIWxN9xUhgUHkeUCWCaNs" 138 | }, 139 | "href" : "https://api.spotify.com/v1/artists/2OIWxN9xUhgUHkeUCWCaNs", 140 | "id" : "2OIWxN9xUhgUHkeUCWCaNs", 141 | "name" : "Veronica Maggio", 142 | "type" : "artist", 143 | "uri" : "spotify:artist:2OIWxN9xUhgUHkeUCWCaNs" 144 | } ], 145 | "available_markets" : [ "AR", "AT", "AU", "BE", "BO", "BR", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EC", "EE", "ES", "FI", "FR", "GB", "GR", "GT", "HK", "HN", "HU", "IE", "IS", "IT", "LT", "LU", "LV", "MT", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW" ], 146 | "disc_number" : 1, 147 | "duration_ms" : 212453, 148 | "explicit" : false, 149 | "external_ids" : { 150 | "isrc" : "SEUM71100344" 151 | }, 152 | "external_urls" : { 153 | "spotify" : "https://open.spotify.com/track/5MEuFY2DxrozPEgGpR8Fji" 154 | }, 155 | "href" : "https://api.spotify.com/v1/tracks/5MEuFY2DxrozPEgGpR8Fji", 156 | "id" : "5MEuFY2DxrozPEgGpR8Fji", 157 | "name" : "Välkommen in", 158 | "popularity" : 0, 159 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/586182522dfc38c24a528ab37ac33522d3685761", 160 | "track_number" : 2, 161 | "type" : "track", 162 | "uri" : "spotify:track:5MEuFY2DxrozPEgGpR8Fji" 163 | }, { 164 | "album" : { 165 | "album_type" : "album", 166 | "external_urls" : { 167 | "spotify" : "https://open.spotify.com/album/2fOs6I0CgvaZj9agU8EAlH" 168 | }, 169 | "href" : "https://api.spotify.com/v1/albums/2fOs6I0CgvaZj9agU8EAlH", 170 | "id" : "2fOs6I0CgvaZj9agU8EAlH", 171 | "images" : [ { 172 | "height" : 640, 173 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/cad98ee963d47be0d1daad7038a1d783403d474c", 174 | "width" : 640 175 | }, { 176 | "height" : 300, 177 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/eefdfc1e9043005b0e5a662faafb7bd879ca4c5d", 178 | "width" : 300 179 | }, { 180 | "height" : 64, 181 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/863cea2cbe59afd1f5dedf1fc84cd48e40e3c363", 182 | "width" : 64 183 | } ], 184 | "name" : "Satan i gatan (Bonus Version)", 185 | "type" : "album", 186 | "uri" : "spotify:album:2fOs6I0CgvaZj9agU8EAlH" 187 | }, 188 | "artists" : [ { 189 | "external_urls" : { 190 | "spotify" : "https://open.spotify.com/artist/2OIWxN9xUhgUHkeUCWCaNs" 191 | }, 192 | "href" : "https://api.spotify.com/v1/artists/2OIWxN9xUhgUHkeUCWCaNs", 193 | "id" : "2OIWxN9xUhgUHkeUCWCaNs", 194 | "name" : "Veronica Maggio", 195 | "type" : "artist", 196 | "uri" : "spotify:artist:2OIWxN9xUhgUHkeUCWCaNs" 197 | } ], 198 | "available_markets" : [ "AR", "AT", "AU", "BE", "BO", "BR", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EC", "EE", "ES", "FI", "FR", "GB", "GR", "GT", "HK", "HN", "HU", "IE", "IS", "IT", "LT", "LU", "LV", "MT", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW" ], 199 | "disc_number" : 1, 200 | "duration_ms" : 201360, 201 | "explicit" : false, 202 | "external_ids" : { 203 | "isrc" : "SEUM71100339" 204 | }, 205 | "external_urls" : { 206 | "spotify" : "https://open.spotify.com/track/6CtVEyME2La34RATPuJcnx" 207 | }, 208 | "href" : "https://api.spotify.com/v1/tracks/6CtVEyME2La34RATPuJcnx", 209 | "id" : "6CtVEyME2La34RATPuJcnx", 210 | "name" : "Mitt hjärta blöder", 211 | "popularity" : 0, 212 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/971e932fcafc00abd5ee3ee2c1a6acc04a880251", 213 | "track_number" : 4, 214 | "type" : "track", 215 | "uri" : "spotify:track:6CtVEyME2La34RATPuJcnx" 216 | }, { 217 | "album" : { 218 | "album_type" : "album", 219 | "external_urls" : { 220 | "spotify" : "https://open.spotify.com/album/2fOs6I0CgvaZj9agU8EAlH" 221 | }, 222 | "href" : "https://api.spotify.com/v1/albums/2fOs6I0CgvaZj9agU8EAlH", 223 | "id" : "2fOs6I0CgvaZj9agU8EAlH", 224 | "images" : [ { 225 | "height" : 640, 226 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/cad98ee963d47be0d1daad7038a1d783403d474c", 227 | "width" : 640 228 | }, { 229 | "height" : 300, 230 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/eefdfc1e9043005b0e5a662faafb7bd879ca4c5d", 231 | "width" : 300 232 | }, { 233 | "height" : 64, 234 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/863cea2cbe59afd1f5dedf1fc84cd48e40e3c363", 235 | "width" : 64 236 | } ], 237 | "name" : "Satan i gatan (Bonus Version)", 238 | "type" : "album", 239 | "uri" : "spotify:album:2fOs6I0CgvaZj9agU8EAlH" 240 | }, 241 | "artists" : [ { 242 | "external_urls" : { 243 | "spotify" : "https://open.spotify.com/artist/2OIWxN9xUhgUHkeUCWCaNs" 244 | }, 245 | "href" : "https://api.spotify.com/v1/artists/2OIWxN9xUhgUHkeUCWCaNs", 246 | "id" : "2OIWxN9xUhgUHkeUCWCaNs", 247 | "name" : "Veronica Maggio", 248 | "type" : "artist", 249 | "uri" : "spotify:artist:2OIWxN9xUhgUHkeUCWCaNs" 250 | } ], 251 | "available_markets" : [ "AR", "AT", "AU", "BE", "BO", "BR", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EC", "EE", "ES", "FI", "FR", "GB", "GR", "GT", "HK", "HN", "HU", "IE", "IS", "IT", "LT", "LU", "LV", "MT", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW" ], 252 | "disc_number" : 1, 253 | "duration_ms" : 201466, 254 | "explicit" : false, 255 | "external_ids" : { 256 | "isrc" : "SEUM71100337" 257 | }, 258 | "external_urls" : { 259 | "spotify" : "https://open.spotify.com/track/2GbyU3ZuI1gDuSCQJCXwe1" 260 | }, 261 | "href" : "https://api.spotify.com/v1/tracks/2GbyU3ZuI1gDuSCQJCXwe1", 262 | "id" : "2GbyU3ZuI1gDuSCQJCXwe1", 263 | "name" : "Inga kläder", 264 | "popularity" : 0, 265 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/b5cb8fb1bdd6cf05b2426bd6a0f36ec00abf0b9e", 266 | "track_number" : 6, 267 | "type" : "track", 268 | "uri" : "spotify:track:2GbyU3ZuI1gDuSCQJCXwe1" 269 | }, { 270 | "album" : { 271 | "album_type" : "album", 272 | "external_urls" : { 273 | "spotify" : "https://open.spotify.com/album/2fOs6I0CgvaZj9agU8EAlH" 274 | }, 275 | "href" : "https://api.spotify.com/v1/albums/2fOs6I0CgvaZj9agU8EAlH", 276 | "id" : "2fOs6I0CgvaZj9agU8EAlH", 277 | "images" : [ { 278 | "height" : 640, 279 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/cad98ee963d47be0d1daad7038a1d783403d474c", 280 | "width" : 640 281 | }, { 282 | "height" : 300, 283 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/eefdfc1e9043005b0e5a662faafb7bd879ca4c5d", 284 | "width" : 300 285 | }, { 286 | "height" : 64, 287 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/863cea2cbe59afd1f5dedf1fc84cd48e40e3c363", 288 | "width" : 64 289 | } ], 290 | "name" : "Satan i gatan (Bonus Version)", 291 | "type" : "album", 292 | "uri" : "spotify:album:2fOs6I0CgvaZj9agU8EAlH" 293 | }, 294 | "artists" : [ { 295 | "external_urls" : { 296 | "spotify" : "https://open.spotify.com/artist/2OIWxN9xUhgUHkeUCWCaNs" 297 | }, 298 | "href" : "https://api.spotify.com/v1/artists/2OIWxN9xUhgUHkeUCWCaNs", 299 | "id" : "2OIWxN9xUhgUHkeUCWCaNs", 300 | "name" : "Veronica Maggio", 301 | "type" : "artist", 302 | "uri" : "spotify:artist:2OIWxN9xUhgUHkeUCWCaNs" 303 | } ], 304 | "available_markets" : [ "AR", "AT", "AU", "BE", "BO", "BR", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EC", "EE", "ES", "FI", "FR", "GB", "GR", "GT", "HK", "HN", "HU", "IE", "IS", "IT", "LT", "LU", "LV", "MT", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW" ], 305 | "disc_number" : 1, 306 | "duration_ms" : 202746, 307 | "explicit" : false, 308 | "external_ids" : { 309 | "isrc" : "SEUM71100165" 310 | }, 311 | "external_urls" : { 312 | "spotify" : "https://open.spotify.com/track/5M2y8QdDepGYMsWyxhoxQU" 313 | }, 314 | "href" : "https://api.spotify.com/v1/tracks/5M2y8QdDepGYMsWyxhoxQU", 315 | "id" : "5M2y8QdDepGYMsWyxhoxQU", 316 | "name" : "Jag kommer", 317 | "popularity" : 0, 318 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/39da3984022220bb8e996a419b909b8cbcabd385", 319 | "track_number" : 3, 320 | "type" : "track", 321 | "uri" : "spotify:track:5M2y8QdDepGYMsWyxhoxQU" 322 | }, { 323 | "album" : { 324 | "album_type" : "album", 325 | "external_urls" : { 326 | "spotify" : "https://open.spotify.com/album/2fOs6I0CgvaZj9agU8EAlH" 327 | }, 328 | "href" : "https://api.spotify.com/v1/albums/2fOs6I0CgvaZj9agU8EAlH", 329 | "id" : "2fOs6I0CgvaZj9agU8EAlH", 330 | "images" : [ { 331 | "height" : 640, 332 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/cad98ee963d47be0d1daad7038a1d783403d474c", 333 | "width" : 640 334 | }, { 335 | "height" : 300, 336 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/eefdfc1e9043005b0e5a662faafb7bd879ca4c5d", 337 | "width" : 300 338 | }, { 339 | "height" : 64, 340 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/863cea2cbe59afd1f5dedf1fc84cd48e40e3c363", 341 | "width" : 64 342 | } ], 343 | "name" : "Satan i gatan (Bonus Version)", 344 | "type" : "album", 345 | "uri" : "spotify:album:2fOs6I0CgvaZj9agU8EAlH" 346 | }, 347 | "artists" : [ { 348 | "external_urls" : { 349 | "spotify" : "https://open.spotify.com/artist/2OIWxN9xUhgUHkeUCWCaNs" 350 | }, 351 | "href" : "https://api.spotify.com/v1/artists/2OIWxN9xUhgUHkeUCWCaNs", 352 | "id" : "2OIWxN9xUhgUHkeUCWCaNs", 353 | "name" : "Veronica Maggio", 354 | "type" : "artist", 355 | "uri" : "spotify:artist:2OIWxN9xUhgUHkeUCWCaNs" 356 | } ], 357 | "available_markets" : [ "AR", "AT", "AU", "BE", "BO", "BR", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EC", "EE", "ES", "FI", "FR", "GB", "GR", "GT", "HK", "HN", "HU", "IE", "IS", "IT", "LT", "LU", "LV", "MT", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW" ], 358 | "disc_number" : 1, 359 | "duration_ms" : 240826, 360 | "explicit" : false, 361 | "external_ids" : { 362 | "isrc" : "SEUM71100340" 363 | }, 364 | "external_urls" : { 365 | "spotify" : "https://open.spotify.com/track/3jB5trbr0kQqQRkYr3M3u5" 366 | }, 367 | "href" : "https://api.spotify.com/v1/tracks/3jB5trbr0kQqQRkYr3M3u5", 368 | "id" : "3jB5trbr0kQqQRkYr3M3u5", 369 | "name" : "Sju sorger", 370 | "popularity" : 0, 371 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/5f5bc4f234f0b0caa6bb3c70ee777494b3e1d05c", 372 | "track_number" : 9, 373 | "type" : "track", 374 | "uri" : "spotify:track:3jB5trbr0kQqQRkYr3M3u5" 375 | }, { 376 | "album" : { 377 | "album_type" : "single", 378 | "external_urls" : { 379 | "spotify" : "https://open.spotify.com/album/5CCjGmIH483h4J9UvME0eR" 380 | }, 381 | "href" : "https://api.spotify.com/v1/albums/5CCjGmIH483h4J9UvME0eR", 382 | "id" : "5CCjGmIH483h4J9UvME0eR", 383 | "images" : [ { 384 | "height" : 640, 385 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/743f134a97aa904f90674be6f304db28c8be91f7", 386 | "width" : 640 387 | }, { 388 | "height" : 300, 389 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/09ff1e1144cc297d42acaaa839e0ad422ba7abe5", 390 | "width" : 300 391 | }, { 392 | "height" : 64, 393 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/66d320404c8f56bb7dd0c53da61f794a70a7e07c", 394 | "width" : 64 395 | } ], 396 | "name" : "Lyckliga gatan", 397 | "type" : "album", 398 | "uri" : "spotify:album:5CCjGmIH483h4J9UvME0eR" 399 | }, 400 | "artists" : [ { 401 | "external_urls" : { 402 | "spotify" : "https://open.spotify.com/artist/3Z6WVJzHQ12kzNjhzDkIYP" 403 | }, 404 | "href" : "https://api.spotify.com/v1/artists/3Z6WVJzHQ12kzNjhzDkIYP", 405 | "id" : "3Z6WVJzHQ12kzNjhzDkIYP", 406 | "name" : "Timo Räisänen", 407 | "type" : "artist", 408 | "uri" : "spotify:artist:3Z6WVJzHQ12kzNjhzDkIYP" 409 | } ], 410 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "UY" ], 411 | "disc_number" : 1, 412 | "duration_ms" : 201653, 413 | "explicit" : false, 414 | "external_ids" : { 415 | "isrc" : "SEWBD1300602" 416 | }, 417 | "external_urls" : { 418 | "spotify" : "https://open.spotify.com/track/4fWtlkaM9bnRzbJkpBQ4fg" 419 | }, 420 | "href" : "https://api.spotify.com/v1/tracks/4fWtlkaM9bnRzbJkpBQ4fg", 421 | "id" : "4fWtlkaM9bnRzbJkpBQ4fg", 422 | "name" : "Lyckliga gatan - Radio Edit", 423 | "popularity" : 0, 424 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/2611c717b85bd118ca255c0bc2ca23c4cfec806c", 425 | "track_number" : 1, 426 | "type" : "track", 427 | "uri" : "spotify:track:4fWtlkaM9bnRzbJkpBQ4fg" 428 | }, { 429 | "album" : { 430 | "album_type" : "album", 431 | "external_urls" : { 432 | "spotify" : "https://open.spotify.com/album/2fOs6I0CgvaZj9agU8EAlH" 433 | }, 434 | "href" : "https://api.spotify.com/v1/albums/2fOs6I0CgvaZj9agU8EAlH", 435 | "id" : "2fOs6I0CgvaZj9agU8EAlH", 436 | "images" : [ { 437 | "height" : 640, 438 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/cad98ee963d47be0d1daad7038a1d783403d474c", 439 | "width" : 640 440 | }, { 441 | "height" : 300, 442 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/eefdfc1e9043005b0e5a662faafb7bd879ca4c5d", 443 | "width" : 300 444 | }, { 445 | "height" : 64, 446 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/863cea2cbe59afd1f5dedf1fc84cd48e40e3c363", 447 | "width" : 64 448 | } ], 449 | "name" : "Satan i gatan (Bonus Version)", 450 | "type" : "album", 451 | "uri" : "spotify:album:2fOs6I0CgvaZj9agU8EAlH" 452 | }, 453 | "artists" : [ { 454 | "external_urls" : { 455 | "spotify" : "https://open.spotify.com/artist/2OIWxN9xUhgUHkeUCWCaNs" 456 | }, 457 | "href" : "https://api.spotify.com/v1/artists/2OIWxN9xUhgUHkeUCWCaNs", 458 | "id" : "2OIWxN9xUhgUHkeUCWCaNs", 459 | "name" : "Veronica Maggio", 460 | "type" : "artist", 461 | "uri" : "spotify:artist:2OIWxN9xUhgUHkeUCWCaNs" 462 | } ], 463 | "available_markets" : [ "AR", "AT", "AU", "BE", "BO", "BR", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EC", "EE", "ES", "FI", "FR", "GB", "GR", "GT", "HK", "HN", "HU", "IE", "IS", "IT", "LT", "LU", "LV", "MT", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW" ], 464 | "disc_number" : 1, 465 | "duration_ms" : 156786, 466 | "explicit" : false, 467 | "external_ids" : { 468 | "isrc" : "SEUM71100343" 469 | }, 470 | "external_urls" : { 471 | "spotify" : "https://open.spotify.com/track/3woptHfuKkrFvTqmCS9Mn7" 472 | }, 473 | "href" : "https://api.spotify.com/v1/tracks/3woptHfuKkrFvTqmCS9Mn7", 474 | "id" : "3woptHfuKkrFvTqmCS9Mn7", 475 | "name" : "Vi kommer alltid ha Paris", 476 | "popularity" : 0, 477 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/586ce0383c3b046a710b555ca508280ea262e59b", 478 | "track_number" : 5, 479 | "type" : "track", 480 | "uri" : "spotify:track:3woptHfuKkrFvTqmCS9Mn7" 481 | }, { 482 | "album" : { 483 | "album_type" : "album", 484 | "external_urls" : { 485 | "spotify" : "https://open.spotify.com/album/2fOs6I0CgvaZj9agU8EAlH" 486 | }, 487 | "href" : "https://api.spotify.com/v1/albums/2fOs6I0CgvaZj9agU8EAlH", 488 | "id" : "2fOs6I0CgvaZj9agU8EAlH", 489 | "images" : [ { 490 | "height" : 640, 491 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/cad98ee963d47be0d1daad7038a1d783403d474c", 492 | "width" : 640 493 | }, { 494 | "height" : 300, 495 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/eefdfc1e9043005b0e5a662faafb7bd879ca4c5d", 496 | "width" : 300 497 | }, { 498 | "height" : 64, 499 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/863cea2cbe59afd1f5dedf1fc84cd48e40e3c363", 500 | "width" : 64 501 | } ], 502 | "name" : "Satan i gatan (Bonus Version)", 503 | "type" : "album", 504 | "uri" : "spotify:album:2fOs6I0CgvaZj9agU8EAlH" 505 | }, 506 | "artists" : [ { 507 | "external_urls" : { 508 | "spotify" : "https://open.spotify.com/artist/2OIWxN9xUhgUHkeUCWCaNs" 509 | }, 510 | "href" : "https://api.spotify.com/v1/artists/2OIWxN9xUhgUHkeUCWCaNs", 511 | "id" : "2OIWxN9xUhgUHkeUCWCaNs", 512 | "name" : "Veronica Maggio", 513 | "type" : "artist", 514 | "uri" : "spotify:artist:2OIWxN9xUhgUHkeUCWCaNs" 515 | } ], 516 | "available_markets" : [ "AR", "AT", "AU", "BE", "BO", "BR", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EC", "EE", "ES", "FI", "FR", "GB", "GR", "GT", "HK", "HN", "HU", "IE", "IS", "IT", "LT", "LU", "LV", "MT", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW" ], 517 | "disc_number" : 1, 518 | "duration_ms" : 237320, 519 | "explicit" : false, 520 | "external_ids" : { 521 | "isrc" : "SEUM71100336" 522 | }, 523 | "external_urls" : { 524 | "spotify" : "https://open.spotify.com/track/4AK85CoitZUXRKTCSw4xQE" 525 | }, 526 | "href" : "https://api.spotify.com/v1/tracks/4AK85CoitZUXRKTCSw4xQE", 527 | "id" : "4AK85CoitZUXRKTCSw4xQE", 528 | "name" : "Finns det en så finns det flera", 529 | "popularity" : 0, 530 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/21c1289f5250ac555213ca3d0858c81e7a112a7a", 531 | "track_number" : 10, 532 | "type" : "track", 533 | "uri" : "spotify:track:4AK85CoitZUXRKTCSw4xQE" 534 | }, { 535 | "album" : { 536 | "album_type" : "album", 537 | "external_urls" : { 538 | "spotify" : "https://open.spotify.com/album/2fOs6I0CgvaZj9agU8EAlH" 539 | }, 540 | "href" : "https://api.spotify.com/v1/albums/2fOs6I0CgvaZj9agU8EAlH", 541 | "id" : "2fOs6I0CgvaZj9agU8EAlH", 542 | "images" : [ { 543 | "height" : 640, 544 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/cad98ee963d47be0d1daad7038a1d783403d474c", 545 | "width" : 640 546 | }, { 547 | "height" : 300, 548 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/eefdfc1e9043005b0e5a662faafb7bd879ca4c5d", 549 | "width" : 300 550 | }, { 551 | "height" : 64, 552 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/863cea2cbe59afd1f5dedf1fc84cd48e40e3c363", 553 | "width" : 64 554 | } ], 555 | "name" : "Satan i gatan (Bonus Version)", 556 | "type" : "album", 557 | "uri" : "spotify:album:2fOs6I0CgvaZj9agU8EAlH" 558 | }, 559 | "artists" : [ { 560 | "external_urls" : { 561 | "spotify" : "https://open.spotify.com/artist/2OIWxN9xUhgUHkeUCWCaNs" 562 | }, 563 | "href" : "https://api.spotify.com/v1/artists/2OIWxN9xUhgUHkeUCWCaNs", 564 | "id" : "2OIWxN9xUhgUHkeUCWCaNs", 565 | "name" : "Veronica Maggio", 566 | "type" : "artist", 567 | "uri" : "spotify:artist:2OIWxN9xUhgUHkeUCWCaNs" 568 | } ], 569 | "available_markets" : [ "AR", "AT", "AU", "BE", "BO", "BR", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EC", "EE", "ES", "FI", "FR", "GB", "GR", "GT", "HK", "HN", "HU", "IE", "IS", "IT", "LT", "LU", "LV", "MT", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW" ], 570 | "disc_number" : 1, 571 | "duration_ms" : 209373, 572 | "explicit" : false, 573 | "external_ids" : { 574 | "isrc" : "SEUM71100335" 575 | }, 576 | "external_urls" : { 577 | "spotify" : "https://open.spotify.com/track/5y5tGEVkCJ5kfhmmidqeOO" 578 | }, 579 | "href" : "https://api.spotify.com/v1/tracks/5y5tGEVkCJ5kfhmmidqeOO", 580 | "id" : "5y5tGEVkCJ5kfhmmidqeOO", 581 | "name" : "Alla mina låtar", 582 | "popularity" : 0, 583 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/1a3b63eea60aeaa4f6849f7d8a3fdcc4c315c053", 584 | "track_number" : 7, 585 | "type" : "track", 586 | "uri" : "spotify:track:5y5tGEVkCJ5kfhmmidqeOO" 587 | }, { 588 | "album" : { 589 | "album_type" : "single", 590 | "external_urls" : { 591 | "spotify" : "https://open.spotify.com/album/5CCjGmIH483h4J9UvME0eR" 592 | }, 593 | "href" : "https://api.spotify.com/v1/albums/5CCjGmIH483h4J9UvME0eR", 594 | "id" : "5CCjGmIH483h4J9UvME0eR", 595 | "images" : [ { 596 | "height" : 640, 597 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/743f134a97aa904f90674be6f304db28c8be91f7", 598 | "width" : 640 599 | }, { 600 | "height" : 300, 601 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/09ff1e1144cc297d42acaaa839e0ad422ba7abe5", 602 | "width" : 300 603 | }, { 604 | "height" : 64, 605 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/66d320404c8f56bb7dd0c53da61f794a70a7e07c", 606 | "width" : 64 607 | } ], 608 | "name" : "Lyckliga gatan", 609 | "type" : "album", 610 | "uri" : "spotify:album:5CCjGmIH483h4J9UvME0eR" 611 | }, 612 | "artists" : [ { 613 | "external_urls" : { 614 | "spotify" : "https://open.spotify.com/artist/3Z6WVJzHQ12kzNjhzDkIYP" 615 | }, 616 | "href" : "https://api.spotify.com/v1/artists/3Z6WVJzHQ12kzNjhzDkIYP", 617 | "id" : "3Z6WVJzHQ12kzNjhzDkIYP", 618 | "name" : "Timo Räisänen", 619 | "type" : "artist", 620 | "uri" : "spotify:artist:3Z6WVJzHQ12kzNjhzDkIYP" 621 | } ], 622 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "UY" ], 623 | "disc_number" : 1, 624 | "duration_ms" : 250706, 625 | "explicit" : false, 626 | "external_ids" : { 627 | "isrc" : "SEWBD1300601" 628 | }, 629 | "external_urls" : { 630 | "spotify" : "https://open.spotify.com/track/3od3TT0urEB8HMaFZhaEYW" 631 | }, 632 | "href" : "https://api.spotify.com/v1/tracks/3od3TT0urEB8HMaFZhaEYW", 633 | "id" : "3od3TT0urEB8HMaFZhaEYW", 634 | "name" : "Lyckliga gatan", 635 | "popularity" : 0, 636 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/58588a74fc52944216c92dc460409f651e5ab7a1", 637 | "track_number" : 2, 638 | "type" : "track", 639 | "uri" : "spotify:track:3od3TT0urEB8HMaFZhaEYW" 640 | }, { 641 | "album" : { 642 | "album_type" : "album", 643 | "external_urls" : { 644 | "spotify" : "https://open.spotify.com/album/7cRUwz9QTnGp3O24CUbBWR" 645 | }, 646 | "href" : "https://api.spotify.com/v1/albums/7cRUwz9QTnGp3O24CUbBWR", 647 | "id" : "7cRUwz9QTnGp3O24CUbBWR", 648 | "images" : [ { 649 | "height" : 640, 650 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/97ff6e73fe88595f6ed0c2c6c33742033d5e2b2e", 651 | "width" : 640 652 | }, { 653 | "height" : 300, 654 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/6f3c8351452c6c85fc7a05ff8cf873e7943519d7", 655 | "width" : 300 656 | }, { 657 | "height" : 64, 658 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/2630281478b9c0106038c782d90bfd4586349537", 659 | "width" : 64 660 | } ], 661 | "name" : "Playlist", 662 | "type" : "album", 663 | "uri" : "spotify:album:7cRUwz9QTnGp3O24CUbBWR" 664 | }, 665 | "artists" : [ { 666 | "external_urls" : { 667 | "spotify" : "https://open.spotify.com/artist/2piHSX9fKmsCD8tbfX1cJg" 668 | }, 669 | "href" : "https://api.spotify.com/v1/artists/2piHSX9fKmsCD8tbfX1cJg", 670 | "id" : "2piHSX9fKmsCD8tbfX1cJg", 671 | "name" : "Stress", 672 | "type" : "artist", 673 | "uri" : "spotify:artist:2piHSX9fKmsCD8tbfX1cJg" 674 | }, { 675 | "external_urls" : { 676 | "spotify" : "https://open.spotify.com/artist/58RMTlPJKbmpmVk1AmRK3h" 677 | }, 678 | "href" : "https://api.spotify.com/v1/artists/58RMTlPJKbmpmVk1AmRK3h", 679 | "id" : "58RMTlPJKbmpmVk1AmRK3h", 680 | "name" : "Abidaz", 681 | "type" : "artist", 682 | "uri" : "spotify:artist:58RMTlPJKbmpmVk1AmRK3h" 683 | }, { 684 | "external_urls" : { 685 | "spotify" : "https://open.spotify.com/artist/3Rdai85dloa4pkC3JVuKRW" 686 | }, 687 | "href" : "https://api.spotify.com/v1/artists/3Rdai85dloa4pkC3JVuKRW", 688 | "id" : "3Rdai85dloa4pkC3JVuKRW", 689 | "name" : "Hooks", 690 | "type" : "artist", 691 | "uri" : "spotify:artist:3Rdai85dloa4pkC3JVuKRW" 692 | } ], 693 | "available_markets" : [ "AR", "AT", "BE", "BR", "CH", "CL", "CO", "CY", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GR", "HK", "HU", "IE", "IS", "IT", "LT", "LU", "LV", "MT", "MY", "NL", "NO", "NZ", "PH", "PL", "PT", "RO", "SE", "SG", "SI", "SK", "TR", "TW" ], 694 | "disc_number" : 1, 695 | "duration_ms" : 168720, 696 | "explicit" : false, 697 | "external_ids" : { 698 | "isrc" : "SEUM71100970" 699 | }, 700 | "external_urls" : { 701 | "spotify" : "https://open.spotify.com/track/5GqZe05VEXpzmDrNTc8DDj" 702 | }, 703 | "href" : "https://api.spotify.com/v1/tracks/5GqZe05VEXpzmDrNTc8DDj", 704 | "id" : "5GqZe05VEXpzmDrNTc8DDj", 705 | "name" : "Gatan", 706 | "popularity" : 0, 707 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/d71d1e92346827807bab8979b62e054affa9f2a3", 708 | "track_number" : 2, 709 | "type" : "track", 710 | "uri" : "spotify:track:5GqZe05VEXpzmDrNTc8DDj" 711 | }, { 712 | "album" : { 713 | "album_type" : "album", 714 | "external_urls" : { 715 | "spotify" : "https://open.spotify.com/album/2fOs6I0CgvaZj9agU8EAlH" 716 | }, 717 | "href" : "https://api.spotify.com/v1/albums/2fOs6I0CgvaZj9agU8EAlH", 718 | "id" : "2fOs6I0CgvaZj9agU8EAlH", 719 | "images" : [ { 720 | "height" : 640, 721 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/cad98ee963d47be0d1daad7038a1d783403d474c", 722 | "width" : 640 723 | }, { 724 | "height" : 300, 725 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/eefdfc1e9043005b0e5a662faafb7bd879ca4c5d", 726 | "width" : 300 727 | }, { 728 | "height" : 64, 729 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/863cea2cbe59afd1f5dedf1fc84cd48e40e3c363", 730 | "width" : 64 731 | } ], 732 | "name" : "Satan i gatan (Bonus Version)", 733 | "type" : "album", 734 | "uri" : "spotify:album:2fOs6I0CgvaZj9agU8EAlH" 735 | }, 736 | "artists" : [ { 737 | "external_urls" : { 738 | "spotify" : "https://open.spotify.com/artist/2OIWxN9xUhgUHkeUCWCaNs" 739 | }, 740 | "href" : "https://api.spotify.com/v1/artists/2OIWxN9xUhgUHkeUCWCaNs", 741 | "id" : "2OIWxN9xUhgUHkeUCWCaNs", 742 | "name" : "Veronica Maggio", 743 | "type" : "artist", 744 | "uri" : "spotify:artist:2OIWxN9xUhgUHkeUCWCaNs" 745 | } ], 746 | "available_markets" : [ "AR", "AT", "AU", "BE", "BO", "BR", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EC", "EE", "ES", "FI", "FR", "GB", "GR", "GT", "HK", "HN", "HU", "IE", "IS", "IT", "LT", "LU", "LV", "MT", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW" ], 747 | "disc_number" : 1, 748 | "duration_ms" : 69546, 749 | "explicit" : false, 750 | "external_ids" : { 751 | "isrc" : "SEUM71100338" 752 | }, 753 | "external_urls" : { 754 | "spotify" : "https://open.spotify.com/track/2M7n1hYkKiogvl5SSPx5Fp" 755 | }, 756 | "href" : "https://api.spotify.com/v1/tracks/2M7n1hYkKiogvl5SSPx5Fp", 757 | "id" : "2M7n1hYkKiogvl5SSPx5Fp", 758 | "name" : "Lördagen den femtonde mars", 759 | "popularity" : 0, 760 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/6f42fc871e2de16cc516945330035865c54e3e3d", 761 | "track_number" : 11, 762 | "type" : "track", 763 | "uri" : "spotify:track:2M7n1hYkKiogvl5SSPx5Fp" 764 | }, { 765 | "album" : { 766 | "album_type" : "album", 767 | "external_urls" : { 768 | "spotify" : "https://open.spotify.com/album/2fOs6I0CgvaZj9agU8EAlH" 769 | }, 770 | "href" : "https://api.spotify.com/v1/albums/2fOs6I0CgvaZj9agU8EAlH", 771 | "id" : "2fOs6I0CgvaZj9agU8EAlH", 772 | "images" : [ { 773 | "height" : 640, 774 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/cad98ee963d47be0d1daad7038a1d783403d474c", 775 | "width" : 640 776 | }, { 777 | "height" : 300, 778 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/eefdfc1e9043005b0e5a662faafb7bd879ca4c5d", 779 | "width" : 300 780 | }, { 781 | "height" : 64, 782 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/863cea2cbe59afd1f5dedf1fc84cd48e40e3c363", 783 | "width" : 64 784 | } ], 785 | "name" : "Satan i gatan (Bonus Version)", 786 | "type" : "album", 787 | "uri" : "spotify:album:2fOs6I0CgvaZj9agU8EAlH" 788 | }, 789 | "artists" : [ { 790 | "external_urls" : { 791 | "spotify" : "https://open.spotify.com/artist/2OIWxN9xUhgUHkeUCWCaNs" 792 | }, 793 | "href" : "https://api.spotify.com/v1/artists/2OIWxN9xUhgUHkeUCWCaNs", 794 | "id" : "2OIWxN9xUhgUHkeUCWCaNs", 795 | "name" : "Veronica Maggio", 796 | "type" : "artist", 797 | "uri" : "spotify:artist:2OIWxN9xUhgUHkeUCWCaNs" 798 | } ], 799 | "available_markets" : [ "AR", "AT", "AU", "BE", "BO", "BR", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EC", "EE", "ES", "FI", "FR", "GB", "GR", "GT", "HK", "HN", "HU", "IE", "IS", "IT", "LT", "LU", "LV", "MT", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW" ], 800 | "disc_number" : 1, 801 | "duration_ms" : 255133, 802 | "explicit" : false, 803 | "external_ids" : { 804 | "isrc" : "SEUM71100342" 805 | }, 806 | "external_urls" : { 807 | "spotify" : "https://open.spotify.com/track/10ZWJBj5Q1xqkMZw4hOeQj" 808 | }, 809 | "href" : "https://api.spotify.com/v1/tracks/10ZWJBj5Q1xqkMZw4hOeQj", 810 | "id" : "10ZWJBj5Q1xqkMZw4hOeQj", 811 | "name" : "Vad gör vi ikväll", 812 | "popularity" : 0, 813 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/5da28efde1fe034aba999b204f87d0df2b0056ee", 814 | "track_number" : 12, 815 | "type" : "track", 816 | "uri" : "spotify:track:10ZWJBj5Q1xqkMZw4hOeQj" 817 | }, { 818 | "album" : { 819 | "album_type" : "album", 820 | "external_urls" : { 821 | "spotify" : "https://open.spotify.com/album/5hohD1aliQAULZGK51FOMm" 822 | }, 823 | "href" : "https://api.spotify.com/v1/albums/5hohD1aliQAULZGK51FOMm", 824 | "id" : "5hohD1aliQAULZGK51FOMm", 825 | "images" : [ { 826 | "height" : 640, 827 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/08f5e2822ec747b7f78458a6549c585d2230c159", 828 | "width" : 640 829 | }, { 830 | "height" : 300, 831 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/e2776f50d395ca7d3a4d26bca1ea2cddd9096e20", 832 | "width" : 300 833 | }, { 834 | "height" : 64, 835 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/1edc7711c64661bf717866eb9686297bd6d5ac12", 836 | "width" : 64 837 | } ], 838 | "name" : "Snackbar Blues", 839 | "type" : "album", 840 | "uri" : "spotify:album:5hohD1aliQAULZGK51FOMm" 841 | }, 842 | "artists" : [ { 843 | "external_urls" : { 844 | "spotify" : "https://open.spotify.com/artist/3wh2bJMFjWyZA6mHNVxkVa" 845 | }, 846 | "href" : "https://api.spotify.com/v1/artists/3wh2bJMFjWyZA6mHNVxkVa", 847 | "id" : "3wh2bJMFjWyZA6mHNVxkVa", 848 | "name" : "Nisse Hellberg", 849 | "type" : "artist", 850 | "uri" : "spotify:artist:3wh2bJMFjWyZA6mHNVxkVa" 851 | } ], 852 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "US", "UY" ], 853 | "disc_number" : 1, 854 | "duration_ms" : 197360, 855 | "explicit" : false, 856 | "external_ids" : { 857 | "isrc" : "SEACA0601208" 858 | }, 859 | "external_urls" : { 860 | "spotify" : "https://open.spotify.com/track/3pEr1rOrfLha8gkEwpBbTS" 861 | }, 862 | "href" : "https://api.spotify.com/v1/tracks/3pEr1rOrfLha8gkEwpBbTS", 863 | "id" : "3pEr1rOrfLha8gkEwpBbTS", 864 | "name" : "Lyckliga gatan", 865 | "popularity" : 0, 866 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/8e4143a0e43703ceae435e0f41f6a2786250d187", 867 | "track_number" : 8, 868 | "type" : "track", 869 | "uri" : "spotify:track:3pEr1rOrfLha8gkEwpBbTS" 870 | }, { 871 | "album" : { 872 | "album_type" : "album", 873 | "external_urls" : { 874 | "spotify" : "https://open.spotify.com/album/3gT2XxigE6Vx9cVMM0m3G3" 875 | }, 876 | "href" : "https://api.spotify.com/v1/albums/3gT2XxigE6Vx9cVMM0m3G3", 877 | "id" : "3gT2XxigE6Vx9cVMM0m3G3", 878 | "images" : [ { 879 | "height" : 640, 880 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/ba947fefae94a5d0a8680d99de2ecde29c3bcc04", 881 | "width" : 640 882 | }, { 883 | "height" : 300, 884 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/fb98904e7cb0f8920ab91bcb57aa09dcf7cf794e", 885 | "width" : 300 886 | }, { 887 | "height" : 64, 888 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/8de6c0fbe575f79e232536f60311d82923216283", 889 | "width" : 64 890 | } ], 891 | "name" : "Underhållningsmaskinen", 892 | "type" : "album", 893 | "uri" : "spotify:album:3gT2XxigE6Vx9cVMM0m3G3" 894 | }, 895 | "artists" : [ { 896 | "external_urls" : { 897 | "spotify" : "https://open.spotify.com/artist/6jMfbm9y64CESMB5wFtgZx" 898 | }, 899 | "href" : "https://api.spotify.com/v1/artists/6jMfbm9y64CESMB5wFtgZx", 900 | "id" : "6jMfbm9y64CESMB5wFtgZx", 901 | "name" : "Governor Andy", 902 | "type" : "artist", 903 | "uri" : "spotify:artist:6jMfbm9y64CESMB5wFtgZx" 904 | } ], 905 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "US", "UY" ], 906 | "disc_number" : 1, 907 | "duration_ms" : 220480, 908 | "explicit" : false, 909 | "external_ids" : { 910 | "isrc" : "SEXKB0700304" 911 | }, 912 | "external_urls" : { 913 | "spotify" : "https://open.spotify.com/track/3qOCMkCrsQBczAvvuYoJG3" 914 | }, 915 | "href" : "https://api.spotify.com/v1/tracks/3qOCMkCrsQBczAvvuYoJG3", 916 | "id" : "3qOCMkCrsQBczAvvuYoJG3", 917 | "name" : "Lyckliga Gatan (med Loreen)", 918 | "popularity" : 0, 919 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/d8365069ae73214187e0c57773842e7078c572ed", 920 | "track_number" : 4, 921 | "type" : "track", 922 | "uri" : "spotify:track:3qOCMkCrsQBczAvvuYoJG3" 923 | }, { 924 | "album" : { 925 | "album_type" : "album", 926 | "external_urls" : { 927 | "spotify" : "https://open.spotify.com/album/7nF98uB6IS69BjKAmd8rtU" 928 | }, 929 | "href" : "https://api.spotify.com/v1/albums/7nF98uB6IS69BjKAmd8rtU", 930 | "id" : "7nF98uB6IS69BjKAmd8rtU", 931 | "images" : [ { 932 | "height" : 637, 933 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/099dea86989a7c05a5c59d67a0b5fdc659dd5529", 934 | "width" : 640 935 | }, { 936 | "height" : 299, 937 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/bfdc8850ac2091cfc9b1e5c5eff1a7e4383d47db", 938 | "width" : 300 939 | }, { 940 | "height" : 64, 941 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/39592b2203284e00e36eba8370d53c9497dc7fb6", 942 | "width" : 64 943 | } ], 944 | "name" : "Guldkorn", 945 | "type" : "album", 946 | "uri" : "spotify:album:7nF98uB6IS69BjKAmd8rtU" 947 | }, 948 | "artists" : [ { 949 | "external_urls" : { 950 | "spotify" : "https://open.spotify.com/artist/7JHMKzBLaE2q2gaZZsepqr" 951 | }, 952 | "href" : "https://api.spotify.com/v1/artists/7JHMKzBLaE2q2gaZZsepqr", 953 | "id" : "7JHMKzBLaE2q2gaZZsepqr", 954 | "name" : "Anna-Lena Löfgren", 955 | "type" : "artist", 956 | "uri" : "spotify:artist:7JHMKzBLaE2q2gaZZsepqr" 957 | } ], 958 | "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", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MX", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW", "UY" ], 959 | "disc_number" : 1, 960 | "duration_ms" : 215626, 961 | "explicit" : false, 962 | "external_ids" : { 963 | "isrc" : "SEPQB6710020" 964 | }, 965 | "external_urls" : { 966 | "spotify" : "https://open.spotify.com/track/6VKhjanHmI88gbeAJfGBns" 967 | }, 968 | "href" : "https://api.spotify.com/v1/tracks/6VKhjanHmI88gbeAJfGBns", 969 | "id" : "6VKhjanHmI88gbeAJfGBns", 970 | "name" : "Lyckliga gatan", 971 | "popularity" : 0, 972 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/c0b277daf20e3bb24d5dd22c0f9f41571e27f578", 973 | "track_number" : 1, 974 | "type" : "track", 975 | "uri" : "spotify:track:6VKhjanHmI88gbeAJfGBns" 976 | }, { 977 | "album" : { 978 | "album_type" : "single", 979 | "external_urls" : { 980 | "spotify" : "https://open.spotify.com/album/38FYkaPius8Wt9iV1eeojZ" 981 | }, 982 | "href" : "https://api.spotify.com/v1/albums/38FYkaPius8Wt9iV1eeojZ", 983 | "id" : "38FYkaPius8Wt9iV1eeojZ", 984 | "images" : [ { 985 | "height" : 640, 986 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/a1426b8b4ba635fafad8f9202572e8a742d3cfeb", 987 | "width" : 640 988 | }, { 989 | "height" : 300, 990 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/c68e5b2855a9221bec65f749cca2858408077f49", 991 | "width" : 300 992 | }, { 993 | "height" : 64, 994 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/488ce0dbd5ce569bc129900ef96540718246fc18", 995 | "width" : 64 996 | } ], 997 | "name" : "Tolkningarna", 998 | "type" : "album", 999 | "uri" : "spotify:album:38FYkaPius8Wt9iV1eeojZ" 1000 | }, 1001 | "artists" : [ { 1002 | "external_urls" : { 1003 | "spotify" : "https://open.spotify.com/artist/62QZPjYQMoo5g56FP9Webq" 1004 | }, 1005 | "href" : "https://api.spotify.com/v1/artists/62QZPjYQMoo5g56FP9Webq", 1006 | "id" : "62QZPjYQMoo5g56FP9Webq", 1007 | "name" : "Laleh", 1008 | "type" : "artist", 1009 | "uri" : "spotify:artist:62QZPjYQMoo5g56FP9Webq" 1010 | } ], 1011 | "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", "RO", "SE", "SI", "SK", "TR" ], 1012 | "disc_number" : 1, 1013 | "duration_ms" : 172026, 1014 | "explicit" : false, 1015 | "external_ids" : { 1016 | "isrc" : "SEPQA1101257" 1017 | }, 1018 | "external_urls" : { 1019 | "spotify" : "https://open.spotify.com/track/38zrpSjlDXUv33vcF1MUPf" 1020 | }, 1021 | "href" : "https://api.spotify.com/v1/tracks/38zrpSjlDXUv33vcF1MUPf", 1022 | "id" : "38zrpSjlDXUv33vcF1MUPf", 1023 | "name" : "På gatan där jag bor", 1024 | "popularity" : 0, 1025 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/2f1709c3f64729c8a17155927735baceacf1958b", 1026 | "track_number" : 1, 1027 | "type" : "track", 1028 | "uri" : "spotify:track:38zrpSjlDXUv33vcF1MUPf" 1029 | }, { 1030 | "album" : { 1031 | "album_type" : "album", 1032 | "external_urls" : { 1033 | "spotify" : "https://open.spotify.com/album/78DiHcKu01sdNkrX8ipT2t" 1034 | }, 1035 | "href" : "https://api.spotify.com/v1/albums/78DiHcKu01sdNkrX8ipT2t", 1036 | "id" : "78DiHcKu01sdNkrX8ipT2t", 1037 | "images" : [ { 1038 | "height" : 640, 1039 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/31c456d929910d51091c43c4eee88b97104dd876", 1040 | "width" : 640 1041 | }, { 1042 | "height" : 300, 1043 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/1254a523f805d940514f6f54e3303b90201476d2", 1044 | "width" : 300 1045 | }, { 1046 | "height" : 64, 1047 | "url" : "https://d3rt1990lpmkn.cloudfront.net/original/04979c2492b94f8d0c38ce5fe0014f06d3efcb4c", 1048 | "width" : 64 1049 | } ], 1050 | "name" : "Boys II Men", 1051 | "type" : "album", 1052 | "uri" : "spotify:album:78DiHcKu01sdNkrX8ipT2t" 1053 | }, 1054 | "artists" : [ { 1055 | "external_urls" : { 1056 | "spotify" : "https://open.spotify.com/artist/6nDcZd5c9z3OS5hWvCsWBf" 1057 | }, 1058 | "href" : "https://api.spotify.com/v1/artists/6nDcZd5c9z3OS5hWvCsWBf", 1059 | "id" : "6nDcZd5c9z3OS5hWvCsWBf", 1060 | "name" : "Maskinen", 1061 | "type" : "artist", 1062 | "uri" : "spotify:artist:6nDcZd5c9z3OS5hWvCsWBf" 1063 | } ], 1064 | "available_markets" : [ "AD", "AR", "AT", "AU", "BE", "BG", "BO", "BR", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EC", "EE", "ES", "FI", "GB", "GR", "GT", "HK", "HN", "HU", "IE", "IS", "IT", "LI", "LT", "LU", "LV", "MC", "MT", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "RO", "SE", "SG", "SI", "SK", "SV", "TR", "TW" ], 1065 | "disc_number" : 1, 1066 | "duration_ms" : 398960, 1067 | "explicit" : false, 1068 | "external_ids" : { 1069 | "isrc" : "SEVLE0901405" 1070 | }, 1071 | "external_urls" : { 1072 | "spotify" : "https://open.spotify.com/track/1qzDC1IRNnF8mXe846CUUP" 1073 | }, 1074 | "href" : "https://api.spotify.com/v1/tracks/1qzDC1IRNnF8mXe846CUUP", 1075 | "id" : "1qzDC1IRNnF8mXe846CUUP", 1076 | "name" : "Gatan Upp", 1077 | "popularity" : 0, 1078 | "preview_url" : "http://d318706lgtcm8e.cloudfront.net/mp3-preview/bbf816d8dba92546b9fb6b50ed3ad3c0b4f5b31a", 1079 | "track_number" : 5, 1080 | "type" : "track", 1081 | "uri" : "spotify:track:1qzDC1IRNnF8mXe846CUUP" 1082 | } ], 1083 | "limit" : 20, 1084 | "next" : "https://api.spotify.com/v1/search?query=gatan&offset=20&limit=20&type=track", 1085 | "offset" : 0, 1086 | "previous" : null, 1087 | "total" : 259 1088 | } 1089 | } 1090 | --------------------------------------------------------------------------------