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 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 [insound.com Web Service API for affiliates][api_docs].
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
- ## Setup
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.3
1
+ 0.1.0
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "insound_api"
8
- s.version = "0.0.3"
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",
@@ -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
@@ -1,13 +1,18 @@
1
1
  module InsoundApi
2
- class Artist
2
+ class Artist < ObjectBase
3
3
 
4
- attr_reader :url, :id, :name
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 initialize(node)
7
- @url = Results.parse_str('url', node)
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
@@ -1,16 +1,16 @@
1
1
  module InsoundApi
2
- class Product
2
+ class Product < ObjectBase
3
3
 
4
- attr_reader :url, :id, :title
5
- attr_reader :artist_name, :format
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 initialize(node)
9
- @url = Results.parse_str('url', node)
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
@@ -1,41 +1,66 @@
1
1
  module InsoundApi
2
2
  class Results
3
3
 
4
- attr_reader :search_url, :total_results
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(doc)
10
- @search_url = Results.parse_str('search_url', doc)
11
- @products = Results.parse_objects('product_matches product', Product, doc)
12
- @products_total = Results.parse_int('total_product_results', doc)
13
- @artists = Results.parse_objects('artist_matches artist', Artist, doc)
14
- @artists_total = Results.parse_int('total_artist_results', doc)
15
- @total_results = Results.parse_int('total_results', doc)
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
- def self.parse_objects(selector, klass, doc)
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.inner_text.strip.to_i
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.inner_text.strip
63
+ nodes.first.inner_html.strip
39
64
  end
40
65
  end
41
66
 
@@ -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
- should 'return empty stuff' do
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.include?("http://www.insound.com/search/?query=xxcxccxcx&from=")
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.include?("http://www.insound.com/Invented-Vinyl-LP-Jimmy-Eat-World/P/INS79668/&from=")
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.include?("http://www.insound.com/Jimmy-Eat-World/A/19191/&from=")
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.include?("http://www.insound.com/Funeral-CD-Arcade-Fire/P/INS23877/&from=")
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.include?("http://www.insound.com/Arcade-Fire/A/29908/&from=")
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.include?("http://www.insound.com/Husker-Du/A/21544/&from=")
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
- <warnings></warnings>
4
- <errors></errors>
5
- <product_matches>
6
- <product>
7
- <url>http://www.insound.com/Invented-Vinyl-LP-Jimmy-Eat-World/P/INS79668/&amp;from=86902</url>
8
- <artist_name>Jimmy Eat World</artist_name>
9
- <title>Invented</title>
10
- <format>Vinyl LP</format>
11
- <product_id>INS79668</product_id>
12
- </product>
13
- <product>
14
- <url>http://www.insound.com/Chase-This-Light-Vinyl-LP-Jimmy-Eat-World/P/INS39744/&amp;from=86902</url>
15
- <artist_name>Jimmy Eat World</artist_name>
16
- <title>Chase This Light</title>
17
- <format>Vinyl LP</format>
18
- <product_id>INS39744</product_id>
19
- </product>
20
- <product>
21
- <url>http://www.insound.com/Bleed-American-Vinyl-3xLP-Jimmy-Eat-World/P/INS111472/&amp;from=86902</url>
22
- <artist_name>Jimmy Eat World</artist_name>
23
- <title>Bleed American</title>
24
- <format>Vinyl 3xLP</format>
25
- <product_id>INS111472</product_id>
26
- </product>
27
- </product_matches>
28
- <artist_matches>
29
- <artist>
30
- <artist_name>Jimmy Eat World</artist_name>
31
- <url>http://www.insound.com/Jimmy-Eat-World/A/19191/&amp;from=86902</url>
32
- <artist_id>19191</artist_id>
33
- </artist>
34
- </artist_matches>
35
- <total_results>4</total_results>
36
- <total_product_results>3</total_product_results>
37
- <total_artist_results>1</total_artist_results>
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>
@@ -1,257 +1,332 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
1
  <insound_query_response>
3
- <warnings></warnings>
4
- <errors></errors>
5
- <product_matches>
6
- <product>
7
- <url>http://www.insound.com/Funeral-CD-Arcade-Fire/P/INS23877/&amp;from=86902</url>
8
- <artist_name>Arcade Fire</artist_name>
9
- <title>Funeral </title>
10
- <format>CD</format>
11
- <product_id>INS23877</product_id>
12
- </product>
13
- <product>
14
- <url>http://www.insound.com/The-Suburbs-Vinyl-2xLP-Arcade-Fire/P/INS76692/&amp;from=86902</url>
15
- <artist_name>Arcade Fire</artist_name>
16
- <title>The Suburbs</title>
17
- <format>Vinyl 2xLP</format>
18
- <product_id>INS76692</product_id>
19
- </product>
20
- <product>
21
- <url>http://www.insound.com/Neon-Bible-Vinyl-LP-Arcade-Fire/P/INS33679/&amp;from=86902</url>
22
- <artist_name>Arcade Fire</artist_name>
23
- <title>Neon Bible</title>
24
- <format>Vinyl LP</format>
25
- <product_id>INS33679</product_id>
26
- </product>
27
- <product>
28
- <url>http://www.insound.com/Neon-Bible-CD-Arcade-Fire/P/INS33678/&amp;from=86902</url>
29
- <artist_name>Arcade Fire</artist_name>
30
- <title>Neon Bible</title>
31
- <format>CD</format>
32
- <product_id>INS33678</product_id>
33
- </product>
34
- <product>
35
- <url>http://www.insound.com/Neon-Bible-Deluxe-Edition-CD-Arcade-Fire/P/INS33683/&amp;from=86902</url>
36
- <artist_name>Arcade Fire</artist_name>
37
- <title>Neon Bible (Deluxe Edition)</title>
38
- <format>CD</format>
39
- <product_id>INS33683</product_id>
40
- </product>
41
- <product>
42
- <url>http://www.insound.com/Funeral-Reissue-Vinyl-LP-Arcade-Fire/P/INS70891/&amp;from=86902</url>
43
- <artist_name>Arcade Fire</artist_name>
44
- <title>Funeral (Reissue)</title>
45
- <format>Vinyl LP</format>
46
- <product_id>INS70891</product_id>
47
- </product>
48
- <product>
49
- <url>http://www.insound.com/Arcade-Fire-CDep-Arcade-Fire/P/INS26865/&amp;from=86902</url>
50
- <artist_name>Arcade Fire</artist_name>
51
- <title>Arcade Fire </title>
52
- <format>CDep</format>
53
- <product_id>INS26865</product_id>
54
- </product>
55
- <product>
56
- <url>http://www.insound.com/May-29-30-2007-Show-Poster-poster-Arcade-Fire/P/INS36391/&amp;from=86902</url>
57
- <artist_name>Arcade Fire</artist_name>
58
- <title>May 29 &amp; 30, 2007 Show Poster</title>
59
- <format>Poster</format>
60
- <product_id>INS36391</product_id>
61
- </product>
62
- <product>
63
- <url>http://www.insound.com/The-Suburbs-CD-Arcade-Fire/P/INS76693/&amp;from=86902</url>
64
- <artist_name>Arcade Fire</artist_name>
65
- <title>The Suburbs</title>
66
- <format>CD</format>
67
- <product_id>INS76693</product_id>
68
- </product>
69
- <product>
70
- <url>http://www.insound.com/Miroir-Noir-Deluxe-Edition-2xDVD-Arcade-Fire/P/INS54522/&amp;from=86902</url>
71
- <artist_name>Arcade Fire</artist_name>
72
- <title>Miroir Noir (Deluxe Edition)</title>
73
- <format>2xDVD</format>
74
- <product_id>INS54522</product_id>
75
- </product>
76
- <product>
77
- <url>http://www.insound.com/The-Suburbs-MP3-Arcade-Fire/P/INS78922/&amp;from=86902</url>
78
- <artist_name>Arcade Fire</artist_name>
79
- <title>The Suburbs</title>
80
- <format>MP3</format>
81
- <product_id>INS78922</product_id>
82
- </product>
83
- <product>
84
- <url>http://www.insound.com/The-Suburbs-Deluxe-Edition-CD-and-DVD-Arcade-Fire/P/INS96835/&amp;from=86902</url>
85
- <artist_name>Arcade Fire</artist_name>
86
- <title>The Suburbs (Deluxe Edition)</title>
87
- <format>CD+DVD</format>
88
- <product_id>INS96835</product_id>
89
- </product>
90
- <product>
91
- <url>http://www.insound.com/Outlands-Vinyl-LP-Deep-Sea-Arcade/P/INS108373/&amp;from=86902</url>
92
- <artist_name>Deep Sea Arcade</artist_name>
93
- <title>Outlands</title>
94
- <format>Vinyl LP</format>
95
- <product_id>INS108373</product_id>
96
- </product>
97
- <product>
98
- <url>http://www.insound.com/Power-Out-CDep-Arcade-Fire/P/INS26778/&amp;from=86902</url>
99
- <artist_name>Arcade Fire</artist_name>
100
- <title>Power Out</title>
101
- <format>CDep</format>
102
- <product_id>INS26778</product_id>
103
- </product>
104
- <product>
105
- <url>http://www.insound.com/Spring-Tour-2011-3-Chicago-poster-Arcade-Fire/P/INS95618/&amp;from=86902</url>
106
- <artist_name>Arcade Fire</artist_name>
107
- <title>Spring Tour 2011 #3 (Chicago)</title>
108
- <format>Poster</format>
109
- <product_id>INS95618</product_id>
110
- </product>
111
- <product>
112
- <url>http://www.insound.com/Miroir-Noir-DVD-Arcade-Fire/P/INS54521/&amp;from=86902</url>
113
- <artist_name>Arcade Fire</artist_name>
114
- <title>Miroir Noir</title>
115
- <format>DVD</format>
116
- <product_id>INS54521</product_id>
117
- </product>
118
- <product>
119
- <url>http://www.insound.com/December-5-6-2010-Show-Poster-poster-Arcade-Fire/P/INS90082/&amp;from=86902</url>
120
- <artist_name>Arcade Fire</artist_name>
121
- <title>December 5-6, 2010 Show Poster</title>
122
- <format>Poster</format>
123
- <product_id>INS90082</product_id>
124
- </product>
125
- <product>
126
- <url>http://www.insound.com/June-30-2011-Show-Poster-poster-Arcade-Fire/P/INS98765/&amp;from=86902</url>
127
- <artist_name>Arcade Fire</artist_name>
128
- <title>June 30, 2011 Show Poster</title>
129
- <format>Poster</format>
130
- <product_id>INS98765</product_id>
131
- </product>
132
- <product>
133
- <url>http://www.insound.com/Spring-Tour-2011-1-West-Coast-poster-Arcade-Fire/P/INS95619/&amp;from=86902</url>
134
- <artist_name>Arcade Fire</artist_name>
135
- <title>Spring Tour 2011 #1 (West Coast)</title>
136
- <format>Poster</format>
137
- <product_id>INS95619</product_id>
138
- </product>
139
- <product>
140
- <url>http://www.insound.com/Funeral-MP3-Arcade-Fire/P/INS55433/&amp;from=86902</url>
141
- <artist_name>Arcade Fire</artist_name>
142
- <title>Funeral</title>
143
- <format>MP3</format>
144
- <product_id>INS55433</product_id>
145
- </product>
146
- <product>
147
- <url>http://www.insound.com/July-12-2010-Show-Poster-poster-Arcade-Fire/P/INS80896/&amp;from=86902</url>
148
- <artist_name>Arcade Fire</artist_name>
149
- <title>July 12, 2010 Show Poster</title>
150
- <format>Poster</format>
151
- <product_id>INS80896</product_id>
152
- </product>
153
- <product>
154
- <url>http://www.insound.com/September-21-and-22-2011-Show-Poster-poster-Arcade-Fire/P/INS106729/&amp;from=86902</url>
155
- <artist_name>Arcade Fire</artist_name>
156
- <title>September 21 and 22, 2011 Show Poster</title>
157
- <format>Poster</format>
158
- <product_id>INS106729</product_id>
159
- </product>
160
- <product>
161
- <url>http://www.insound.com/Spring-Tour-2011-4-Tennessee-and-Texas-poster-Arcade-Fire/P/INS95616/&amp;from=86902</url>
162
- <artist_name>Arcade Fire</artist_name>
163
- <title>Spring Tour 2011 #4 (Tennessee and Texas)</title>
164
- <format>Poster</format>
165
- <product_id>INS95616</product_id>
166
- </product>
167
- <product>
168
- <url>http://www.insound.com/Europe-Tour-2011-poster-Arcade-Fire/P/INS98764/&amp;from=86902</url>
169
- <artist_name>Arcade Fire</artist_name>
170
- <title>Europe Tour 2011</title>
171
- <format>Poster</format>
172
- <product_id>INS98764</product_id>
173
- </product>
174
- <product>
175
- <url>http://www.insound.com/The-Suburbs-Deluxe-MP3-Arcade-Fire/P/INS98280/&amp;from=86902</url>
176
- <artist_name>Arcade Fire</artist_name>
177
- <title>The Suburbs Deluxe</title>
178
- <format>MP3</format>
179
- <product_id>INS98280</product_id>
180
- </product>
181
- <product>
182
- <url>http://www.insound.com/Solo-Singles-Series-7-Vinyl-7inch-Trance-and-The-Arcade/P/INS17162/&amp;from=86902</url>
183
- <artist_name>Trance and The Arcade</artist_name>
184
- <title>Solo Singles Series 7</title>
185
- <format>Vinyl 7&amp;quot;</format>
186
- <product_id>INS17162</product_id>
187
- </product>
188
- <product>
189
- <url>http://www.insound.com/Neon-Bible-MP3-Arcade-Fire/P/INS55434/&amp;from=86902</url>
190
- <artist_name>Arcade Fire</artist_name>
191
- <title>Neon Bible</title>
192
- <format>MP3</format>
193
- <product_id>INS55434</product_id>
194
- </product>
195
- <product>
196
- <url>http://www.insound.com/Canadian-Tour-September-2010-Show-Poster-poster-Arcade-Fire/P/INS89256/&amp;from=86902</url>
197
- <artist_name>Arcade Fire</artist_name>
198
- <title>Canadian Tour, September 2010 Show Poster</title>
199
- <format>Poster</format>
200
- <product_id>INS89256</product_id>
201
- </product>
202
- <product>
203
- <url>http://www.insound.com/December-8-12-2010-Show-Poster-poster-Arcade-Fire/P/INS90081/&amp;from=86902</url>
204
- <artist_name>Arcade Fire</artist_name>
205
- <title>December 8-12, 2010 Show Poster</title>
206
- <format>Poster</format>
207
- <product_id>INS90081</product_id>
208
- </product>
209
- <product>
210
- <url>http://www.insound.com/The-String-Quartet-Tribute-to-Arcade-Fires-Funereal-MP3-Arcade-Fire-String-Quartet-Tribute/P/INS39454/&amp;from=86902</url>
211
- <artist_name>Arcade Fire String Quartet Tribute</artist_name>
212
- <title>The String Quartet Tribute to Arcade Fire's Funereal</title>
213
- <format>MP3</format>
214
- <product_id>INS39454</product_id>
215
- </product>
216
- </product_matches>
217
- <artist_matches>
218
- <artist>
219
- <artist_name>Arcade Fire</artist_name>
220
- <url>http://www.insound.com/Arcade-Fire/A/29908/&amp;from=86902</url>
221
- <artist_id>29908</artist_id>
222
- </artist>
223
- <artist>
224
- <artist_name>Arcade Fire String Quartet Tribute</artist_name>
225
- <url>http://www.insound.com/Arcade-Fire-String-Quartet-Tribute/A/34443/&amp;from=86902</url>
226
- <artist_id>34443</artist_id>
227
- </artist>
228
- <artist>
229
- <artist_name>Deep Sea Arcade</artist_name>
230
- <url>http://www.insound.com/Deep-Sea-Arcade/A/51254/&amp;from=86902</url>
231
- <artist_id>51254</artist_id>
232
- </artist>
233
- <artist>
234
- <artist_name>Flashlight Arcade</artist_name>
235
- <url>http://www.insound.com/Flashlight-Arcade/A/30088/&amp;from=86902</url>
236
- <artist_id>30088</artist_id>
237
- </artist>
238
- <artist>
239
- <artist_name>LCD Soundsystem / Arcade Fire</artist_name>
240
- <url>http://www.insound.com/LCD-Soundsystem-Arcade-Fire/A/34698/&amp;from=86902</url>
241
- <artist_id>34698</artist_id>
242
- </artist>
243
- <artist>
244
- <artist_name>LCD Soundsystem/Arcade Fire</artist_name>
245
- <url>http://www.insound.com/LCD-SoundsystemArcade-Fire/A/38758/&amp;from=86902</url>
246
- <artist_id>38758</artist_id>
247
- </artist>
248
- <artist>
249
- <artist_name>Trance and The Arcade</artist_name>
250
- <url>http://www.insound.com/Trance-and-The-Arcade/A/20727/&amp;from=86902</url>
251
- <artist_id>20727</artist_id>
252
- </artist>
253
- </artist_matches>
254
- <total_results>37</total_results>
255
- <total_product_results>30</total_product_results>
256
- <total_artist_results>7</total_artist_results>
257
- </insound_query_response>
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&quot;</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
- <warnings></warnings>
4
- <errors></errors>
5
- <product_matches/>
6
- <artist_matches/>
7
- <total_results>0</total_results>
8
- <total_product_results>0</total_product_results>
9
- <total_artist_results>0</total_artist_results>
10
- <search_url>http://www.insound.com/search/?query=xxcxccxcx&amp;from=86902</search_url>
11
- </insound_query_response>
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>
@@ -1,31 +1,36 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
1
  <insound_query_response>
3
- <warnings></warnings>
4
- <errors></errors>
5
- <product_matches>
6
- <product>
7
- <url>http://www.insound.com/Zen-Arcade-Vinyl-LP-Husker-Du/P/INS13241/&amp;from=86902</url>
8
- <artist_name>Husker Du</artist_name>
9
- <title>Zen Arcade</title>
10
- <format>Vinyl LP</format>
11
- <product_id>INS13241</product_id>
12
- </product>
13
- <product>
14
- <url>http://www.insound.com/Zen-Arcade-CD-Husker-Du/P/INS58556/&amp;from=86902</url>
15
- <artist_name>Husker Du</artist_name>
16
- <title>Zen Arcade</title>
17
- <format>CD</format>
18
- <product_id>INS58556</product_id>
19
- </product>
20
- </product_matches>
21
- <artist_matches>
22
- <artist>
23
- <artist_name>Husker Du</artist_name>
24
- <url>http://www.insound.com/Husker-Du/A/21544/&amp;from=86902</url>
25
- <artist_id>21544</artist_id>
26
- </artist>
27
- </artist_matches>
28
- <total_results>3</total_results>
29
- <total_product_results>2</total_product_results>
30
- <total_artist_results>1</total_artist_results>
31
- </insound_query_response>
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.3
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: 1515459017406889931
141
+ hash: 466470210414934306
141
142
  segments:
142
143
  - 0
143
144
  version: "0"