insound_api 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -27
- data/VERSION +1 -1
- data/insound_api.gemspec +2 -1
- data/lib/insound_api.rb +1 -4
- data/lib/insound_api/artist.rb +11 -6
- data/lib/insound_api/object_base.rb +27 -0
- data/lib/insound_api/product.rb +9 -9
- data/lib/insound_api/results.rb +38 -13
- data/test/query_test.rb +8 -26
- data/test/webmock/jimmy_eat_world_vinyl.xml +43 -36
- data/test/webmock/maxresults.xml +331 -256
- data/test/webmock/no_results_found.xml +11 -10
- data/test/webmock/zen_arcade.xml +35 -30
- metadata +3 -2
data/README.md
CHANGED
@@ -4,8 +4,7 @@
|
|
4
4
|
[![Build Status](https://secure.travis-ci.org/spilliton/insound_api.png?branch=master)](http://travis-ci.org/spilliton/insound_api)
|
5
5
|
[![Code Climate](https://codeclimate.com/github/spilliton/insound_api.png)](https://codeclimate.com/github/spilliton/insound_api)
|
6
6
|
|
7
|
-
A ruby gem for accessing the
|
8
|
-
|
7
|
+
A ruby gem for accessing the insound.com Web Service API for affiliates
|
9
8
|
|
10
9
|
## Install
|
11
10
|
|
@@ -17,40 +16,17 @@ gem 'insound_api'
|
|
17
16
|
bundle install
|
18
17
|
```
|
19
18
|
|
20
|
-
##
|
19
|
+
## Usage
|
21
20
|
|
22
21
|
You will need to setup insound_api to use your credentials. If you are using rails, a good place to do this is in a initializer:
|
23
22
|
|
24
23
|
``` ruby
|
25
24
|
# /config/initializers/insound_api.rb
|
25
|
+
|
26
26
|
InsoundApi.setup do |config|
|
27
27
|
config.affiliate_id = 42
|
28
28
|
config.api_password = 'my_password'
|
29
29
|
end
|
30
|
-
```
|
31
|
-
|
32
|
-
## Usage
|
33
30
|
|
34
|
-
Currently the API only supports searches and you must provide an artist param. There are some optional params (title, maxresults, format) you can find in their [API Doc][api_docs]. The results contain some metadata about the search as well as two arrays of resulting products and artists:
|
35
|
-
|
36
|
-
``` ruby
|
37
|
-
results = InsoundApi.search(:artist => "Nofx", :maxresults => 50)
|
38
|
-
results.artists_total
|
39
|
-
=> 1
|
40
|
-
results.products_total
|
41
|
-
=> 36
|
42
|
-
artist = results.artists.first
|
43
|
-
artist.name
|
44
|
-
=> "NOFX"
|
45
|
-
product = results.products.first
|
46
|
-
product.title
|
47
|
-
=> "I Heard They Suck Live!"
|
48
31
|
```
|
49
32
|
|
50
|
-
Products have the following attributes: url, id, title, artist_name, format
|
51
|
-
|
52
|
-
and Artists have: url, id, name
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
[api_docs]: https://www.insound.com/affiliate/webservices.php
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0
|
1
|
+
0.1.0
|
data/insound_api.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "insound_api"
|
8
|
-
s.version = "0.0
|
8
|
+
s.version = "0.1.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Zachary Kloepping"]
|
@@ -27,6 +27,7 @@ Gem::Specification.new do |s|
|
|
27
27
|
"lib/insound_api.rb",
|
28
28
|
"lib/insound_api/artist.rb",
|
29
29
|
"lib/insound_api/config.rb",
|
30
|
+
"lib/insound_api/object_base.rb",
|
30
31
|
"lib/insound_api/product.rb",
|
31
32
|
"lib/insound_api/query.rb",
|
32
33
|
"lib/insound_api/request.rb",
|
data/lib/insound_api.rb
CHANGED
@@ -6,6 +6,7 @@ module InsoundApi
|
|
6
6
|
autoload :RequestException, 'insound_api/request'
|
7
7
|
autoload :Response, 'insound_api/response'
|
8
8
|
|
9
|
+
autoload :ObjectBase, 'insound_api/object_base'
|
9
10
|
autoload :Product, 'insound_api/product'
|
10
11
|
autoload :Artist, 'insound_api/artist'
|
11
12
|
|
@@ -33,8 +34,4 @@ eos
|
|
33
34
|
@config = Config.new
|
34
35
|
yield @config
|
35
36
|
end
|
36
|
-
|
37
|
-
def self.search(params)
|
38
|
-
Query.search(params)
|
39
|
-
end
|
40
37
|
end
|
data/lib/insound_api/artist.rb
CHANGED
@@ -1,13 +1,18 @@
|
|
1
1
|
module InsoundApi
|
2
|
-
class Artist
|
2
|
+
class Artist < ObjectBase
|
3
3
|
|
4
|
-
|
4
|
+
def name
|
5
|
+
@name ||= parse_str('artist_name')
|
6
|
+
end
|
7
|
+
|
8
|
+
def format
|
9
|
+
@format ||= parse_str('format')
|
10
|
+
end
|
5
11
|
|
6
|
-
def
|
7
|
-
@
|
8
|
-
@name = Results.parse_str('artist_name', node)
|
9
|
-
@id = Results.parse_int('artist_id', node)
|
12
|
+
def id
|
13
|
+
@id ||= parse_int('artist_id')
|
10
14
|
end
|
11
15
|
|
16
|
+
|
12
17
|
end
|
13
18
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module InsoundApi
|
2
|
+
class ObjectBase
|
3
|
+
|
4
|
+
attr_reader :node
|
5
|
+
|
6
|
+
def initialize(node)
|
7
|
+
@node = node
|
8
|
+
end
|
9
|
+
|
10
|
+
def url
|
11
|
+
@url ||= parse_str('url')
|
12
|
+
end
|
13
|
+
|
14
|
+
def title
|
15
|
+
@title ||= parse_str('title')
|
16
|
+
end
|
17
|
+
|
18
|
+
def parse_str(selector)
|
19
|
+
Results.parse_str(selector, node)
|
20
|
+
end
|
21
|
+
|
22
|
+
def parse_int(selector)
|
23
|
+
Results.parse_int(selector, node)
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
data/lib/insound_api/product.rb
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
module InsoundApi
|
2
|
-
class Product
|
2
|
+
class Product < ObjectBase
|
3
3
|
|
4
|
-
|
5
|
-
|
4
|
+
def artist_name
|
5
|
+
@artist_name ||= parse_str('artist_name')
|
6
|
+
end
|
6
7
|
|
8
|
+
def format
|
9
|
+
@format ||= parse_str('format')
|
10
|
+
end
|
7
11
|
|
8
|
-
def
|
9
|
-
@
|
10
|
-
@id = Results.parse_str('product_id', node)
|
11
|
-
@title = Results.parse_str('title', node)
|
12
|
-
@artist_name = Results.parse_str('artist_name', node)
|
13
|
-
@format = Results.parse_str('format', node)
|
12
|
+
def id
|
13
|
+
@id ||= parse_str('product_id')
|
14
14
|
end
|
15
15
|
|
16
16
|
end
|
data/lib/insound_api/results.rb
CHANGED
@@ -1,41 +1,66 @@
|
|
1
1
|
module InsoundApi
|
2
2
|
class Results
|
3
3
|
|
4
|
-
attr_reader :
|
5
|
-
attr_reader :products, :products_total
|
6
|
-
attr_reader :artists, :artists_total
|
4
|
+
attr_reader :warnings, :doc
|
7
5
|
|
8
6
|
# takes a nokogiri document
|
9
|
-
def initialize(
|
10
|
-
@
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
@
|
15
|
-
|
7
|
+
def initialize(document)
|
8
|
+
@doc = document
|
9
|
+
end
|
10
|
+
|
11
|
+
def search_url
|
12
|
+
@search_url ||= parse_str('search_url')
|
13
|
+
end
|
14
|
+
|
15
|
+
def products
|
16
|
+
@products ||= parse_objects('product_matches product', Product)
|
17
|
+
end
|
18
|
+
|
19
|
+
def products_total
|
20
|
+
@products_total ||= parse_int('total_product_results')
|
21
|
+
end
|
22
|
+
|
23
|
+
def artists
|
24
|
+
@artists ||= parse_objects('artist_matches artist', Artist)
|
25
|
+
end
|
26
|
+
|
27
|
+
def artists_total
|
28
|
+
@artists_total ||= parse_int('total_artist_results')
|
29
|
+
end
|
30
|
+
|
31
|
+
def total_results
|
32
|
+
@total_results ||= parse_int('total_results')
|
16
33
|
end
|
17
34
|
|
18
35
|
|
19
|
-
|
36
|
+
|
37
|
+
def parse_objects(selector, klass)
|
20
38
|
nodes = doc.css(selector)
|
21
39
|
nodes.map{|n| klass.new(n) }
|
22
40
|
end
|
23
41
|
|
24
42
|
|
43
|
+
def parse_int(selector)
|
44
|
+
Results.parse_int(selector, doc)
|
45
|
+
end
|
46
|
+
|
25
47
|
def self.parse_int(selector, doc)
|
26
48
|
nodes = doc.css(selector)
|
27
49
|
if nodes.any?
|
28
|
-
nodes.first.
|
50
|
+
nodes.first.inner_html.strip.to_i
|
29
51
|
else
|
30
52
|
0
|
31
53
|
end
|
32
54
|
end
|
33
55
|
|
56
|
+
def parse_str(selector)
|
57
|
+
Results.parse_str(selector, doc)
|
58
|
+
end
|
34
59
|
|
35
60
|
def self.parse_str(selector, doc)
|
36
61
|
nodes = doc.css(selector)
|
37
62
|
if nodes.any?
|
38
|
-
nodes.first.
|
63
|
+
nodes.first.inner_html.strip
|
39
64
|
end
|
40
65
|
end
|
41
66
|
|
data/test/query_test.rb
CHANGED
@@ -14,32 +14,15 @@ module InsoundApi
|
|
14
14
|
@results = Query.search(:artist => 'xxcxccxcx')
|
15
15
|
end
|
16
16
|
|
17
|
-
should 'return empty stuff' do
|
18
|
-
assert_equal [], @results.products
|
19
|
-
assert_equal [], @results.artists
|
20
|
-
|
21
|
-
assert_equal 0, @results.products_total
|
22
|
-
assert_equal 0, @results.artists_total
|
23
|
-
assert_equal 0, @results.total_results
|
24
|
-
|
25
|
-
assert @results.search_url.include?("http://www.insound.com/search/?query=xxcxccxcx&from=")
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
context 'using module search' do
|
30
|
-
setup do
|
31
|
-
mock(:no_results_found, "?artist=xxcxccxcx")
|
32
|
-
@results = InsoundApi.search(:artist => 'xxcxccxcx')
|
33
|
-
end
|
34
17
|
|
35
|
-
|
18
|
+
should 'return empty stuff' do
|
36
19
|
assert_equal [], @results.products
|
37
20
|
assert_equal [], @results.artists
|
38
21
|
|
39
22
|
assert_equal 0, @results.products_total
|
40
23
|
assert_equal 0, @results.artists_total
|
41
24
|
assert_equal 0, @results.total_results
|
42
|
-
assert @results.search_url
|
25
|
+
assert @results.search_url
|
43
26
|
end
|
44
27
|
end
|
45
28
|
|
@@ -59,14 +42,14 @@ module InsoundApi
|
|
59
42
|
assert_nil @results.search_url
|
60
43
|
|
61
44
|
product = @results.products.first
|
62
|
-
assert product.url
|
45
|
+
assert product.url
|
63
46
|
assert_equal 'Jimmy Eat World', product.artist_name
|
64
47
|
assert_equal 'Invented', product.title
|
65
48
|
assert_equal 'Vinyl LP', product.format
|
66
49
|
assert_equal 'INS79668', product.id
|
67
50
|
|
68
51
|
artist = @results.artists.first
|
69
|
-
assert artist.url
|
52
|
+
assert artist.url
|
70
53
|
assert_equal 'Jimmy Eat World', artist.name
|
71
54
|
assert_equal 19191, artist.id
|
72
55
|
end
|
@@ -88,14 +71,14 @@ module InsoundApi
|
|
88
71
|
assert_nil @results.search_url
|
89
72
|
|
90
73
|
product = @results.products.first
|
91
|
-
assert product.url
|
74
|
+
assert product.url
|
92
75
|
assert_equal 'Arcade Fire', product.artist_name
|
93
76
|
assert_equal 'Funeral', product.title
|
94
77
|
assert_equal 'CD', product.format
|
95
78
|
assert_equal 'INS23877', product.id
|
96
79
|
|
97
80
|
artist = @results.artists.first
|
98
|
-
assert artist.url
|
81
|
+
assert artist.url
|
99
82
|
assert_equal 'Arcade Fire', artist.name
|
100
83
|
assert_equal 29908, artist.id
|
101
84
|
end
|
@@ -118,15 +101,14 @@ module InsoundApi
|
|
118
101
|
assert_nil @results.search_url
|
119
102
|
|
120
103
|
product = @results.products.first
|
121
|
-
|
122
|
-
assert product.url.include?("http://www.insound.com/Zen-Arcade-Vinyl-LP-Husker-Du/P/INS13241/&from=")
|
104
|
+
assert product.url
|
123
105
|
assert_equal 'Husker Du', product.artist_name
|
124
106
|
assert_equal 'Zen Arcade', product.title
|
125
107
|
assert_equal 'Vinyl LP', product.format
|
126
108
|
assert_equal 'INS13241', product.id
|
127
109
|
|
128
110
|
artist = @results.artists.first
|
129
|
-
assert artist.url
|
111
|
+
assert artist.url
|
130
112
|
assert_equal 'Husker Du', artist.name
|
131
113
|
assert_equal 21544, artist.id
|
132
114
|
end
|
@@ -1,38 +1,45 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
1
|
<insound_query_response>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
2
|
+
<warnings/>
|
3
|
+
<errors/>
|
4
|
+
<product_matches>
|
5
|
+
<product>
|
6
|
+
<url>
|
7
|
+
http://www.insound.com/Invented-Vinyl-LP-Jimmy-Eat-World/P/INS79668/&from=86902
|
8
|
+
</url>
|
9
|
+
<artist_name>Jimmy Eat World</artist_name>
|
10
|
+
<title>Invented</title>
|
11
|
+
<format>Vinyl LP</format>
|
12
|
+
<product_id>INS79668</product_id>
|
13
|
+
</product>
|
14
|
+
<product>
|
15
|
+
<url>
|
16
|
+
http://www.insound.com/Chase-This-Light-Vinyl-LP-Jimmy-Eat-World/P/INS39744/&from=86902
|
17
|
+
</url>
|
18
|
+
<artist_name>Jimmy Eat World</artist_name>
|
19
|
+
<title>Chase This Light</title>
|
20
|
+
<format>Vinyl LP</format>
|
21
|
+
<product_id>INS39744</product_id>
|
22
|
+
</product>
|
23
|
+
<product>
|
24
|
+
<url>
|
25
|
+
http://www.insound.com/Bleed-American-Vinyl-3xLP-Jimmy-Eat-World/P/INS111472/&from=86902
|
26
|
+
</url>
|
27
|
+
<artist_name>Jimmy Eat World</artist_name>
|
28
|
+
<title>Bleed American</title>
|
29
|
+
<format>Vinyl 3xLP</format>
|
30
|
+
<product_id>INS111472</product_id>
|
31
|
+
</product>
|
32
|
+
</product_matches>
|
33
|
+
<artist_matches>
|
34
|
+
<artist>
|
35
|
+
<artist_name>Jimmy Eat World</artist_name>
|
36
|
+
<url>
|
37
|
+
http://www.insound.com/Jimmy-Eat-World/A/19191/&from=86902
|
38
|
+
</url>
|
39
|
+
<artist_id>19191</artist_id>
|
40
|
+
</artist>
|
41
|
+
</artist_matches>
|
42
|
+
<total_results>4</total_results>
|
43
|
+
<total_product_results>3</total_product_results>
|
44
|
+
<total_artist_results>1</total_artist_results>
|
38
45
|
</insound_query_response>
|
data/test/webmock/maxresults.xml
CHANGED
@@ -1,257 +1,332 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
1
|
<insound_query_response>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
</
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
</
|
2
|
+
<warnings/>
|
3
|
+
<errors/>
|
4
|
+
<product_matches>
|
5
|
+
<product>
|
6
|
+
<url>
|
7
|
+
http://www.insound.com/Funeral-CD-Arcade-Fire/P/INS23877/&from=86902
|
8
|
+
</url>
|
9
|
+
<artist_name>Arcade Fire</artist_name>
|
10
|
+
<title>Funeral</title>
|
11
|
+
<format>CD</format>
|
12
|
+
<product_id>INS23877</product_id>
|
13
|
+
</product>
|
14
|
+
<product>
|
15
|
+
<url>
|
16
|
+
http://www.insound.com/The-Suburbs-Vinyl-2xLP-Arcade-Fire/P/INS76692/&from=86902
|
17
|
+
</url>
|
18
|
+
<artist_name>Arcade Fire</artist_name>
|
19
|
+
<title>The Suburbs</title>
|
20
|
+
<format>Vinyl 2xLP</format>
|
21
|
+
<product_id>INS76692</product_id>
|
22
|
+
</product>
|
23
|
+
<product>
|
24
|
+
<url>
|
25
|
+
http://www.insound.com/Neon-Bible-Vinyl-LP-Arcade-Fire/P/INS33679/&from=86902
|
26
|
+
</url>
|
27
|
+
<artist_name>Arcade Fire</artist_name>
|
28
|
+
<title>Neon Bible</title>
|
29
|
+
<format>Vinyl LP</format>
|
30
|
+
<product_id>INS33679</product_id>
|
31
|
+
</product>
|
32
|
+
<product>
|
33
|
+
<url>
|
34
|
+
http://www.insound.com/Neon-Bible-CD-Arcade-Fire/P/INS33678/&from=86902
|
35
|
+
</url>
|
36
|
+
<artist_name>Arcade Fire</artist_name>
|
37
|
+
<title>Neon Bible</title>
|
38
|
+
<format>CD</format>
|
39
|
+
<product_id>INS33678</product_id>
|
40
|
+
</product>
|
41
|
+
<product>
|
42
|
+
<url>
|
43
|
+
http://www.insound.com/Neon-Bible-Deluxe-Edition-CD-Arcade-Fire/P/INS33683/&from=86902
|
44
|
+
</url>
|
45
|
+
<artist_name>Arcade Fire</artist_name>
|
46
|
+
<title>Neon Bible (Deluxe Edition)</title>
|
47
|
+
<format>CD</format>
|
48
|
+
<product_id>INS33683</product_id>
|
49
|
+
</product>
|
50
|
+
<product>
|
51
|
+
<url>
|
52
|
+
http://www.insound.com/Funeral-Reissue-Vinyl-LP-Arcade-Fire/P/INS70891/&from=86902
|
53
|
+
</url>
|
54
|
+
<artist_name>Arcade Fire</artist_name>
|
55
|
+
<title>Funeral (Reissue)</title>
|
56
|
+
<format>Vinyl LP</format>
|
57
|
+
<product_id>INS70891</product_id>
|
58
|
+
</product>
|
59
|
+
<product>
|
60
|
+
<url>
|
61
|
+
http://www.insound.com/Arcade-Fire-CDep-Arcade-Fire/P/INS26865/&from=86902
|
62
|
+
</url>
|
63
|
+
<artist_name>Arcade Fire</artist_name>
|
64
|
+
<title>Arcade Fire</title>
|
65
|
+
<format>CDep</format>
|
66
|
+
<product_id>INS26865</product_id>
|
67
|
+
</product>
|
68
|
+
<product>
|
69
|
+
<url>
|
70
|
+
http://www.insound.com/May-29-30-2007-Show-Poster-poster-Arcade-Fire/P/INS36391/&from=86902
|
71
|
+
</url>
|
72
|
+
<artist_name>Arcade Fire</artist_name>
|
73
|
+
<title>May 29 & 30, 2007 Show Poster</title>
|
74
|
+
<format>Poster</format>
|
75
|
+
<product_id>INS36391</product_id>
|
76
|
+
</product>
|
77
|
+
<product>
|
78
|
+
<url>
|
79
|
+
http://www.insound.com/The-Suburbs-CD-Arcade-Fire/P/INS76693/&from=86902
|
80
|
+
</url>
|
81
|
+
<artist_name>Arcade Fire</artist_name>
|
82
|
+
<title>The Suburbs</title>
|
83
|
+
<format>CD</format>
|
84
|
+
<product_id>INS76693</product_id>
|
85
|
+
</product>
|
86
|
+
<product>
|
87
|
+
<url>
|
88
|
+
http://www.insound.com/Miroir-Noir-Deluxe-Edition-2xDVD-Arcade-Fire/P/INS54522/&from=86902
|
89
|
+
</url>
|
90
|
+
<artist_name>Arcade Fire</artist_name>
|
91
|
+
<title>Miroir Noir (Deluxe Edition)</title>
|
92
|
+
<format>2xDVD</format>
|
93
|
+
<product_id>INS54522</product_id>
|
94
|
+
</product>
|
95
|
+
<product>
|
96
|
+
<url>
|
97
|
+
http://www.insound.com/The-Suburbs-MP3-Arcade-Fire/P/INS78922/&from=86902
|
98
|
+
</url>
|
99
|
+
<artist_name>Arcade Fire</artist_name>
|
100
|
+
<title>The Suburbs</title>
|
101
|
+
<format>MP3</format>
|
102
|
+
<product_id>INS78922</product_id>
|
103
|
+
</product>
|
104
|
+
<product>
|
105
|
+
<url>
|
106
|
+
http://www.insound.com/The-Suburbs-Deluxe-Edition-CD-and-DVD-Arcade-Fire/P/INS96835/&from=86902
|
107
|
+
</url>
|
108
|
+
<artist_name>Arcade Fire</artist_name>
|
109
|
+
<title>The Suburbs (Deluxe Edition)</title>
|
110
|
+
<format>CD+DVD</format>
|
111
|
+
<product_id>INS96835</product_id>
|
112
|
+
</product>
|
113
|
+
<product>
|
114
|
+
<url>
|
115
|
+
http://www.insound.com/Outlands-Vinyl-LP-Deep-Sea-Arcade/P/INS108373/&from=86902
|
116
|
+
</url>
|
117
|
+
<artist_name>Deep Sea Arcade</artist_name>
|
118
|
+
<title>Outlands</title>
|
119
|
+
<format>Vinyl LP</format>
|
120
|
+
<product_id>INS108373</product_id>
|
121
|
+
</product>
|
122
|
+
<product>
|
123
|
+
<url>
|
124
|
+
http://www.insound.com/Power-Out-CDep-Arcade-Fire/P/INS26778/&from=86902
|
125
|
+
</url>
|
126
|
+
<artist_name>Arcade Fire</artist_name>
|
127
|
+
<title>Power Out</title>
|
128
|
+
<format>CDep</format>
|
129
|
+
<product_id>INS26778</product_id>
|
130
|
+
</product>
|
131
|
+
<product>
|
132
|
+
<url>
|
133
|
+
http://www.insound.com/Spring-Tour-2011-3-Chicago-poster-Arcade-Fire/P/INS95618/&from=86902
|
134
|
+
</url>
|
135
|
+
<artist_name>Arcade Fire</artist_name>
|
136
|
+
<title>Spring Tour 2011 #3 (Chicago)</title>
|
137
|
+
<format>Poster</format>
|
138
|
+
<product_id>INS95618</product_id>
|
139
|
+
</product>
|
140
|
+
<product>
|
141
|
+
<url>
|
142
|
+
http://www.insound.com/Miroir-Noir-DVD-Arcade-Fire/P/INS54521/&from=86902
|
143
|
+
</url>
|
144
|
+
<artist_name>Arcade Fire</artist_name>
|
145
|
+
<title>Miroir Noir</title>
|
146
|
+
<format>DVD</format>
|
147
|
+
<product_id>INS54521</product_id>
|
148
|
+
</product>
|
149
|
+
<product>
|
150
|
+
<url>
|
151
|
+
http://www.insound.com/December-5-6-2010-Show-Poster-poster-Arcade-Fire/P/INS90082/&from=86902
|
152
|
+
</url>
|
153
|
+
<artist_name>Arcade Fire</artist_name>
|
154
|
+
<title>December 5-6, 2010 Show Poster</title>
|
155
|
+
<format>Poster</format>
|
156
|
+
<product_id>INS90082</product_id>
|
157
|
+
</product>
|
158
|
+
<product>
|
159
|
+
<url>
|
160
|
+
http://www.insound.com/June-30-2011-Show-Poster-poster-Arcade-Fire/P/INS98765/&from=86902
|
161
|
+
</url>
|
162
|
+
<artist_name>Arcade Fire</artist_name>
|
163
|
+
<title>June 30, 2011 Show Poster</title>
|
164
|
+
<format>Poster</format>
|
165
|
+
<product_id>INS98765</product_id>
|
166
|
+
</product>
|
167
|
+
<product>
|
168
|
+
<url>
|
169
|
+
http://www.insound.com/Spring-Tour-2011-1-West-Coast-poster-Arcade-Fire/P/INS95619/&from=86902
|
170
|
+
</url>
|
171
|
+
<artist_name>Arcade Fire</artist_name>
|
172
|
+
<title>Spring Tour 2011 #1 (West Coast)</title>
|
173
|
+
<format>Poster</format>
|
174
|
+
<product_id>INS95619</product_id>
|
175
|
+
</product>
|
176
|
+
<product>
|
177
|
+
<url>
|
178
|
+
http://www.insound.com/Funeral-MP3-Arcade-Fire/P/INS55433/&from=86902
|
179
|
+
</url>
|
180
|
+
<artist_name>Arcade Fire</artist_name>
|
181
|
+
<title>Funeral</title>
|
182
|
+
<format>MP3</format>
|
183
|
+
<product_id>INS55433</product_id>
|
184
|
+
</product>
|
185
|
+
<product>
|
186
|
+
<url>
|
187
|
+
http://www.insound.com/July-12-2010-Show-Poster-poster-Arcade-Fire/P/INS80896/&from=86902
|
188
|
+
</url>
|
189
|
+
<artist_name>Arcade Fire</artist_name>
|
190
|
+
<title>July 12, 2010 Show Poster</title>
|
191
|
+
<format>Poster</format>
|
192
|
+
<product_id>INS80896</product_id>
|
193
|
+
</product>
|
194
|
+
<product>
|
195
|
+
<url>
|
196
|
+
http://www.insound.com/September-21-and-22-2011-Show-Poster-poster-Arcade-Fire/P/INS106729/&from=86902
|
197
|
+
</url>
|
198
|
+
<artist_name>Arcade Fire</artist_name>
|
199
|
+
<title>September 21 and 22, 2011 Show Poster</title>
|
200
|
+
<format>Poster</format>
|
201
|
+
<product_id>INS106729</product_id>
|
202
|
+
</product>
|
203
|
+
<product>
|
204
|
+
<url>
|
205
|
+
http://www.insound.com/Spring-Tour-2011-4-Tennessee-and-Texas-poster-Arcade-Fire/P/INS95616/&from=86902
|
206
|
+
</url>
|
207
|
+
<artist_name>Arcade Fire</artist_name>
|
208
|
+
<title>Spring Tour 2011 #4 (Tennessee and Texas)</title>
|
209
|
+
<format>Poster</format>
|
210
|
+
<product_id>INS95616</product_id>
|
211
|
+
</product>
|
212
|
+
<product>
|
213
|
+
<url>
|
214
|
+
http://www.insound.com/Europe-Tour-2011-poster-Arcade-Fire/P/INS98764/&from=86902
|
215
|
+
</url>
|
216
|
+
<artist_name>Arcade Fire</artist_name>
|
217
|
+
<title>Europe Tour 2011</title>
|
218
|
+
<format>Poster</format>
|
219
|
+
<product_id>INS98764</product_id>
|
220
|
+
</product>
|
221
|
+
<product>
|
222
|
+
<url>
|
223
|
+
http://www.insound.com/The-Suburbs-Deluxe-MP3-Arcade-Fire/P/INS98280/&from=86902
|
224
|
+
</url>
|
225
|
+
<artist_name>Arcade Fire</artist_name>
|
226
|
+
<title>The Suburbs Deluxe</title>
|
227
|
+
<format>MP3</format>
|
228
|
+
<product_id>INS98280</product_id>
|
229
|
+
</product>
|
230
|
+
<product>
|
231
|
+
<url>
|
232
|
+
http://www.insound.com/Solo-Singles-Series-7-Vinyl-7inch-Trance-and-The-Arcade/P/INS17162/&from=86902
|
233
|
+
</url>
|
234
|
+
<artist_name>Trance and The Arcade</artist_name>
|
235
|
+
<title>Solo Singles Series 7</title>
|
236
|
+
<format>Vinyl 7"</format>
|
237
|
+
<product_id>INS17162</product_id>
|
238
|
+
</product>
|
239
|
+
<product>
|
240
|
+
<url>
|
241
|
+
http://www.insound.com/Neon-Bible-MP3-Arcade-Fire/P/INS55434/&from=86902
|
242
|
+
</url>
|
243
|
+
<artist_name>Arcade Fire</artist_name>
|
244
|
+
<title>Neon Bible</title>
|
245
|
+
<format>MP3</format>
|
246
|
+
<product_id>INS55434</product_id>
|
247
|
+
</product>
|
248
|
+
<product>
|
249
|
+
<url>
|
250
|
+
http://www.insound.com/Canadian-Tour-September-2010-Show-Poster-poster-Arcade-Fire/P/INS89256/&from=86902
|
251
|
+
</url>
|
252
|
+
<artist_name>Arcade Fire</artist_name>
|
253
|
+
<title>Canadian Tour, September 2010 Show Poster</title>
|
254
|
+
<format>Poster</format>
|
255
|
+
<product_id>INS89256</product_id>
|
256
|
+
</product>
|
257
|
+
<product>
|
258
|
+
<url>
|
259
|
+
http://www.insound.com/December-8-12-2010-Show-Poster-poster-Arcade-Fire/P/INS90081/&from=86902
|
260
|
+
</url>
|
261
|
+
<artist_name>Arcade Fire</artist_name>
|
262
|
+
<title>December 8-12, 2010 Show Poster</title>
|
263
|
+
<format>Poster</format>
|
264
|
+
<product_id>INS90081</product_id>
|
265
|
+
</product>
|
266
|
+
<product>
|
267
|
+
<url>
|
268
|
+
http://www.insound.com/The-String-Quartet-Tribute-to-Arcade-Fires-Funereal-MP3-Arcade-Fire-String-Quartet-Tribute/P/INS39454/&from=86902
|
269
|
+
</url>
|
270
|
+
<artist_name>Arcade Fire String Quartet Tribute</artist_name>
|
271
|
+
<title>
|
272
|
+
The String Quartet Tribute to Arcade Fire's Funereal
|
273
|
+
</title>
|
274
|
+
<format>MP3</format>
|
275
|
+
<product_id>INS39454</product_id>
|
276
|
+
</product>
|
277
|
+
</product_matches>
|
278
|
+
<artist_matches>
|
279
|
+
<artist>
|
280
|
+
<artist_name>Arcade Fire</artist_name>
|
281
|
+
<url>
|
282
|
+
http://www.insound.com/Arcade-Fire/A/29908/&from=86902
|
283
|
+
</url>
|
284
|
+
<artist_id>29908</artist_id>
|
285
|
+
</artist>
|
286
|
+
<artist>
|
287
|
+
<artist_name>Arcade Fire String Quartet Tribute</artist_name>
|
288
|
+
<url>
|
289
|
+
http://www.insound.com/Arcade-Fire-String-Quartet-Tribute/A/34443/&from=86902
|
290
|
+
</url>
|
291
|
+
<artist_id>34443</artist_id>
|
292
|
+
</artist>
|
293
|
+
<artist>
|
294
|
+
<artist_name>Deep Sea Arcade</artist_name>
|
295
|
+
<url>
|
296
|
+
http://www.insound.com/Deep-Sea-Arcade/A/51254/&from=86902
|
297
|
+
</url>
|
298
|
+
<artist_id>51254</artist_id>
|
299
|
+
</artist>
|
300
|
+
<artist>
|
301
|
+
<artist_name>Flashlight Arcade</artist_name>
|
302
|
+
<url>
|
303
|
+
http://www.insound.com/Flashlight-Arcade/A/30088/&from=86902
|
304
|
+
</url>
|
305
|
+
<artist_id>30088</artist_id>
|
306
|
+
</artist>
|
307
|
+
<artist>
|
308
|
+
<artist_name>LCD Soundsystem / Arcade Fire</artist_name>
|
309
|
+
<url>
|
310
|
+
http://www.insound.com/LCD-Soundsystem-Arcade-Fire/A/34698/&from=86902
|
311
|
+
</url>
|
312
|
+
<artist_id>34698</artist_id>
|
313
|
+
</artist>
|
314
|
+
<artist>
|
315
|
+
<artist_name>LCD Soundsystem/Arcade Fire</artist_name>
|
316
|
+
<url>
|
317
|
+
http://www.insound.com/LCD-SoundsystemArcade-Fire/A/38758/&from=86902
|
318
|
+
</url>
|
319
|
+
<artist_id>38758</artist_id>
|
320
|
+
</artist>
|
321
|
+
<artist>
|
322
|
+
<artist_name>Trance and The Arcade</artist_name>
|
323
|
+
<url>
|
324
|
+
http://www.insound.com/Trance-and-The-Arcade/A/20727/&from=86902
|
325
|
+
</url>
|
326
|
+
<artist_id>20727</artist_id>
|
327
|
+
</artist>
|
328
|
+
</artist_matches>
|
329
|
+
<total_results>37</total_results>
|
330
|
+
<total_product_results>30</total_product_results>
|
331
|
+
<total_artist_results>7</total_artist_results>
|
332
|
+
</insound_query_response>
|
@@ -1,11 +1,12 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
1
|
<insound_query_response>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
2
|
+
<warnings/>
|
3
|
+
<errors/>
|
4
|
+
<product_matches/>
|
5
|
+
<artist_matches/>
|
6
|
+
<total_results>0</total_results>
|
7
|
+
<total_product_results>0</total_product_results>
|
8
|
+
<total_artist_results>0</total_artist_results>
|
9
|
+
<search_url>
|
10
|
+
http://www.insound.com/search/?query=xxcxccxcx&from=86902
|
11
|
+
</search_url>
|
12
|
+
</insound_query_response>
|
data/test/webmock/zen_arcade.xml
CHANGED
@@ -1,31 +1,36 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
1
|
<insound_query_response>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
</
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
</
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
</
|
2
|
+
<warnings/>
|
3
|
+
<errors/>
|
4
|
+
<product_matches>
|
5
|
+
<product>
|
6
|
+
<url>
|
7
|
+
http://www.insound.com/Zen-Arcade-Vinyl-LP-Husker-Du/P/INS13241/&from=86902
|
8
|
+
</url>
|
9
|
+
<artist_name>Husker Du</artist_name>
|
10
|
+
<title>Zen Arcade</title>
|
11
|
+
<format>Vinyl LP</format>
|
12
|
+
<product_id>INS13241</product_id>
|
13
|
+
</product>
|
14
|
+
<product>
|
15
|
+
<url>
|
16
|
+
http://www.insound.com/Zen-Arcade-CD-Husker-Du/P/INS58556/&from=86902
|
17
|
+
</url>
|
18
|
+
<artist_name>Husker Du</artist_name>
|
19
|
+
<title>Zen Arcade</title>
|
20
|
+
<format>CD</format>
|
21
|
+
<product_id>INS58556</product_id>
|
22
|
+
</product>
|
23
|
+
</product_matches>
|
24
|
+
<artist_matches>
|
25
|
+
<artist>
|
26
|
+
<artist_name>Husker Du</artist_name>
|
27
|
+
<url>
|
28
|
+
http://www.insound.com/Husker-Du/A/21544/&from=86902
|
29
|
+
</url>
|
30
|
+
<artist_id>21544</artist_id>
|
31
|
+
</artist>
|
32
|
+
</artist_matches>
|
33
|
+
<total_results>3</total_results>
|
34
|
+
<total_product_results>2</total_product_results>
|
35
|
+
<total_artist_results>1</total_artist_results>
|
36
|
+
</insound_query_response>
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: insound_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0
|
5
|
+
version: 0.1.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Zachary Kloepping
|
@@ -109,6 +109,7 @@ files:
|
|
109
109
|
- lib/insound_api.rb
|
110
110
|
- lib/insound_api/artist.rb
|
111
111
|
- lib/insound_api/config.rb
|
112
|
+
- lib/insound_api/object_base.rb
|
112
113
|
- lib/insound_api/product.rb
|
113
114
|
- lib/insound_api/query.rb
|
114
115
|
- lib/insound_api/request.rb
|
@@ -137,7 +138,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
137
138
|
requirements:
|
138
139
|
- - ">="
|
139
140
|
- !ruby/object:Gem::Version
|
140
|
-
hash:
|
141
|
+
hash: 466470210414934306
|
141
142
|
segments:
|
142
143
|
- 0
|
143
144
|
version: "0"
|