radavis_last_fm 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e9ccaf2fcd78193931bba8676b63d4ede5ca5aac
4
+ data.tar.gz: df13a51f48de3929b009542b690619094ab71d04
5
+ SHA512:
6
+ metadata.gz: d8d6cf85e7b97b51584b0bcfa7bf4e0d60c56a237245c14fb135edec6ece3257e6b9feca2c4d6319cc82bb6d3840cb11e259f372195252198b6bbf8f6ad0c7a3
7
+ data.tar.gz: a3c29fec54a516348463a4d6ce0c47917824be4e043c7a5e0bc62ce4dc14eeb0f70484ba109b0bf203f55333a0929058fba2c1468ea6e1a421daefd602fe1635
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in last_fm.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Richard Davis
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,21 @@
1
+ # LastFm
2
+
3
+ Uses the Last.fm API to retrieve information for Artists and Albums
4
+
5
+ ## Usage
6
+
7
+ artist = LastFM::Artist.search('Nirvana').first
8
+ artist.name # 'Nirvana'
9
+ artist.image # 'http://userserve-ak.last.fm/serve/126s/416571.jpg'
10
+
11
+ album = LastRubyFm::Album.search('Purple')[1]
12
+ album.artist # 'Stone Temple Pilots'
13
+ album.tracks # retrieves a list of LastRubyFm::Track objects for the given album
14
+
15
+ ## Contributing
16
+
17
+ 1. Fork it
18
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
19
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
20
+ 4. Push to the branch (`git push origin my-new-feature`)
21
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ #require "bundler/gem_tasks"
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
data/last_fm.gemspec ADDED
@@ -0,0 +1,30 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'last_fm/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "radavis_last_fm"
8
+ spec.version = LastFM::VERSION
9
+ spec.authors = ["Richard Davis"]
10
+ spec.email = ["rdavis.bacs@gmail.com"]
11
+ spec.description = %q{API Wrapper for last.fm}
12
+ spec.summary = %q{An API Wrapper for last.fm using Faraday, VCR, and RSpec}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "faraday"
22
+ spec.add_dependency "multi_json"
23
+
24
+ #spec.add_development_dependency "bundler", "~> 1.3"
25
+ spec.add_development_dependency "rake"
26
+ spec.add_development_dependency "rspec"
27
+ spec.add_development_dependency "webmock"
28
+ spec.add_development_dependency "vcr"
29
+ spec.add_development_dependency "pry"
30
+ end
data/lib/last_fm.rb ADDED
@@ -0,0 +1,19 @@
1
+ require 'faraday'
2
+ require 'json'
3
+
4
+ require "last_fm/version"
5
+ require "last_fm/query"
6
+ require "last_fm/result"
7
+ require "last_fm/artist"
8
+ require "last_fm/album"
9
+ require "last_fm/track"
10
+
11
+ module LastFM
12
+ def self.api_key=(key)
13
+ @api_key = key
14
+ end
15
+
16
+ def self.api_key
17
+ @api_key
18
+ end
19
+ end
@@ -0,0 +1,29 @@
1
+ module LastFM
2
+ class Album < Result
3
+ attr_reader :mbid, :released, :tracks
4
+
5
+ def initialize(attributes)
6
+ super(attributes)
7
+
8
+ @mbid = attributes['mbid'] if attributes['mbid']
9
+ @released = attributes['releasedate'] if attributes['releasedate']
10
+
11
+ @tracks = []
12
+ if attributes['tracks']
13
+ attributes['tracks']['track'].each do |track|
14
+ @tracks << Track.new(track['name'], track['duration'], track['mbid'], track['url'])
15
+ end
16
+ end
17
+ end
18
+
19
+ class << self
20
+ def search(album)
21
+ Query.search({ method: 'album.search', album: album })
22
+ end
23
+
24
+ def get_info(artist, album)
25
+ Query.get_info({ method: 'album.getInfo', artist: artist, album: album })
26
+ end
27
+ end # class << self
28
+ end # class Album
29
+ end # module LastFM
@@ -0,0 +1,9 @@
1
+ module LastFM
2
+ class Artist < Result
3
+ class << self
4
+ def search(artist)
5
+ Query.search({ method: 'artist.search', artist: artist })
6
+ end
7
+ end # class << self
8
+ end # class Artist
9
+ end # module LastFM
@@ -0,0 +1,47 @@
1
+ module LastFM
2
+ class Query
3
+ class << self
4
+ def retrieve_from_api(args={})
5
+ response = connection.get('/2.0/', {
6
+ api_key: LastFM.api_key,
7
+ format: 'json'
8
+ }.merge(args))
9
+
10
+ parsed_results = JSON.parse(response.body)
11
+ end
12
+
13
+ def search(args={})
14
+ type = args[:method].split('.').first.downcase
15
+ parsed_results = retrieve_from_api(args)
16
+ type_matches = type + 'matches'
17
+
18
+ if parsed_results['results'] && parsed_results['results'][type_matches]
19
+ parsed_results['results'][type_matches][type].map do |attributes|
20
+ LastFM.const_get(type.capitalize).new(attributes)
21
+ end
22
+ else
23
+ []
24
+ end
25
+ end
26
+
27
+ # Query.get_info('album.get_info', artist, album)
28
+ def get_info(args={})
29
+ parsed_results = retrieve_from_api(args)
30
+ if parsed_results['album']
31
+ Album.new(parsed_results['album'])
32
+ else
33
+ nil
34
+ end
35
+ end
36
+
37
+ protected
38
+ def connection
39
+ conn ||= Faraday.new(url: 'http://ws.audioscrobbler.com') do |faraday|
40
+ faraday.request :url_encoded
41
+ faraday.adapter Faraday.default_adapter
42
+ end
43
+ end
44
+
45
+ end # class << self
46
+ end # class Query
47
+ end # module LastFM
@@ -0,0 +1,17 @@
1
+ module LastFM
2
+ class Result
3
+ attr_reader :id, :url, :name, :image, :images
4
+
5
+ def initialize(attributes)
6
+ @id = attributes['id']
7
+ @url = attributes['url']
8
+ @name = attributes['name']
9
+
10
+ @images = {}
11
+ attributes['image'].each do |image|
12
+ @images[image['size'].to_sym] = image['#text']
13
+ end
14
+ @image = @images[:large]
15
+ end
16
+ end # class Result
17
+ end # module LastFM
@@ -0,0 +1,12 @@
1
+ module LastFM
2
+ class Track
3
+ attr_reader :name, :duration, :mbid, :url
4
+
5
+ def initialize(name, duration, mbid, url)
6
+ @name = name
7
+ @duration = duration
8
+ @mbid = mbid
9
+ @url = url
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,3 @@
1
+ module LastFM
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,101 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ws.audioscrobbler.com/2.0/?album=Copper%20Blue&api_key=<LASTFM API
6
+ KEY>&artist=Sugar&format=json&method=album.get_info
7
+ body:
8
+ encoding: US-ASCII
9
+ string: ''
10
+ headers:
11
+ User-Agent:
12
+ - Faraday v0.8.8
13
+ Accept-Encoding:
14
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
15
+ Accept:
16
+ - '*/*'
17
+ response:
18
+ status:
19
+ code: 200
20
+ message: OK
21
+ headers:
22
+ Date:
23
+ - Tue, 15 Oct 2013 01:01:08 GMT
24
+ Server:
25
+ - Apache/2.2.22 (Unix)
26
+ X-Web-Node:
27
+ - www220
28
+ Access-Control-Allow-Origin:
29
+ - '*'
30
+ Access-Control-Allow-Methods:
31
+ - POST, GET, OPTIONS
32
+ Access-Control-Max-Age:
33
+ - '86400'
34
+ Cache-Control:
35
+ - max-age=10
36
+ Expires:
37
+ - Tue, 15 Oct 2013 01:01:18 GMT
38
+ Vary:
39
+ - Accept-Encoding
40
+ Content-Length:
41
+ - '112'
42
+ Connection:
43
+ - close
44
+ Content-Type:
45
+ - application/json; charset=utf-8;
46
+ body:
47
+ encoding: UTF-8
48
+ string: |
49
+ {"error":3,"message":"Invalid Method - No method with that name in this package","links":[]}
50
+ http_version:
51
+ recorded_at: Tue, 15 Oct 2013 01:01:08 GMT
52
+ - request:
53
+ method: get
54
+ uri: http://ws.audioscrobbler.com/2.0/?album=Copper%20Blue&api_key=<LASTFM API
55
+ KEY>&artist=Sugar&format=json&method=album.getInfo
56
+ body:
57
+ encoding: US-ASCII
58
+ string: ''
59
+ headers:
60
+ User-Agent:
61
+ - Faraday v0.8.8
62
+ Accept-Encoding:
63
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
64
+ Accept:
65
+ - '*/*'
66
+ response:
67
+ status:
68
+ code: 200
69
+ message: OK
70
+ headers:
71
+ Date:
72
+ - Tue, 15 Oct 2013 01:01:58 GMT
73
+ Server:
74
+ - Apache/2.2.22 (Unix)
75
+ X-Web-Node:
76
+ - www198
77
+ Access-Control-Allow-Origin:
78
+ - '*'
79
+ Access-Control-Allow-Methods:
80
+ - POST, GET, OPTIONS
81
+ Access-Control-Max-Age:
82
+ - '86400'
83
+ Cache-Control:
84
+ - max-age=86400
85
+ Expires:
86
+ - Wed, 16 Oct 2013 01:01:58 GMT
87
+ Vary:
88
+ - Accept-Encoding
89
+ Content-Length:
90
+ - '1047'
91
+ Connection:
92
+ - close
93
+ Content-Type:
94
+ - application/json; charset=utf-8;
95
+ body:
96
+ encoding: UTF-8
97
+ string: |
98
+ {"album":{"name":"Copper Blue","artist":"Sugar","id":"2032496","mbid":"b68bd93e-0b34-41b8-8e63-540836e863f0","url":"http:\/\/www.last.fm\/music\/Sugar\/Copper+Blue","releasedate":" 28 May 2012, 00:00","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/83507623.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/83507623.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/174s\/83507623.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/83507623.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/83507623\/Copper+Blue.jpg","size":"mega"}],"listeners":"52875","playcount":"563971","tracks":{"track":[{"name":"The Act We Act","duration":"310","mbid":"01101516-1791-4bc5-aae7-5a071ca6584c","url":"http:\/\/www.last.fm\/music\/Sugar\/_\/The+Act+We+Act","streamable":{"#text":"0","fulltrack":"0"},"artist":{"name":"Sugar","mbid":"2ccd1ad2-c6d4-4c40-9849-717a1a8cc3b1","url":"http:\/\/www.last.fm\/music\/Sugar"},"@attr":{"rank":"1"}},{"name":"A Good Idea","duration":"228","mbid":"3ed8665f-2b77-409b-9a74-0a95d95e6a5d","url":"http:\/\/www.last.fm\/music\/Sugar\/_\/A+Good+Idea","streamable":{"#text":"0","fulltrack":"0"},"artist":{"name":"Sugar","mbid":"2ccd1ad2-c6d4-4c40-9849-717a1a8cc3b1","url":"http:\/\/www.last.fm\/music\/Sugar"},"@attr":{"rank":"2"}},{"name":"Changes","duration":"301","mbid":"8222cdf3-91e8-46f2-a459-ec73d6ddeb09","url":"http:\/\/www.last.fm\/music\/Sugar\/_\/Changes","streamable":{"#text":"0","fulltrack":"0"},"artist":{"name":"Sugar","mbid":"2ccd1ad2-c6d4-4c40-9849-717a1a8cc3b1","url":"http:\/\/www.last.fm\/music\/Sugar"},"@attr":{"rank":"3"}},{"name":"Helpless","duration":"185","mbid":"0b5b7892-8fa6-4bda-8e36-92079545f6d4","url":"http:\/\/www.last.fm\/music\/Sugar\/_\/Helpless","streamable":{"#text":"0","fulltrack":"0"},"artist":{"name":"Sugar","mbid":"2ccd1ad2-c6d4-4c40-9849-717a1a8cc3b1","url":"http:\/\/www.last.fm\/music\/Sugar"},"@attr":{"rank":"4"}},{"name":"Hoover Dam","duration":"328","mbid":"064df455-c0a7-44ac-8dd0-8ec63112e6e5","url":"http:\/\/www.last.fm\/music\/Sugar\/_\/Hoover+Dam","streamable":{"#text":"0","fulltrack":"0"},"artist":{"name":"Sugar","mbid":"2ccd1ad2-c6d4-4c40-9849-717a1a8cc3b1","url":"http:\/\/www.last.fm\/music\/Sugar"},"@attr":{"rank":"5"}},{"name":"The Slim","duration":"314","mbid":"05a9c2e1-b4ed-4581-b69e-52f0ebc38215","url":"http:\/\/www.last.fm\/music\/Sugar\/_\/The+Slim","streamable":{"#text":"0","fulltrack":"0"},"artist":{"name":"Sugar","mbid":"2ccd1ad2-c6d4-4c40-9849-717a1a8cc3b1","url":"http:\/\/www.last.fm\/music\/Sugar"},"@attr":{"rank":"6"}},{"name":"If I Can't Change Your Mind","duration":"199","mbid":"0e889797-6bdb-4562-94e4-5970c7efba68","url":"http:\/\/www.last.fm\/music\/Sugar\/_\/If+I+Can%27t+Change+Your+Mind","streamable":{"#text":"0","fulltrack":"0"},"artist":{"name":"Sugar","mbid":"2ccd1ad2-c6d4-4c40-9849-717a1a8cc3b1","url":"http:\/\/www.last.fm\/music\/Sugar"},"@attr":{"rank":"7"}},{"name":"Fortune Teller","duration":"268","mbid":"0df82822-0a6b-4c28-a013-9b8a93fad197","url":"http:\/\/www.last.fm\/music\/Sugar\/_\/Fortune+Teller","streamable":{"#text":"0","fulltrack":"0"},"artist":{"name":"Sugar","mbid":"2ccd1ad2-c6d4-4c40-9849-717a1a8cc3b1","url":"http:\/\/www.last.fm\/music\/Sugar"},"@attr":{"rank":"8"}},{"name":"Slick","duration":"299","mbid":"01921298-8e5d-4567-a83a-7a5ad14b0595","url":"http:\/\/www.last.fm\/music\/Sugar\/_\/Slick","streamable":{"#text":"0","fulltrack":"0"},"artist":{"name":"Sugar","mbid":"2ccd1ad2-c6d4-4c40-9849-717a1a8cc3b1","url":"http:\/\/www.last.fm\/music\/Sugar"},"@attr":{"rank":"9"}},{"name":"Man on the Moon","duration":"282","mbid":"5e45024b-1560-4029-82bd-e624f3fd3df3","url":"http:\/\/www.last.fm\/music\/Sugar\/_\/Man+on+the+Moon","streamable":{"#text":"0","fulltrack":"0"},"artist":{"name":"Sugar","mbid":"2ccd1ad2-c6d4-4c40-9849-717a1a8cc3b1","url":"http:\/\/www.last.fm\/music\/Sugar"},"@attr":{"rank":"10"}}]},"toptags":{"tag":[{"name":"1992","url":"http:\/\/www.last.fm\/tag\/1992"},{"name":"albums i own","url":"http:\/\/www.last.fm\/tag\/albums%20i%20own"},{"name":"90s","url":"http:\/\/www.last.fm\/tag\/90s"},{"name":"alternative rock","url":"http:\/\/www.last.fm\/tag\/alternative%20rock"},{"name":"favorite albums","url":"http:\/\/www.last.fm\/tag\/favorite%20albums"}]}}}
99
+ http_version:
100
+ recorded_at: Tue, 15 Oct 2013 01:01:58 GMT
101
+ recorded_with: VCR 2.6.0
@@ -0,0 +1,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ws.audioscrobbler.com/2.0/?album=Copper%20Blue&api_key=<LASTFM API
6
+ KEY>&artist=Sugar&format=json&method=album.getInfo
7
+ body:
8
+ encoding: US-ASCII
9
+ string: ''
10
+ headers:
11
+ User-Agent:
12
+ - Faraday v0.8.8
13
+ Accept-Encoding:
14
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
15
+ Accept:
16
+ - '*/*'
17
+ response:
18
+ status:
19
+ code: 200
20
+ message: OK
21
+ headers:
22
+ Date:
23
+ - Tue, 15 Oct 2013 01:03:46 GMT
24
+ Server:
25
+ - Apache/2.2.22 (Unix)
26
+ X-Web-Node:
27
+ - www235
28
+ Access-Control-Allow-Origin:
29
+ - '*'
30
+ Access-Control-Allow-Methods:
31
+ - POST, GET, OPTIONS
32
+ Access-Control-Max-Age:
33
+ - '86400'
34
+ Cache-Control:
35
+ - max-age=86400
36
+ Expires:
37
+ - Wed, 16 Oct 2013 01:03:46 GMT
38
+ Vary:
39
+ - Accept-Encoding
40
+ Content-Length:
41
+ - '1047'
42
+ Connection:
43
+ - close
44
+ Content-Type:
45
+ - application/json; charset=utf-8;
46
+ body:
47
+ encoding: UTF-8
48
+ string: |
49
+ {"album":{"name":"Copper Blue","artist":"Sugar","id":"2032496","mbid":"b68bd93e-0b34-41b8-8e63-540836e863f0","url":"http:\/\/www.last.fm\/music\/Sugar\/Copper+Blue","releasedate":" 28 May 2012, 00:00","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/83507623.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/83507623.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/174s\/83507623.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/83507623.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/83507623\/Copper+Blue.jpg","size":"mega"}],"listeners":"52875","playcount":"563971","tracks":{"track":[{"name":"The Act We Act","duration":"310","mbid":"01101516-1791-4bc5-aae7-5a071ca6584c","url":"http:\/\/www.last.fm\/music\/Sugar\/_\/The+Act+We+Act","streamable":{"#text":"0","fulltrack":"0"},"artist":{"name":"Sugar","mbid":"2ccd1ad2-c6d4-4c40-9849-717a1a8cc3b1","url":"http:\/\/www.last.fm\/music\/Sugar"},"@attr":{"rank":"1"}},{"name":"A Good Idea","duration":"228","mbid":"3ed8665f-2b77-409b-9a74-0a95d95e6a5d","url":"http:\/\/www.last.fm\/music\/Sugar\/_\/A+Good+Idea","streamable":{"#text":"0","fulltrack":"0"},"artist":{"name":"Sugar","mbid":"2ccd1ad2-c6d4-4c40-9849-717a1a8cc3b1","url":"http:\/\/www.last.fm\/music\/Sugar"},"@attr":{"rank":"2"}},{"name":"Changes","duration":"301","mbid":"8222cdf3-91e8-46f2-a459-ec73d6ddeb09","url":"http:\/\/www.last.fm\/music\/Sugar\/_\/Changes","streamable":{"#text":"0","fulltrack":"0"},"artist":{"name":"Sugar","mbid":"2ccd1ad2-c6d4-4c40-9849-717a1a8cc3b1","url":"http:\/\/www.last.fm\/music\/Sugar"},"@attr":{"rank":"3"}},{"name":"Helpless","duration":"185","mbid":"0b5b7892-8fa6-4bda-8e36-92079545f6d4","url":"http:\/\/www.last.fm\/music\/Sugar\/_\/Helpless","streamable":{"#text":"0","fulltrack":"0"},"artist":{"name":"Sugar","mbid":"2ccd1ad2-c6d4-4c40-9849-717a1a8cc3b1","url":"http:\/\/www.last.fm\/music\/Sugar"},"@attr":{"rank":"4"}},{"name":"Hoover Dam","duration":"328","mbid":"064df455-c0a7-44ac-8dd0-8ec63112e6e5","url":"http:\/\/www.last.fm\/music\/Sugar\/_\/Hoover+Dam","streamable":{"#text":"0","fulltrack":"0"},"artist":{"name":"Sugar","mbid":"2ccd1ad2-c6d4-4c40-9849-717a1a8cc3b1","url":"http:\/\/www.last.fm\/music\/Sugar"},"@attr":{"rank":"5"}},{"name":"The Slim","duration":"314","mbid":"05a9c2e1-b4ed-4581-b69e-52f0ebc38215","url":"http:\/\/www.last.fm\/music\/Sugar\/_\/The+Slim","streamable":{"#text":"0","fulltrack":"0"},"artist":{"name":"Sugar","mbid":"2ccd1ad2-c6d4-4c40-9849-717a1a8cc3b1","url":"http:\/\/www.last.fm\/music\/Sugar"},"@attr":{"rank":"6"}},{"name":"If I Can't Change Your Mind","duration":"199","mbid":"0e889797-6bdb-4562-94e4-5970c7efba68","url":"http:\/\/www.last.fm\/music\/Sugar\/_\/If+I+Can%27t+Change+Your+Mind","streamable":{"#text":"0","fulltrack":"0"},"artist":{"name":"Sugar","mbid":"2ccd1ad2-c6d4-4c40-9849-717a1a8cc3b1","url":"http:\/\/www.last.fm\/music\/Sugar"},"@attr":{"rank":"7"}},{"name":"Fortune Teller","duration":"268","mbid":"0df82822-0a6b-4c28-a013-9b8a93fad197","url":"http:\/\/www.last.fm\/music\/Sugar\/_\/Fortune+Teller","streamable":{"#text":"0","fulltrack":"0"},"artist":{"name":"Sugar","mbid":"2ccd1ad2-c6d4-4c40-9849-717a1a8cc3b1","url":"http:\/\/www.last.fm\/music\/Sugar"},"@attr":{"rank":"8"}},{"name":"Slick","duration":"299","mbid":"01921298-8e5d-4567-a83a-7a5ad14b0595","url":"http:\/\/www.last.fm\/music\/Sugar\/_\/Slick","streamable":{"#text":"0","fulltrack":"0"},"artist":{"name":"Sugar","mbid":"2ccd1ad2-c6d4-4c40-9849-717a1a8cc3b1","url":"http:\/\/www.last.fm\/music\/Sugar"},"@attr":{"rank":"9"}},{"name":"Man on the Moon","duration":"282","mbid":"5e45024b-1560-4029-82bd-e624f3fd3df3","url":"http:\/\/www.last.fm\/music\/Sugar\/_\/Man+on+the+Moon","streamable":{"#text":"0","fulltrack":"0"},"artist":{"name":"Sugar","mbid":"2ccd1ad2-c6d4-4c40-9849-717a1a8cc3b1","url":"http:\/\/www.last.fm\/music\/Sugar"},"@attr":{"rank":"10"}}]},"toptags":{"tag":[{"name":"1992","url":"http:\/\/www.last.fm\/tag\/1992"},{"name":"albums i own","url":"http:\/\/www.last.fm\/tag\/albums%20i%20own"},{"name":"90s","url":"http:\/\/www.last.fm\/tag\/90s"},{"name":"alternative rock","url":"http:\/\/www.last.fm\/tag\/alternative%20rock"},{"name":"favorite albums","url":"http:\/\/www.last.fm\/tag\/favorite%20albums"}]}}}
50
+ http_version:
51
+ recorded_at: Tue, 15 Oct 2013 01:03:46 GMT
52
+ recorded_with: VCR 2.6.0
@@ -0,0 +1,62 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ws.audioscrobbler.com/2.0/?album=OK%20Computer&api_key=<LASTFM API
6
+ KEY>&format=json&method=album.search
7
+ body:
8
+ encoding: US-ASCII
9
+ string: ''
10
+ headers:
11
+ User-Agent:
12
+ - Faraday v0.8.8
13
+ Accept-Encoding:
14
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
15
+ Accept:
16
+ - '*/*'
17
+ response:
18
+ status:
19
+ code: 200
20
+ message: OK
21
+ headers:
22
+ Server:
23
+ - Apache/2.2.22 (Unix)
24
+ X-Web-Node:
25
+ - www198
26
+ Access-Control-Allow-Origin:
27
+ - '*'
28
+ Access-Control-Allow-Methods:
29
+ - POST, GET, OPTIONS
30
+ Access-Control-Max-Age:
31
+ - '86400'
32
+ Cache-Control:
33
+ - max-age=86400
34
+ Expires:
35
+ - Wed, 16 Oct 2013 00:03:11 GMT
36
+ Content-Type:
37
+ - application/json; charset=utf-8;
38
+ Content-Length:
39
+ - '1721'
40
+ Accept-Ranges:
41
+ - bytes
42
+ Date:
43
+ - Tue, 15 Oct 2013 01:01:07 GMT
44
+ X-Varnish:
45
+ - 3518447137 3517811000
46
+ Age:
47
+ - '3477'
48
+ Via:
49
+ - 1.1 varnish
50
+ Connection:
51
+ - close
52
+ X-Cms:
53
+ - '1'
54
+ X-Varnish-Host:
55
+ - varnish8
56
+ body:
57
+ encoding: UTF-8
58
+ string: |
59
+ {"results":{"opensearch:Query":{"#text":"","role":"request","searchTerms":"OK Computer","startPage":"1"},"opensearch:totalResults":"19","opensearch:startIndex":"0","opensearch:itemsPerPage":"50","albummatches":{"album":[{"name":"OK Computer","artist":"Radiohead","id":"1714","url":"http:\/\/www.last.fm\/music\/Radiohead\/OK+Computer","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/66781226.png","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/66781226.png","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/66781226.png","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/66781226.png","size":"extralarge"}],"streamable":"0","mbid":"3c8cbdc8-555f-3987-8f03-6baf9488d1b0"},{"name":"Stereogum Presents... OK X: A Tribute To OK Computer","artist":"Various Artists","id":"3382338","url":"http:\/\/www.last.fm\/music\/Various+Artists\/Stereogum+Presents...+OK+X:+A+Tribute+To+OK+Computer","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/9624061.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/9624061.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/9624061.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/9624061.jpg","size":"extralarge"}],"streamable":"1","mbid":""},{"name":"OK Computer (Collector's Edition)","artist":"Radiohead","id":"59505730","url":"http:\/\/www.last.fm\/music\/Radiohead\/OK+Computer+(Collector%27s+Edition)","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/66781162.png","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/66781162.png","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/66781162.png","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/66781162.png","size":"extralarge"}],"streamable":"0","mbid":""},{"name":"Strung Out on OK Computer: The String Quartet Tribute to Radiohead","artist":"The Section Quartet","id":"2025504","url":"http:\/\/www.last.fm\/music\/The+Section+Quartet\/Strung+Out+on+OK+Computer:+The+String+Quartet+Tribute+to+Radiohead","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/4187413.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/4187413.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/4187413.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/4187413.jpg","size":"extralarge"}],"streamable":"1","mbid":"b6b1aff9-0013-424c-a346-ef05d60c0bd7"},{"name":"O.K Computer","artist":"Radiohead","id":"2659158","url":"http:\/\/www.last.fm\/music\/Radiohead\/O.K+Computer","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/53214557.png","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/53214557.png","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/53214557.png","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/53214557.png","size":"extralarge"}],"streamable":"0","mbid":""},{"name":"5 Album Set (Pablo Honey\/The Bends\/OK Computer\/Kid A\/Amnesiac)","artist":"Radiohead","id":"315948289","url":"http:\/\/www.last.fm\/music\/Radiohead\/5+Album+Set+(Pablo+Honey%2FThe+Bends%2FOK+Computer%2FKid+A%2FAmnesiac)","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/82690929.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/82690929.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/82690929.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/82690929.jpg","size":"extralarge"}],"streamable":"0","mbid":""},{"name":"OK Computer (8-bit)","artist":"Quinton Sung","id":"306072678","url":"http:\/\/www.last.fm\/music\/Quinton+Sung\/OK+Computer+(8-bit)","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/77926402.png","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/77926402.png","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/77926402.png","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/77926402.png","size":"extralarge"}],"streamable":"0","mbid":"22aef6ea-73c5-4dfb-9471-9500b384a2a2"},{"name":"Album Box Set (OK Computer)","artist":"Radiohead","id":"3466475","url":"http:\/\/www.last.fm\/music\/Radiohead\/Album+Box+Set+(OK+Computer)","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/10181735.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/10181735.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/10181735.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/10181735.jpg","size":"extralarge"}],"streamable":"0","mbid":""},{"name":"OK Computer","artist":"willad","id":"3371613","url":"http:\/\/www.last.fm\/music\/willad\/OK+Computer","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"}],"streamable":"1","mbid":""},{"name":"Strung Out On OK Computer - The String Quartet Tribute To Radiohead","artist":"Radiohead Tribute","id":"3295594","url":"http:\/\/www.last.fm\/music\/Radiohead+Tribute\/Strung+Out+On+OK+Computer+-+The+String+Quartet+Tribute+To+Radiohead","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/32963621.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/32963621.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/32963621.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/32963621.jpg","size":"extralarge"}],"streamable":"1","mbid":""},{"name":"Mojo_Presents_OK_Computer","artist":"Various Artists","id":"311909354","url":"http:\/\/www.last.fm\/music\/Various+Artists\/Mojo_Presents_OK_Computer","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/83311919.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/83311919.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/83311919.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/83311919.jpg","size":"extralarge"}],"streamable":"1","mbid":"cfc8b0b8-5557-4373-a2f2-17bba6f76afd"},{"name":"OK Computer Turns 10","artist":"Various Artists","id":"311940307","url":"http:\/\/www.last.fm\/music\/Various+Artists\/OK+Computer+Turns+10","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"}],"streamable":"1","mbid":"3eb46ca4-5020-402f-8473-acdd8be5645d"},{"name":"A Tribute To OK Computer","artist":"Various Artists","id":"309901446","url":"http:\/\/www.last.fm\/music\/Various+Artists\/A+Tribute+To+OK+Computer","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/86480535.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/86480535.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/86480535.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/86480535.jpg","size":"extralarge"}],"streamable":"0","mbid":"0843e99a-6fbf-469f-83e2-676f720a21f0"},{"name":"O.K. Computer - Japan","artist":"Radiohead","id":"2659228","url":"http:\/\/www.last.fm\/music\/Radiohead\/O.K.+Computer+-+Japan","image":[{"#text":"http:\/\/images.amazon.com\/images\/P\/B00002MMMG.01._SCMZZZZZZZ_.jpg","size":"small"},{"#text":"http:\/\/images.amazon.com\/images\/P\/B00002MMMG.01._SCMZZZZZZZ_.jpg","size":"medium"},{"#text":"http:\/\/images.amazon.com\/images\/P\/B00002MMMG.01._SCMZZZZZZZ_.jpg","size":"large"},{"#text":"http:\/\/images.amazon.com\/images\/P\/B00002MMMG.01._SCMZZZZZZZ_.jpg","size":"extralarge"}],"streamable":"0","mbid":""},{"name":"Strung Out on Ok Computer: Str","artist":"Various","id":"2650357","url":"http:\/\/www.last.fm\/music\/Various\/Strung+Out+on+Ok+Computer:+Str","image":[{"#text":"http:\/\/images.amazon.com\/images\/P\/B00005OW6Q.01._SCMZZZZZZZ_.jpg","size":"small"},{"#text":"http:\/\/images.amazon.com\/images\/P\/B00005OW6Q.01._SCMZZZZZZZ_.jpg","size":"medium"},{"#text":"http:\/\/images.amazon.com\/images\/P\/B00005OW6Q.01._SCMZZZZZZZ_.jpg","size":"large"},{"#text":"http:\/\/images.amazon.com\/images\/P\/B00005OW6Q.01._SCMZZZZZZZ_.jpg","size":"extralarge"}],"streamable":"0","mbid":""},{"name":"Stereogum Presents\u2026 OKX: A Tribute to OK Computer","artist":"Various Artists","id":"305119361","url":"http:\/\/www.last.fm\/music\/Various+Artists\/Stereogum+Presents%E2%80%A6+OKX:+A+Tribute+to+OK+Computer","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/89029355.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/89029355.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/89029355.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/89029355.jpg","size":"extralarge"}],"streamable":"1","mbid":"f4976f80-2988-446d-8f62-b9f600be5c17"},{"name":"Computer OK [single]","artist":"D.Is (dp)","id":"253294750","url":"http:\/\/www.last.fm\/music\/D.Is+(dp)\/Computer+OK+%5Bsingle%5D","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/54560677.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/54560677.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/54560677.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/54560677.jpg","size":"extralarge"}],"streamable":"1","mbid":""},{"name":"Our Favorite Tambourines (E.P.)","artist":"computer, ok","id":"323533970","url":"http:\/\/www.last.fm\/music\/computer,+ok\/Our+Favorite+Tambourines+(E.P.)","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/85847403.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/85847403.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/85847403.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/85847403.jpg","size":"extralarge"}],"streamable":"1","mbid":""},{"name":"Soft (E.P.)","artist":"computer, ok","id":"323534856","url":"http:\/\/www.last.fm\/music\/computer,+ok\/Soft+(E.P.)","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/85847861.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/85847861.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/85847861.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/85847861.jpg","size":"extralarge"}],"streamable":"1","mbid":""}]},"@attr":{"for":"OK Computer"}}}
60
+ http_version:
61
+ recorded_at: Tue, 15 Oct 2013 01:01:08 GMT
62
+ recorded_with: VCR 2.6.0
@@ -0,0 +1,62 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ws.audioscrobbler.com/2.0/?album=Pretty%20Hate%20Machine&api_key=<LASTFM
6
+ API KEY>&format=json&method=album.search
7
+ body:
8
+ encoding: US-ASCII
9
+ string: ''
10
+ headers:
11
+ User-Agent:
12
+ - Faraday v0.8.8
13
+ Accept-Encoding:
14
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
15
+ Accept:
16
+ - '*/*'
17
+ response:
18
+ status:
19
+ code: 200
20
+ message: OK
21
+ headers:
22
+ Server:
23
+ - Apache/2.2.22 (Unix)
24
+ X-Web-Node:
25
+ - www214
26
+ Access-Control-Allow-Origin:
27
+ - '*'
28
+ Access-Control-Allow-Methods:
29
+ - POST, GET, OPTIONS
30
+ Access-Control-Max-Age:
31
+ - '86400'
32
+ Cache-Control:
33
+ - max-age=86400
34
+ Expires:
35
+ - Wed, 16 Oct 2013 00:02:04 GMT
36
+ Content-Type:
37
+ - application/json; charset=utf-8;
38
+ Content-Length:
39
+ - '942'
40
+ Accept-Ranges:
41
+ - bytes
42
+ Date:
43
+ - Tue, 15 Oct 2013 01:01:08 GMT
44
+ X-Varnish:
45
+ - 1698192967 1697560861
46
+ Age:
47
+ - '3544'
48
+ Via:
49
+ - 1.1 varnish
50
+ Connection:
51
+ - close
52
+ X-Cms:
53
+ - '1'
54
+ X-Varnish-Host:
55
+ - varnish4
56
+ body:
57
+ encoding: UTF-8
58
+ string: |
59
+ {"results":{"opensearch:Query":{"#text":"","role":"request","searchTerms":"Pretty Hate Machine","startPage":"1"},"opensearch:totalResults":"8","opensearch:startIndex":"0","opensearch:itemsPerPage":"50","albummatches":{"album":[{"name":"Pretty Hate Machine","artist":"Nine Inch Nails","id":"1428838","url":"http:\/\/www.last.fm\/music\/Nine+Inch+Nails\/Pretty+Hate+Machine","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/38399571.png","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/38399571.png","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/38399571.png","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/38399571.png","size":"extralarge"}],"streamable":"1","mbid":"ed721fd4-ca0c-4cb1-a569-050c994d10d9"},{"name":"Pretty Hate Machine: 2010 Remaster","artist":"Nine Inch Nails","id":"251152686","url":"http:\/\/www.last.fm\/music\/Nine+Inch+Nails\/Pretty+Hate+Machine:+2010+Remaster","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/59323837.png","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/59323837.png","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/59323837.png","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/59323837.png","size":"extralarge"}],"streamable":"0","mbid":""},{"name":"String Quartet Tribute To Nine Inch Nails' Pretty Hate Machine","artist":"Vitamin String Quartet","id":"3295940","url":"http:\/\/www.last.fm\/music\/Vitamin+String+Quartet\/String+Quartet+Tribute+To+Nine+Inch+Nails%27+Pretty+Hate+Machine","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/33062197.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/33062197.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/33062197.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/33062197.jpg","size":"extralarge"}],"streamable":"1","mbid":""},{"name":"Pretty Hate Machine Sessions","artist":"Nine Inch Nails","id":"279441131","url":"http:\/\/www.last.fm\/music\/Nine+Inch+Nails\/Pretty+Hate+Machine+Sessions","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"}],"streamable":"0","mbid":"ce4c0ab9-5ddb-4491-95dd-fd484325d514"},{"name":"({[PRETTY--HATE--MACHINE]})'s remix.nin","artist":"({[PRETTY--HATE--MACHINE]})","id":"3787831","url":"http:\/\/www.last.fm\/music\/(%7B%5BPRETTY--HATE--MACHINE%5D%7D)\/(%7B%5BPRETTY--HATE--MACHINE%5D%7D)%27s+remix.nin","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/5674736.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/5674736.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/5674736.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/5674736.jpg","size":"extralarge"}],"streamable":"1","mbid":""},{"name":"The String Quartet Tribute to Nine Inch Nails' Pretty Hate Machine","artist":"Vitamin String Quartet","id":"67599855","url":"http:\/\/www.last.fm\/music\/Vitamin+String+Quartet\/The+String+Quartet+Tribute+to+Nine+Inch+Nails%27+Pretty+Hate+Machine","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/71053136.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/71053136.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/71053136.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/71053136.jpg","size":"extralarge"}],"streamable":"1","mbid":"66c54622-47bb-40ee-9cfc-13f94510f7be"},{"name":"The String Quartet Tribute to Nine Inch Nails' Pretty Hate Machine","artist":"The String Quartet Tribute","id":"2389485","url":"http:\/\/www.last.fm\/music\/The+String+Quartet+Tribute\/The+String+Quartet+Tribute+to+Nine+Inch+Nails%27+Pretty+Hate+Machine","image":[{"#text":"http:\/\/images.amazon.com\/images\/P\/B0007ZSH5S.01.MZZZZZZZ.jpg","size":"small"},{"#text":"http:\/\/images.amazon.com\/images\/P\/B0007ZSH5S.01.MZZZZZZZ.jpg","size":"medium"},{"#text":"http:\/\/images.amazon.com\/images\/P\/B0007ZSH5S.01.MZZZZZZZ.jpg","size":"large"},{"#text":"http:\/\/images.amazon.com\/images\/P\/B0007ZSH5S.01.MZZZZZZZ.jpg","size":"extralarge"}],"streamable":"0","mbid":""},{"name":"Marvine EP","artist":"pretty hate machine","id":"3701163","url":"http:\/\/www.last.fm\/music\/pretty+hate+machine\/Marvine+EP","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34s\/10232735.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64s\/10232735.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/10232735.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/300x300\/10232735.jpg","size":"extralarge"}],"streamable":"1","mbid":""}]},"@attr":{"for":"Pretty Hate Machine"}}}
60
+ http_version:
61
+ recorded_at: Tue, 15 Oct 2013 01:01:08 GMT
62
+ recorded_with: VCR 2.6.0
@@ -0,0 +1,59 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ws.audioscrobbler.com/2.0/?api_key=<LASTFM API KEY>&artist=Aphex%20Twin&format=json&method=artist.search
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.8.8
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - '*/*'
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - Apache/2.2.22 (Unix)
23
+ X-Web-Node:
24
+ - www94
25
+ Access-Control-Allow-Origin:
26
+ - '*'
27
+ Access-Control-Allow-Methods:
28
+ - POST, GET, OPTIONS
29
+ Access-Control-Max-Age:
30
+ - '86400'
31
+ Cache-Control:
32
+ - max-age=86400
33
+ Expires:
34
+ - Tue, 15 Oct 2013 22:16:16 GMT
35
+ Content-Type:
36
+ - application/json; charset=utf-8;
37
+ Content-Length:
38
+ - '1776'
39
+ Accept-Ranges:
40
+ - bytes
41
+ Date:
42
+ - Tue, 15 Oct 2013 01:12:02 GMT
43
+ X-Varnish:
44
+ - 2256373354 2254278650
45
+ Age:
46
+ - '9892'
47
+ Via:
48
+ - 1.1 varnish
49
+ Connection:
50
+ - close
51
+ X-Cms:
52
+ - '1'
53
+ body:
54
+ encoding: UTF-8
55
+ string: |
56
+ {"results":{"opensearch:Query":{"#text":"","role":"request","searchTerms":"Aphex Twin","startPage":"1"},"opensearch:totalResults":"1211","opensearch:startIndex":"0","opensearch:itemsPerPage":"30","artistmatches":{"artist":[{"name":"Aphex Twin","listeners":"1148397","mbid":"158c6b17-a00a-4624-9ae0-d614d5dd0d52","url":"http:\/\/www.last.fm\/music\/Aphex+Twin","streamable":"1","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/57750673.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/57750673.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/57750673.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/57750673.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/57750673\/Aphex+Twin+AphexTwin.jpg","size":"mega"}]},{"name":"Fatboy Slim and Aphex Twin","listeners":"4033","mbid":"","url":"http:\/\/www.last.fm\/music\/Fatboy+Slim+and+Aphex+Twin","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/4442937.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/4442937.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/4442937.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/4442937.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/500\/4442937\/Fatboy+Slim+and+Aphex+Twin+580pxFatboy_Slim_2006.jpg","size":"mega"}]},{"name":"M83 vs Aphex Twin vs Khia","listeners":"2629","mbid":"","url":"http:\/\/www.last.fm\/music\/M83+vs+Aphex+Twin+vs+Khia","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/20400793.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/20400793.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/20400793.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/20400793.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/20400793\/M83+vs+Aphex+Twin+vs+Khia+images.jpg","size":"mega"}]},{"name":"Aphex Twin & Squarepusher","listeners":"2084","mbid":"","url":"http:\/\/www.last.fm\/music\/Aphex+Twin+&+Squarepusher","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/29356791.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/29356791.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/29356791.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/29356791.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/29356791\/Aphex+Twin++Squarepusher+230476.jpg","size":"mega"}]},{"name":"Aphex Twin ft. Photek & Autechre","listeners":"2050","mbid":"","url":"http:\/\/www.last.fm\/music\/Aphex+Twin+ft.+Photek+&+Autechre","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/40391485.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/40391485.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/40391485.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/40391485.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/500\/40391485\/Aphex+Twin+ft+Photek++Autechre+shwant2white_tunes.jpg","size":"mega"}]},{"name":"Autechre, Kraftwerk, Orbital, Photek & Aphex Twin","listeners":"1767","mbid":"","url":"http:\/\/www.last.fm\/music\/Autechre,+Kraftwerk,+Orbital,+Photek+&+Aphex+Twin","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"L.F.O. & Aphex Twin","listeners":"1721","mbid":"","url":"http:\/\/www.last.fm\/music\/L.F.O.+&+Aphex+Twin","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/77114476.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/77114476.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/77114476.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/77114476.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/77114476\/LFO++Aphex+Twin+74396732_4bb64544a0.jpg","size":"mega"}]},{"name":"Aphex Twin vs Run Jeremy","listeners":"1672","mbid":"","url":"http:\/\/www.last.fm\/music\/Aphex+Twin+vs+Run+Jeremy","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/180989.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/180989.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/180989.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/180989.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/500\/180989\/Aphex+Twin+vs+Run+Jeremy.jpg","size":"mega"}]},{"name":"Squarepusher and Aphex Twin","listeners":"1398","mbid":"","url":"http:\/\/www.last.fm\/music\/Squarepusher+and+Aphex+Twin","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/332240.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/332240.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/332240.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/332240.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/332240\/Squarepusher+and+Aphex+Twin.jpg","size":"mega"}]},{"name":"Aphex Twin, Richie Hawtin [aka Plastikman] & Derrick May","listeners":"1444","mbid":"","url":"http:\/\/www.last.fm\/music\/Aphex+Twin,+Richie+Hawtin+%5Baka+Plastikman%5D+&+Derrick+May","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"Aphex Twin vs Luke Vibert","listeners":"1246","mbid":"","url":"http:\/\/www.last.fm\/music\/Aphex+Twin+vs+Luke+Vibert","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/12361101.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/12361101.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/12361101.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/12361101.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/12361101\/Aphex+Twin+vs+Luke+Vibert+rdj_lv.jpg","size":"mega"}]},{"name":"Aphex Twin & Robert Miles","listeners":"1111","mbid":"","url":"http:\/\/www.last.fm\/music\/Aphex+Twin+&+Robert+Miles","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"Aphex Twin & Fatboy Slim","listeners":"957","mbid":"","url":"http:\/\/www.last.fm\/music\/Aphex+Twin+&+Fatboy+Slim","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"aphex_twin_vs_run_jeremy","listeners":"744","mbid":"","url":"http:\/\/www.last.fm\/music\/aphex_twin_vs_run_jeremy","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"M.I.A. vs. Aphex Twin","listeners":"727","mbid":"","url":"http:\/\/www.last.fm\/music\/M.I.A.+vs.+Aphex+Twin","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"LFO\/Aphex Twin","listeners":"557","mbid":"","url":"http:\/\/www.last.fm\/music\/LFO%2FAphex+Twin","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"Aphex Twin & Hecker","listeners":"539","mbid":"","url":"http:\/\/www.last.fm\/music\/Aphex+Twin+&+Hecker","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/26109757.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/26109757.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/26109757.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/26109757.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/26109757\/Aphex+Twin++Hecker+AT.jpg","size":"mega"}]},{"name":"Aphex Twin & Autechre","listeners":"525","mbid":"","url":"http:\/\/www.last.fm\/music\/Aphex+Twin+&+Autechre","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"The Step | Aphex Twin","listeners":"431","mbid":"","url":"http:\/\/www.last.fm\/music\/The+Step+%7C+Aphex+Twin","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/39399857.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/39399857.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/39399857.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/39399857.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/39399857\/The+Step++Aphex+Twin+Warp20_480.jpg","size":"mega"}]},{"name":"Aphex Twin & Cocteau Twins","listeners":"372","mbid":"","url":"http:\/\/www.last.fm\/music\/Aphex+Twin+&+Cocteau+Twins","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/6937339.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/6937339.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/6937339.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/6937339.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/500\/6937339\/Aphex+Twin++Cocteau+Twins+DSC00898.jpg","size":"mega"}]},{"name":"Jack Conte Covering Bright Eyes and Aphex Twin","listeners":"476","mbid":"","url":"http:\/\/www.last.fm\/music\/Jack+Conte+Covering+Bright+Eyes+and+Aphex+Twin","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"Nightmares on Wax & Aphex Twin","listeners":"401","mbid":"","url":"http:\/\/www.last.fm\/music\/Nightmares+on+Wax+&+Aphex+Twin","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"Aphex Twin & \u00b5-Ziq - Mike and Rich","listeners":"457","mbid":"","url":"http:\/\/www.last.fm\/music\/Aphex+Twin+&+%C2%B5-Ziq+-+Mike+and+Rich","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/172542.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/172542.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/172542.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/172542.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/172542\/Aphex+Twin++Ziq++Mike+and+Rich.jpg","size":"mega"}]},{"name":"Squarepusher | Chris Clark | Aphex Twin","listeners":"398","mbid":"","url":"http:\/\/www.last.fm\/music\/Squarepusher+%7C+Chris+Clark+%7C+Aphex+Twin","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/39399905.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/39399905.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/39399905.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/39399905.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/39399905\/Squarepusher++Chris+Clark++Aphex+Twin+Warp20_480.jpg","size":"mega"}]},{"name":"Cocteau Twins & Aphex Twin","listeners":"318","mbid":"","url":"http:\/\/www.last.fm\/music\/Cocteau+Twins+&+Aphex+Twin","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"Aphex Twin Vs. Unknown","listeners":"250","mbid":"","url":"http:\/\/www.last.fm\/music\/Aphex+Twin+Vs.+Unknown","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"Aphex Twin | Jimmy Edgar | Elecktroids | Luke Vibert | Prefuse 73","listeners":"446","mbid":"","url":"http:\/\/www.last.fm\/music\/Aphex+Twin+%7C+Jimmy+Edgar+%7C+Elecktroids+%7C+Luke+Vibert+%7C+Prefuse+73","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/45334967.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/45334967.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/45334967.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/45334967.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/45334967\/Aphex+Twin++Jimmy+Edgar++Elecktroids++Luke+Vibert++39399857.jpg","size":"mega"}]},{"name":"Jimi Tenor\/Aphex Twin","listeners":"209","mbid":"","url":"http:\/\/www.last.fm\/music\/Jimi+Tenor%2FAphex+Twin","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"Aphex Twin & NIN","listeners":"182","mbid":"","url":"http:\/\/www.last.fm\/music\/Aphex+Twin+&+NIN","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"AFX (aka Aphex Twin)","listeners":"163","mbid":"","url":"http:\/\/www.last.fm\/music\/AFX+(aka+Aphex+Twin)","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]}]},"@attr":{"for":"Aphex Twin"}}}
57
+ http_version:
58
+ recorded_at: Tue, 15 Oct 2013 01:01:08 GMT
59
+ recorded_with: VCR 2.6.0
@@ -0,0 +1,61 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://ws.audioscrobbler.com/2.0/?api_key=<LASTFM API KEY>&artist=Nirvana&format=json&method=artist.search
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.8.8
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - '*/*'
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - Apache/2.2.22 (Unix)
23
+ X-Web-Node:
24
+ - www237
25
+ Access-Control-Allow-Origin:
26
+ - '*'
27
+ Access-Control-Allow-Methods:
28
+ - POST, GET, OPTIONS
29
+ Access-Control-Max-Age:
30
+ - '86400'
31
+ Cache-Control:
32
+ - max-age=86400
33
+ Expires:
34
+ - Tue, 15 Oct 2013 23:59:01 GMT
35
+ Content-Type:
36
+ - application/json; charset=utf-8;
37
+ Content-Length:
38
+ - '2281'
39
+ Accept-Ranges:
40
+ - bytes
41
+ Date:
42
+ - Tue, 15 Oct 2013 01:01:09 GMT
43
+ X-Varnish:
44
+ - 1698193132 1697526163
45
+ Age:
46
+ - '3727'
47
+ Via:
48
+ - 1.1 varnish
49
+ Connection:
50
+ - close
51
+ X-Cms:
52
+ - '1'
53
+ X-Varnish-Host:
54
+ - varnish4
55
+ body:
56
+ encoding: UTF-8
57
+ string: |
58
+ {"results":{"opensearch:Query":{"#text":"","role":"request","searchTerms":"Nirvana","startPage":"1"},"opensearch:totalResults":"2899","opensearch:startIndex":"0","opensearch:itemsPerPage":"30","artistmatches":{"artist":[{"name":"Nirvana","listeners":"3722151","mbid":"5b11f4ce-a62d-471e-81fc-a69a8278c7da","url":"http:\/\/www.last.fm\/music\/Nirvana","streamable":"1","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/416571.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/416571.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/416571.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/416571.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/500\/416571\/Nirvana.jpg","size":"mega"}]},{"name":"Approaching Nirvana","listeners":"18235","mbid":"c3a64a25-251b-4d03-afba-1471440245b8","url":"http:\/\/www.last.fm\/music\/Approaching+Nirvana","streamable":"1","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/32805729.gif","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/32805729.gif","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/32805729.gif","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/32805729.gif","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/500\/32805729\/Approaching+Nirvana+AN+Profile+Pic.gif","size":"mega"}]},{"name":"Nirvana, Sonic Youth & REM","listeners":"12356","mbid":"","url":"http:\/\/www.last.fm\/music\/Nirvana,+Sonic+Youth+&+REM","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/51587273.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/51587273.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/51587273.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/51587273.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/500\/51587273\/Nirvana+Sonic+Youth++REM+007.jpg","size":"mega"}]},{"name":"Nirvana 2002","listeners":"5497","mbid":"f2dfdff9-3862-4be0-bf85-9c833fa3059e","url":"http:\/\/www.last.fm\/music\/Nirvana+2002","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/37921469.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/37921469.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/37921469.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/37921469.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/500\/37921469\/Nirvana+2002++1.jpg","size":"mega"}]},{"name":"Nirvana, Mujuice, Tori Amos","listeners":"4829","mbid":"","url":"http:\/\/www.last.fm\/music\/Nirvana,+Mujuice,+Tori+Amos","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/38896857.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/38896857.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/38896857.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/38896857.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/38896857\/Nirvana+Mujuice+Tori+Amos+x_8bae67c9.jpg","size":"mega"}]},{"name":"Nirvana Vs Adam Freeland","listeners":"2879","mbid":"","url":"http:\/\/www.last.fm\/music\/Nirvana+Vs+Adam+Freeland","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/489008.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/489008.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/489008.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/489008.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/489008\/Nirvana+Vs+Adam+Freeland.jpg","size":"mega"}]},{"name":"Destiny's Child Vs. Nirvana","listeners":"2189","mbid":"","url":"http:\/\/www.last.fm\/music\/Destiny%27s+Child+Vs.+Nirvana","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/33207663.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/33207663.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/33207663.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/33207663.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/500\/33207663\/Destinys+Child+Vs+Nirvana+mash.jpg","size":"mega"}]},{"name":"Nirvana for children","listeners":"2069","mbid":"","url":"http:\/\/www.last.fm\/music\/Nirvana+for+children","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/82989405.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/82989405.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/82989405.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/82989405.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/82989405\/Nirvana+for+children+news41882151853948536_12638005.jpg","size":"mega"}]},{"name":"Nirvana with Courtney Love","listeners":"1965","mbid":"","url":"http:\/\/www.last.fm\/music\/Nirvana+with+Courtney+Love","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/50346889.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/50346889.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/50346889.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/50346889.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/50346889\/Nirvana+with+Courtney+Love+kurtbiopic.jpg","size":"mega"}]},{"name":"Nirvana With Chris Cornell","listeners":"1857","mbid":"","url":"http:\/\/www.last.fm\/music\/Nirvana+With+Chris+Cornell","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"Calvin Harris vs. Nirvana","listeners":"1857","mbid":"","url":"http:\/\/www.last.fm\/music\/Calvin+Harris+vs.+Nirvana","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"\u0414\u043e\u043c \u0412\u0435\u0442\u0440\u043e\u0432 - \u042d\u043f\u0438\u0434\u0435\u043c\u0438\u044f, \u0410\u0440\u0438\u044f, \u041a\u0438\u0428, \u0410\u043b\u0438\u0441\u0430, \u041a\u0438\u043f\u0435\u043b\u043e\u0432, \u0421\u043f\u043b\u0438\u043d, \u0411\u0438-2, \u0417\u0435\u043c\u0444\u0438\u0440\u0430, \u041b\u0435\u043d\u0438\u043d\u0433\u0440\u0430\u0434, \u041c\u0443\u043c\u0438\u0439 \u0422\u0440\u043e\u043b\u044c, \u041a\u0438\u043d\u043e, Nirvana, Scorpions, Queen,","listeners":"1549","mbid":"","url":"http:\/\/www.last.fm\/music\/%D0%94%D0%BE%D0%BC+%D0%92%D0%B5%D1%82%D1%80%D0%BE%D0%B2+-+%D0%AD%D0%BF%D0%B8%D0%B4%D0%B5%D0%BC%D0%B8%D1%8F,+%D0%90%D1%80%D0%B8%D1%8F,+%D0%9A%D0%B8%D0%A8,+%D0%90%D0%BB%D0%B8%D1%81%D0%B0,+%D0%9A%D0%B8%D0%BF%D0%B5%D0%BB%D0%BE%D0%B2,+%D0%A1%D0%BF%D0%BB%D0%B8%D0%BD,+%D0%91%D0%B8-2,+%D0%97%D0%B5%D0%BC%D1%84%D0%B8%D1%80%D0%B0,+%D0%9B%D0%B5%D0%BD%D0%B8%D0%BD%D0%B3%D1%80%D0%B0%D0%B4,+%D0%9C%D1%83%D0%BC%D0%B8%D0%B9+%D0%A2%D1%80%D0%BE%D0%BB%D1%8C,+%D0%9A%D0%B8%D0%BD%D0%BE,+Nirvana,+Scorpions,+Queen,","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"Nirvana vs. Daft Punk","listeners":"1460","mbid":"","url":"http:\/\/www.last.fm\/music\/Nirvana+vs.+Daft+Punk","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"Nirvana vs. Timbaland feat. SoShy & Nelly Furtado","listeners":"1300","mbid":"","url":"http:\/\/www.last.fm\/music\/Nirvana+vs.+Timbaland+feat.+SoShy+&+Nelly+Furtado","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"Nirvana vs. Rick Astley","listeners":"1232","mbid":"","url":"http:\/\/www.last.fm\/music\/Nirvana+vs.+Rick+Astley","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/33367963.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/33367963.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/33367963.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/33367963.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/33367963\/Nirvana+vs+Rick+Astley+rickastleynirvanavsnevergonnag.jpg","size":"mega"}]},{"name":"TIMBALAND vs NIRVANA","listeners":"1179","mbid":"","url":"http:\/\/www.last.fm\/music\/TIMBALAND+vs+NIRVANA","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/53301045.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/53301045.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/53301045.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/53301045.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/53301045\/TIMBALAND+vs+NIRVANA+djs+from+mars.jpg","size":"mega"}]},{"name":"Nirvana Tribute Band","listeners":"1125","mbid":"","url":"http:\/\/www.last.fm\/music\/Nirvana+Tribute+Band","streamable":"1","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"Michael Jackson vs. Nirvana","listeners":"1114","mbid":"","url":"http:\/\/www.last.fm\/music\/Michael+Jackson+vs.+Nirvana","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/43903111.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/43903111.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/43903111.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/43903111.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/43903111\/Michael+Jackson+vs+Nirvana+0.jpg","size":"mega"}]},{"name":"Destiny's Child Vs Nirvana","listeners":"909","mbid":"","url":"http:\/\/www.last.fm\/music\/Destiny%27s+Child+Vs+Nirvana","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/78951891.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/78951891.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/78951891.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/78951891.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/78951891\/Destinys+Child+Vs+Nirvana+remixes.jpg","size":"mega"}]},{"name":"Nirvana Vs Destiny's Child","listeners":"880","mbid":"","url":"http:\/\/www.last.fm\/music\/Nirvana+Vs+Destiny%27s+Child","streamable":"1","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"Limp Bizkit & Rage Against The Machine & POD & Offspring & Greenday & Nirvana & Pearl Jam","listeners":"941","mbid":"","url":"http:\/\/www.last.fm\/music\/Limp+Bizkit+&+Rage+Against+The+Machine+&+POD+&+Offspring+&+Greenday+&+Nirvana+&+Pearl+Jam","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/2322209.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/2322209.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/2322209.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/2322209.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/2322209\/Limp+Bizkit++Rage+Against+The+Machine++POD++Offspr+mercy_black.jpg","size":"mega"}]},{"name":"The Supermen Lovers vs. Nirvana","listeners":"841","mbid":"","url":"http:\/\/www.last.fm\/music\/The+Supermen+Lovers+vs.+Nirvana","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/46638135.png","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/46638135.png","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/46638135.png","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/46638135.png","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/46638135\/The+Supermen+Lovers+vs+Nirvana.png","size":"mega"}]},{"name":"Korn, Orgy, Prodigy, Nirvana","listeners":"804","mbid":"","url":"http:\/\/www.last.fm\/music\/Korn,+Orgy,+Prodigy,+Nirvana","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"Michael Jackson VS Nirvana","listeners":"796","mbid":"","url":"http:\/\/www.last.fm\/music\/Michael+Jackson+VS+Nirvana","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"Nirvana vs. White Trash Kids on Crank vs. The Trucks","listeners":"837","mbid":"","url":"http:\/\/www.last.fm\/music\/Nirvana+vs.+White+Trash+Kids+on+Crank+vs.+The+Trucks","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"Nirvana vs. Destiny's Child","listeners":"769","mbid":"","url":"http:\/\/www.last.fm\/music\/Nirvana+vs.+Destiny%27s+Child","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"The Nirvana Sitar & String Group","listeners":"784","mbid":"","url":"http:\/\/www.last.fm\/music\/The+Nirvana+Sitar+&+String+Group","streamable":"0","image":[{"#text":"http:\/\/userserve-ak.last.fm\/serve\/34\/33508901.jpg","size":"small"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/64\/33508901.jpg","size":"medium"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/126\/33508901.jpg","size":"large"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/252\/33508901.jpg","size":"extralarge"},{"#text":"http:\/\/userserve-ak.last.fm\/serve\/_\/33508901\/The+Nirvana+Sitar++String+Group+The+Nirvana+Sitar++string+grou.jpg","size":"mega"}]},{"name":"Dj Yang Dee and Nirvana, Mujuice, Tori Amos","listeners":"795","mbid":"","url":"http:\/\/www.last.fm\/music\/Dj+Yang+Dee+and+Nirvana,+Mujuice,+Tori+Amos","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"Fedde Le Grand vs Nirvana","listeners":"722","mbid":"","url":"http:\/\/www.last.fm\/music\/Fedde+Le+Grand+vs+Nirvana","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]},{"name":"Nirvana(Ituana)","listeners":"672","mbid":"","url":"http:\/\/www.last.fm\/music\/Nirvana(Ituana)","streamable":"0","image":[{"#text":"","size":"small"},{"#text":"","size":"medium"},{"#text":"","size":"large"},{"#text":"","size":"extralarge"},{"#text":"","size":"mega"}]}]},"@attr":{"for":"Nirvana"}}}
59
+ http_version:
60
+ recorded_at: Tue, 15 Oct 2013 01:01:09 GMT
61
+ recorded_with: VCR 2.6.0
@@ -0,0 +1,31 @@
1
+ require 'spec_helper'
2
+
3
+ describe LastFM::Album, :vcr do
4
+ context 'searching' do
5
+ it 'returns a list of relevant albums' do
6
+ album_name = 'OK Computer'
7
+ results = LastFM::Album.search(album_name)
8
+ expect(results.size).to_not eql(0)
9
+ expect(results.first).to be_kind_of(LastFM::Album)
10
+ expect(results.first.name).to eql(album_name)
11
+ end
12
+
13
+ it 'returns an image for an album' do
14
+ album_name = 'Pretty Hate Machine'
15
+ results = LastFM::Album.search(album_name)
16
+ expect(results.first.image).to include('.png')
17
+ end
18
+ end
19
+
20
+ context 'get info' do
21
+ it 'gets a relevant result' do
22
+ artist = 'Sugar'
23
+ album = 'Copper Blue'
24
+ result = LastFM::Album.get_info(artist, album)
25
+ expect(result).to_not be_nil
26
+ expect(result).to be_kind_of(LastFM::Album)
27
+ expect(result.name).to eql(album)
28
+ expect(result.tracks.count).to eql(10)
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,19 @@
1
+ require 'spec_helper'
2
+
3
+ describe LastFM::Artist, :vcr do
4
+ context 'searching' do
5
+ it 'returns a list of relevant artists' do
6
+ artist_name = 'Aphex Twin'
7
+ results = LastFM::Artist.search(artist_name)
8
+ expect(results.size).to_not eql(0)
9
+ expect(results.first).to be_kind_of(LastFM::Artist)
10
+ expect(results.first.name).to eql(artist_name)
11
+ end
12
+
13
+ it 'returns an image for an artist' do
14
+ artist_name = 'Nirvana'
15
+ results = LastFM::Artist.search(artist_name)
16
+ expect(results.first.images[:large]).to include('.jpg')
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,17 @@
1
+ require 'rspec'
2
+ require 'vcr'
3
+ require_relative '../lib/last_fm'
4
+
5
+ LastFM.api_key = ENV['lastfm_api_key']
6
+
7
+ VCR.configure do |c|
8
+ c.cassette_library_dir = 'spec/cassettes'
9
+ c.hook_into :webmock
10
+ c.configure_rspec_metadata!
11
+ c.default_cassette_options = { record: :new_episodes }
12
+ c.filter_sensitive_data('<LASTFM API KEY>') { LastFM.api_key }
13
+ end
14
+
15
+ RSpec.configure do |c|
16
+ c.treat_symbols_as_metadata_keys_with_true_values = true
17
+ end
metadata ADDED
@@ -0,0 +1,173 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: radavis_last_fm
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Richard Davis
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-10-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: faraday
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: multi_json
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: webmock
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: vcr
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: pry
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description: API Wrapper for last.fm
112
+ email:
113
+ - rdavis.bacs@gmail.com
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - .gitignore
119
+ - Gemfile
120
+ - LICENSE.txt
121
+ - README.md
122
+ - Rakefile
123
+ - last_fm.gemspec
124
+ - lib/last_fm.rb
125
+ - lib/last_fm/album.rb
126
+ - lib/last_fm/artist.rb
127
+ - lib/last_fm/query.rb
128
+ - lib/last_fm/result.rb
129
+ - lib/last_fm/track.rb
130
+ - lib/last_fm/version.rb
131
+ - spec/cassettes/LastFM_Album/get_info/gets_a_relavant_result.yml
132
+ - spec/cassettes/LastFM_Album/get_info/gets_a_relevant_result.yml
133
+ - spec/cassettes/LastFM_Album/searching/returns_a_list_of_relevant_albums.yml
134
+ - spec/cassettes/LastFM_Album/searching/returns_an_image_for_an_album.yml
135
+ - spec/cassettes/LastFM_Artist/searching/returns_a_list_of_relevant_artists.yml
136
+ - spec/cassettes/LastFM_Artist/searching/returns_an_image_for_an_artist.yml
137
+ - spec/last_fm/album_spec.rb
138
+ - spec/last_fm/artist_spec.rb
139
+ - spec/spec_helper.rb
140
+ homepage: ''
141
+ licenses:
142
+ - MIT
143
+ metadata: {}
144
+ post_install_message:
145
+ rdoc_options: []
146
+ require_paths:
147
+ - lib
148
+ required_ruby_version: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ required_rubygems_version: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
158
+ requirements: []
159
+ rubyforge_project:
160
+ rubygems_version: 2.0.6
161
+ signing_key:
162
+ specification_version: 4
163
+ summary: An API Wrapper for last.fm using Faraday, VCR, and RSpec
164
+ test_files:
165
+ - spec/cassettes/LastFM_Album/get_info/gets_a_relavant_result.yml
166
+ - spec/cassettes/LastFM_Album/get_info/gets_a_relevant_result.yml
167
+ - spec/cassettes/LastFM_Album/searching/returns_a_list_of_relevant_albums.yml
168
+ - spec/cassettes/LastFM_Album/searching/returns_an_image_for_an_album.yml
169
+ - spec/cassettes/LastFM_Artist/searching/returns_a_list_of_relevant_artists.yml
170
+ - spec/cassettes/LastFM_Artist/searching/returns_an_image_for_an_artist.yml
171
+ - spec/last_fm/album_spec.rb
172
+ - spec/last_fm/artist_spec.rb
173
+ - spec/spec_helper.rb