discogs-wrapper 2.0.0 → 2.1.0

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: 879de19024c8b1f27cba715c5d498a7b1db3c1d8
4
+ data.tar.gz: 180250ade339b57d04d1a7ba6c53566d02ba2e28
5
+ SHA512:
6
+ metadata.gz: df74b45fd3be161aa1ee1fb385337c42121523e53456d303a5772d8d2685d794530623dbd03980ffc7ef1783b6b47f284c6033bb70c484081dafd9903eaa4bca
7
+ data.tar.gz: 3e4ad19c412613397c3940913f46b7cf681428ab3036398784bf63ba709e13895a1b8a5cbeeca1de6ccce965b09b52dccf2bc9cbde493c39c3bba9d8ea66d1e3
data/README.markdown CHANGED
@@ -1,12 +1,6 @@
1
1
  Discogs::Wrapper
2
2
  ================
3
3
 
4
- NOTE
5
- ----
6
- We are currently working on the next release of the API. It will implement all endpoints, pagination, have oAuth support, and use JSON exclusively.
7
-
8
- Expecting to finish late-May, 2014.
9
-
10
4
  ABOUT
11
5
  -----
12
6
  A 100% Ruby wrapper of the Discogs.com API.
@@ -61,7 +55,10 @@ USAGE
61
55
  artist_releases = wrapper.get_artist_releases("329937")
62
56
  release = wrapper.get_release("1529724")
63
57
  label = wrapper.get_label("29515")
64
- search = wrapper.search("Necrovore", :per_page => 10, :type => :artist)
58
+
59
+ # You must be authenticated in order to search. I provide a few ways to do this. See the AUTHENTICATION section below.
60
+ auth_wrapper = Discogs::Wrapper.new("My awesome web app", app_key: "my_key", app_secret: "my_secret")
61
+ search = auth_wrapper.search("Necrovore", :per_page => 10, :type => :artist)
65
62
 
66
63
  artist.name # => "Manilla Road"
67
64
  artist.members.count # => 4
@@ -99,7 +96,12 @@ AUTHENTICATION
99
96
  --------------
100
97
  Many of the API endpoints require the user to be authenticated via oAuth. The library provides support for this.
101
98
 
102
- I've provided [https://github.com/buntine/discogs-oauth](a simple Rails application) that demonstrates how to perform authenticated requests.
99
+ For non user-facing apps (when you only want to authenticate as yourself), you can simply pass your applications :key and :secret options to the appropriate methods. For example:
100
+
101
+ wrapper = Discogs::Wrapper.new("Test OAuth", app_key: "my_key", app_secret: "my_secret")
102
+ results = wrapper.search("Nick Cave")
103
+
104
+ For user-facing apps, I've provided [a simple Rails application](https://github.com/buntine/discogs-oauth) that demonstrates how to perform authenticated requests.
103
105
 
104
106
  Make sure you've created an "app" in your developer settings on the Discogs website. You will need your consumer key and consumer secret.
105
107
 
@@ -132,7 +134,7 @@ AUTHENTICATION
132
134
 
133
135
  # Once you have it, you can also pass your access_token into the constructor.
134
136
  def another_action
135
- @discogs = Discogs::Wrapper.new("Test OAuth", session[:access_token])
137
+ @discogs = Discogs::Wrapper.new("Test OAuth", access_token: session[:access_token])
136
138
 
137
139
  # You can now perform authenticated requests.
138
140
  end
@@ -2,6 +2,31 @@ require 'oauth'
2
2
 
3
3
  module Authentication
4
4
 
5
+ def auth_params
6
+ if self_authenticating?
7
+ {:key => @app_key, :secret => @app_secret}
8
+ else
9
+ {}
10
+ end
11
+ end
12
+
13
+ # Indicates whether this instance is authenticated as a user-facing app.
14
+ # @return [Boolean]
15
+ def user_facing?
16
+ !!@access_token
17
+ end
18
+
19
+ # Indicates whether this instance is self-authenticated.
20
+ # @return [Boolean]
21
+ def self_authenticating?
22
+ !@app_key.nil? and !@app_secret.nil?
23
+ end
24
+
25
+ # @return [Boolean]
26
+ def any_authentication?
27
+ user_facing? or self_authenticating?
28
+ end
29
+
5
30
  # Retrieves an OAuth request token from the Discogs server.
6
31
  # @!macro [new] app_key
7
32
  # @!macro [new] app_secret
@@ -11,7 +36,7 @@ module Authentication
11
36
  def get_request_token(app_key, app_secret, callback)
12
37
  consumer = OAuth::Consumer.new(app_key, app_secret,
13
38
  :authorize_url => "http://www.discogs.com/oauth/authorize",
14
- :site => "http://api.discogs.com")
39
+ :site => "https://api.discogs.com")
15
40
  request_token = consumer.get_request_token(:oauth_callback => callback)
16
41
 
17
42
  {:request_token => request_token,
@@ -25,7 +50,11 @@ module Authentication
25
50
  # @param verifier [String] verifier token
26
51
  # @return [OAuth::AccessToken]
27
52
  def authenticate(request_token, verifier)
28
- @access_token = request_token.get_access_token(:oauth_verifier => verifier)
53
+ if request_token.is_a?(OAuth::RequestToken)
54
+ @access_token = request_token.get_access_token(:oauth_verifier => verifier)
55
+ else
56
+ raise OAuth::Error, "Invalid Request Token"
57
+ end
29
58
  end
30
59
 
31
60
  # Returns true if an OAuth access_token is present. If a username is given, the authenticated username must match it.
@@ -34,9 +63,9 @@ module Authentication
34
63
  # @return [Boolean]
35
64
  def authenticated?(username=nil, &block)
36
65
  auth = if username
37
- @access_token and authenticated_username == username
66
+ any_authentication? and authenticated_username == username
38
67
  else
39
- !!@access_token
68
+ any_authentication?
40
69
  end
41
70
 
42
71
  if block_given?
@@ -14,14 +14,22 @@ class Discogs::Wrapper
14
14
 
15
15
  include Authentication
16
16
 
17
- @@root_host = "http://api.discogs.com"
17
+ @@root_host = "https://api.discogs.com"
18
18
 
19
19
  attr_reader :app_name
20
- attr_accessor :access_token
20
+ attr_accessor :access_token, :app_key, :app_secret
21
21
 
22
- def initialize(app_name, access_token=nil)
22
+ def initialize(app_name, auth_opts={})
23
23
  @app_name = app_name
24
- @access_token = access_token
24
+
25
+ # Allow for backwards-compatibility with v2.0.0
26
+ if auth_opts.is_a?(Hash)
27
+ @access_token = auth_opts[:access_token]
28
+ @app_key = auth_opts[:app_key]
29
+ @app_secret = auth_opts[:app_secret]
30
+ else
31
+ @access_token = auth_opts
32
+ end
25
33
  end
26
34
 
27
35
  # Retrieves a release by ID.
@@ -686,14 +694,19 @@ class Discogs::Wrapper
686
694
  # @return [Binary] binary image file
687
695
  def get_image(filename)
688
696
  authenticated? do
689
- @access_token.get("/image/#{filename}").body
697
+ if user_facing?
698
+ @access_token.get("/images/#{filename}").body
699
+ else
700
+ query_api("images/#{filename}")
701
+ end
690
702
  end
691
703
  end
692
704
 
693
705
  def search(term, params={})
694
- parameters = {:q => term}.merge(params)
695
-
696
- query_and_build "database/search", parameters
706
+ authenticated? do
707
+ parameters = {:q => term}.merge(params)
708
+ query_and_build "database/search", parameters
709
+ end
697
710
  end
698
711
 
699
712
  def raw(url)
@@ -714,7 +727,7 @@ class Discogs::Wrapper
714
727
  end
715
728
 
716
729
  # Queries the API and handles the response.
717
- def query_api(path, params, method, body)
730
+ def query_api(path, params={}, method=:get, body=nil)
718
731
  response = make_request(path, params, method, body)
719
732
 
720
733
  raise_unknown_resource(path) if response.code == "404"
@@ -736,14 +749,15 @@ class Discogs::Wrapper
736
749
 
737
750
  # Generates a HTTP request and returns the response.
738
751
  def make_request(path, params, method, body)
739
- uri = build_uri(path, params)
752
+ full_params = params.merge(auth_params)
753
+ uri = build_uri(path, full_params)
740
754
  formatted = "#{uri.path}?#{uri.query}"
741
- output_format = params.fetch(:f, "json")
755
+ output_format = full_params.fetch(:f, "json")
742
756
  headers = {"Accept" => "application/#{output_format}",
743
757
  "Accept-Encoding" => "gzip,deflate",
744
758
  "User-Agent" => @app_name}
745
759
 
746
- if authenticated?
760
+ if authenticated? and user_facing?
747
761
  if [:post, :put].include?(method)
748
762
  headers["Content-Type"] = "application/json"
749
763
  @access_token.send(method, formatted, JSON(body), headers)
@@ -758,7 +772,8 @@ class Discogs::Wrapper
758
772
  request.add_field(h, v)
759
773
  end
760
774
 
761
- Net::HTTP.new(uri.host).start do |http|
775
+ Net::HTTP.start(uri.host, uri.port,
776
+ :use_ssl => uri.scheme == 'https') do |http|
762
777
  http.request(request)
763
778
  end
764
779
  end
@@ -769,7 +784,7 @@ class Discogs::Wrapper
769
784
  parameters = {:f => output_format}.merge(params)
770
785
  querystring = "?" + URI.encode_www_form(prepare_hash(parameters))
771
786
 
772
- URI.parse(File.join(@@root_host, URI.encode(sanitize_path(path, URI.escape(querystring)))))
787
+ URI.parse(File.join(@@root_host, [URI.escape(path), querystring].join))
773
788
  end
774
789
 
775
790
  # Stringifies keys and sorts.
@@ -783,11 +798,6 @@ class Discogs::Wrapper
783
798
  result.sort
784
799
  end
785
800
 
786
- def sanitize_path(*path_parts)
787
- clean_path = path_parts.map { |part| part.gsub(/\s/, '+') }
788
- clean_path.join
789
- end
790
-
791
801
  def raise_unknown_resource(path="")
792
802
  raise Discogs::UnknownResource, "Unknown Discogs resource: #{path}"
793
803
  end
@@ -8,6 +8,30 @@ describe Discogs::Wrapper do
8
8
  @search_type = "release"
9
9
  end
10
10
 
11
+ describe "when handling an advanced search" do
12
+
13
+ it "should properly encode the request URI" do
14
+ encoded_uri = "/database/search?f=json&q=Release+Title+artist%3AArtist+Name&type=release"
15
+ get = Net::HTTP::Get.new(encoded_uri)
16
+ Net::HTTP::Get.should_receive(:new).with(encoded_uri).and_return(get)
17
+
18
+ @wrapper.search("Release Title artist:Artist Name", :type => @search_type)
19
+ end
20
+
21
+ end
22
+
23
+ describe "when handling a search including whitespace" do
24
+
25
+ it "should properly encode spaces in the request URI" do
26
+ encoded_uri = "/database/search?f=json&q=One+Two"
27
+ get = Net::HTTP::Get.new(encoded_uri)
28
+ Net::HTTP::Get.should_receive(:new).with(encoded_uri).and_return(get)
29
+
30
+ @wrapper.search("One Two")
31
+ end
32
+
33
+ end
34
+
11
35
  describe "when asking for search result information" do
12
36
 
13
37
  before do
data/spec/wrapper_spec.rb CHANGED
@@ -44,84 +44,84 @@ describe Discogs::Wrapper do
44
44
 
45
45
  it "should generate the correct release URL to parse" do
46
46
  mock_http_with_response "200", read_sample("release")
47
- URI.should_receive(:parse).with("http://api.discogs.com/releases/1?f=json").and_return(@uri)
47
+ URI.should_receive(:parse).with("https://api.discogs.com/releases/1?f=json").and_return(@uri)
48
48
 
49
49
  @wrapper.get_release(@release_id)
50
50
  end
51
51
 
52
52
  it "should generate the correct artist URL to parse" do
53
53
  mock_http_with_response "200", read_sample("artist")
54
- URI.should_receive(:parse).with("http://api.discogs.com/artists/313929?f=json").and_return(@uri)
54
+ URI.should_receive(:parse).with("https://api.discogs.com/artists/313929?f=json").and_return(@uri)
55
55
 
56
56
  @wrapper.get_artist(@artist_id)
57
57
  end
58
58
 
59
59
  it "should generate the correct paginated artist releases URL to parse" do
60
60
  mock_http_with_response "200", read_sample("artist_releases")
61
- URI.should_receive(:parse).with("http://api.discogs.com/artists/313929/releases?f=json&page=2&per_page=100").and_return(@uri)
61
+ URI.should_receive(:parse).with("https://api.discogs.com/artists/313929/releases?f=json&page=2&per_page=100").and_return(@uri)
62
62
 
63
63
  @wrapper.get_artist_releases(@artist_id, :page => 2, :per_page => 100)
64
64
  end
65
65
 
66
66
  it "should generate the correct label URL to parse" do
67
67
  mock_http_with_response "200", read_sample("label")
68
- URI.should_receive(:parse).with("http://api.discogs.com/labels/1000?f=json").and_return(@uri)
68
+ URI.should_receive(:parse).with("https://api.discogs.com/labels/1000?f=json").and_return(@uri)
69
69
 
70
70
  @wrapper.get_label(@label_id)
71
71
  end
72
72
 
73
73
  it "should generate the correct paginated label releases URL to parse" do
74
74
  mock_http_with_response "200", read_sample("label_releases")
75
- URI.should_receive(:parse).with("http://api.discogs.com/labels/1000/releases?f=json&page=2&per_page=100").and_return(@uri)
75
+ URI.should_receive(:parse).with("https://api.discogs.com/labels/1000/releases?f=json&page=2&per_page=100").and_return(@uri)
76
76
 
77
77
  @wrapper.get_label_releases(@label_id, :page => 2, :per_page => 100)
78
78
  end
79
79
 
80
80
  it "should generate the correct default search URL to parse" do
81
81
  mock_http_with_response "200", read_sample("search_results")
82
- URI.should_receive(:parse).with("http://api.discogs.com/database/search?f=json&q=barry").and_return(@uri)
82
+ URI.should_receive(:parse).with("https://api.discogs.com/database/search?f=json&q=barry").and_return(@uri)
83
83
 
84
84
  @wrapper.search(@search_term)
85
85
  end
86
86
 
87
87
  it "should generate the correct paginated search URL to parse" do
88
88
  mock_http_with_response "200", read_sample("search_results")
89
- URI.should_receive(:parse).with("http://api.discogs.com/database/search?f=json&page=2&per_page=100&q=barry").and_return(@uri)
89
+ URI.should_receive(:parse).with("https://api.discogs.com/database/search?f=json&page=2&per_page=100&q=barry").and_return(@uri)
90
90
 
91
91
  @wrapper.search(@search_term, :page => 2, :per_page => 100)
92
92
  end
93
93
 
94
94
  it "should generate another correct paginated search URL to parse" do
95
95
  mock_http_with_response "200", read_sample("search_results")
96
- URI.should_receive(:parse).with("http://api.discogs.com/database/search?f=json&page=2&q=barry").and_return(@uri)
96
+ URI.should_receive(:parse).with("https://api.discogs.com/database/search?f=json&page=2&q=barry").and_return(@uri)
97
97
 
98
98
  @wrapper.search(@search_term, :page => 2)
99
99
  end
100
100
 
101
101
  it "should sanitize the path correctly" do
102
102
  mock_http_with_response "200", read_sample("search_results")
103
- URI.should_receive(:parse).with("http://api.discogs.com/database/search?f=json&q=Two+Words").and_return(@uri)
103
+ URI.should_receive(:parse).with("https://api.discogs.com/database/search?f=json&q=Two+Words").and_return(@uri)
104
104
 
105
105
  @wrapper.search("Two Words")
106
106
  end
107
107
 
108
108
  it "should generate the correct default user inventory URL to parse" do
109
109
  mock_http_with_response "200", read_sample("user_inventory")
110
- URI.should_receive(:parse).with("http://api.discogs.com/users/abuntine/inventory?f=json").and_return(@uri)
110
+ URI.should_receive(:parse).with("https://api.discogs.com/users/abuntine/inventory?f=json").and_return(@uri)
111
111
 
112
112
  @wrapper.get_user_inventory(@username)
113
113
  end
114
114
 
115
115
  it "should generate the correct paginated user inventory URL to parse" do
116
116
  mock_http_with_response "200", read_sample("user_inventory")
117
- URI.should_receive(:parse).with("http://api.discogs.com/users/abuntine/inventory?f=json&page=2&status=For+Sale").and_return(@uri)
117
+ URI.should_receive(:parse).with("https://api.discogs.com/users/abuntine/inventory?f=json&page=2&status=For+Sale").and_return(@uri)
118
118
 
119
119
  @wrapper.get_user_inventory(@username, :page => 2, :status => "For Sale")
120
120
  end
121
121
 
122
122
  it "should generate the correct sorted and paginated user inventory URL to parse" do
123
123
  mock_http_with_response "200", read_sample("user_inventory")
124
- URI.should_receive(:parse).with("http://api.discogs.com/users/abuntine/inventory?f=json&page=2&sort=price&sort_order=asc&status=For+Sale").and_return(@uri)
124
+ URI.should_receive(:parse).with("https://api.discogs.com/users/abuntine/inventory?f=json&page=2&sort=price&sort_order=asc&status=For+Sale").and_return(@uri)
125
125
 
126
126
  @wrapper.get_user_inventory(@username, :page => 2, :status => "For Sale", :sort => :price, :sort_order => :asc)
127
127
  end
@@ -130,20 +130,20 @@ describe Discogs::Wrapper do
130
130
  @search_uri = mock("uri", :host => "api.discogs.com", :query => "q=Sombre+Records&per_page=50&type=release&page=11", :path => "database/search")
131
131
 
132
132
  mock_http_with_response "200", read_sample("search_results")
133
- URI.should_receive(:parse).with("http://api.discogs.com/database/search?q=Sombre+Records&per_page=50&type=release&page=11").and_return(@search_uri)
134
- URI.should_receive(:parse).with("http://api.discogs.com/database/search?f=json&page=11&per_page=50&q=Sombre+Records&type=release").and_return(@uri)
133
+ URI.should_receive(:parse).with("https://api.discogs.com/database/search?q=Sombre+Records&per_page=50&type=release&page=11").and_return(@search_uri)
134
+ URI.should_receive(:parse).with("https://api.discogs.com/database/search?f=json&page=11&per_page=50&q=Sombre+Records&type=release").and_return(@uri)
135
135
 
136
- @wrapper.raw("http://api.discogs.com/database/search?q=Sombre+Records&per_page=50&type=release&page=11")
136
+ @wrapper.raw("https://api.discogs.com/database/search?q=Sombre+Records&per_page=50&type=release&page=11")
137
137
  end
138
138
 
139
139
  it "should generate the correct URL to parse when given raw URL with no query" do
140
140
  @artist_uri = mock("uri", :host => "api.discogs.com", :query => "", :path => "artists/1000")
141
141
 
142
142
  mock_http_with_response "200", read_sample("artist")
143
- URI.should_receive(:parse).with("http://api.discogs.com/artists/1000").and_return(@artist_uri)
144
- URI.should_receive(:parse).with("http://api.discogs.com/artists/1000?f=json").and_return(@uri)
143
+ URI.should_receive(:parse).with("https://api.discogs.com/artists/1000").and_return(@artist_uri)
144
+ URI.should_receive(:parse).with("https://api.discogs.com/artists/1000?f=json").and_return(@uri)
145
145
 
146
- @wrapper.raw("http://api.discogs.com/artists/1000")
146
+ @wrapper.raw("https://api.discogs.com/artists/1000")
147
147
  end
148
148
 
149
149
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discogs-wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
5
- prerelease:
4
+ version: 2.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Andrew Buntine
@@ -15,39 +14,34 @@ dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: pry
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ! '>='
18
+ - - ">="
21
19
  - !ruby/object:Gem::Version
22
20
  version: '0'
23
21
  type: :development
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ! '>='
25
+ - - ">="
29
26
  - !ruby/object:Gem::Version
30
27
  version: '0'
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: pry-nav
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ! '>='
32
+ - - ">="
37
33
  - !ruby/object:Gem::Version
38
34
  version: '0'
39
35
  type: :development
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
- - - ! '>='
39
+ - - ">="
45
40
  - !ruby/object:Gem::Version
46
41
  version: '0'
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: rspec
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
46
  - - '='
53
47
  - !ruby/object:Gem::Version
@@ -55,7 +49,6 @@ dependencies:
55
49
  type: :development
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
53
  - - '='
61
54
  - !ruby/object:Gem::Version
@@ -63,7 +56,6 @@ dependencies:
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: simplecov
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
60
  - - '='
69
61
  - !ruby/object:Gem::Version
@@ -71,7 +63,6 @@ dependencies:
71
63
  type: :development
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
67
  - - '='
77
68
  - !ruby/object:Gem::Version
@@ -79,33 +70,29 @@ dependencies:
79
70
  - !ruby/object:Gem::Dependency
80
71
  name: hashie
81
72
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
73
  requirements:
84
- - - ~>
74
+ - - "~>"
85
75
  - !ruby/object:Gem::Version
86
76
  version: '2.1'
87
77
  type: :runtime
88
78
  prerelease: false
89
79
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
80
  requirements:
92
- - - ~>
81
+ - - "~>"
93
82
  - !ruby/object:Gem::Version
94
83
  version: '2.1'
95
84
  - !ruby/object:Gem::Dependency
96
85
  name: oauth
97
86
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
87
  requirements:
100
- - - ~>
88
+ - - "~>"
101
89
  - !ruby/object:Gem::Version
102
90
  version: 0.4.7
103
91
  type: :runtime
104
92
  prerelease: false
105
93
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
94
  requirements:
108
- - - ~>
95
+ - - "~>"
109
96
  - !ruby/object:Gem::Version
110
97
  version: 0.4.7
111
98
  description: Discogs::Wrapper is a full wrapper for the http://www.discogs.com API
@@ -115,131 +102,129 @@ executables: []
115
102
  extensions: []
116
103
  extra_rdoc_files: []
117
104
  files:
118
- - lib/discogs.rb
119
- - lib/discogs-wrapper.rb
120
- - lib/wrapper/wrapper.rb
121
- - lib/wrapper/authentication.rb
122
105
  - LICENSE
123
106
  - README.markdown
124
- - spec/spec_helper.rb
125
- - spec/samples/valid_search_results.json
126
- - spec/samples/valid_master_release.json
127
- - spec/samples/valid_user_folder.json
128
- - spec/samples/valid_orders.json
107
+ - lib/discogs-wrapper.rb
108
+ - lib/discogs.rb
109
+ - lib/wrapper/authentication.rb
110
+ - lib/wrapper/wrapper.rb
111
+ - spec/samples/valid_artist.json
112
+ - spec/samples/valid_artist_releases.json
113
+ - spec/samples/valid_fields.json
129
114
  - spec/samples/valid_folder.json
130
- - spec/samples/valid_user_folders.json
131
- - spec/samples/valid_wantlist_release.json
115
+ - spec/samples/valid_identity.json
116
+ - spec/samples/valid_label.json
117
+ - spec/samples/valid_label_releases.json
118
+ - spec/samples/valid_listing.json
119
+ - spec/samples/valid_master_release.json
132
120
  - spec/samples/valid_master_release_versions.json
133
- - spec/samples/valid_order_messages.json
134
121
  - spec/samples/valid_order.json
122
+ - spec/samples/valid_order_messages.json
123
+ - spec/samples/valid_orders.json
135
124
  - spec/samples/valid_price_suggestions.json
136
- - spec/samples/valid_fields.json
137
- - spec/samples/valid_identity.json
138
- - spec/samples/valid_listing.json
139
- - spec/samples/valid_artist.json
140
- - spec/samples/valid_user_collection.json
141
- - spec/samples/valid_user.json
142
- - spec/samples/valid_artist_releases.json
143
125
  - spec/samples/valid_release.json
144
- - spec/samples/valid_label.json
126
+ - spec/samples/valid_search_results.json
127
+ - spec/samples/valid_user.json
128
+ - spec/samples/valid_user_collection.json
129
+ - spec/samples/valid_user_folder.json
130
+ - spec/samples/valid_user_folders.json
145
131
  - spec/samples/valid_user_inventory.json
146
132
  - spec/samples/valid_user_profile.json
147
- - spec/samples/valid_label_releases.json
148
133
  - spec/samples/valid_user_wantlist.json
149
- - spec/wrapper_spec.rb
150
- - spec/wrapper_methods/get_release_spec.rb
134
+ - spec/samples/valid_wantlist_release.json
135
+ - spec/spec_helper.rb
136
+ - spec/wrapper_methods/add_release_to_user_wantlist_spec.rb
151
137
  - spec/wrapper_methods/edit_release_in_user_wantlist_spec.rb
152
- - spec/wrapper_methods/get_order_messages_spec.rb
153
- - spec/wrapper_methods/get_artist_spec.rb
154
- - spec/wrapper_methods/get_master_release_versions_spec.rb
155
- - spec/wrapper_methods/get_user_spec.rb
156
- - spec/wrapper_methods/get_order_spec.rb
157
- - spec/wrapper_methods/get_user_wantlist_spec.rb
158
- - spec/wrapper_methods/get_user_folders_spec.rb
159
138
  - spec/wrapper_methods/edit_user_spec.rb
160
- - spec/wrapper_methods/get_user_inventory_spec.rb
161
- - spec/wrapper_methods/get_listing_spec.rb
139
+ - spec/wrapper_methods/get_artist_releases_spec.rb
140
+ - spec/wrapper_methods/get_artist_spec.rb
141
+ - spec/wrapper_methods/get_identity_spec.rb
162
142
  - spec/wrapper_methods/get_label_releases_spec.rb
163
- - spec/wrapper_methods/get_user_collection_spec.rb
164
- - spec/wrapper_methods/add_release_to_user_wantlist_spec.rb
165
143
  - spec/wrapper_methods/get_label_spec.rb
144
+ - spec/wrapper_methods/get_listing_spec.rb
145
+ - spec/wrapper_methods/get_master_release_spec.rb
146
+ - spec/wrapper_methods/get_master_release_versions_spec.rb
147
+ - spec/wrapper_methods/get_order_messages_spec.rb
148
+ - spec/wrapper_methods/get_order_spec.rb
166
149
  - spec/wrapper_methods/get_price_suggestions_spec.rb
150
+ - spec/wrapper_methods/get_release_spec.rb
151
+ - spec/wrapper_methods/get_user_collection_spec.rb
167
152
  - spec/wrapper_methods/get_user_folder_spec.rb
168
- - spec/wrapper_methods/get_master_release_spec.rb
169
- - spec/wrapper_methods/get_identity_spec.rb
170
- - spec/wrapper_methods/get_artist_releases_spec.rb
153
+ - spec/wrapper_methods/get_user_folders_spec.rb
154
+ - spec/wrapper_methods/get_user_inventory_spec.rb
155
+ - spec/wrapper_methods/get_user_spec.rb
156
+ - spec/wrapper_methods/get_user_wantlist_spec.rb
171
157
  - spec/wrapper_methods/search_spec.rb
158
+ - spec/wrapper_spec.rb
172
159
  homepage: http://www.github.com/buntine/discogs
173
160
  licenses: []
161
+ metadata: {}
174
162
  post_install_message:
175
163
  rdoc_options: []
176
164
  require_paths:
177
165
  - lib
178
166
  required_ruby_version: !ruby/object:Gem::Requirement
179
- none: false
180
167
  requirements:
181
- - - ! '>='
168
+ - - ">="
182
169
  - !ruby/object:Gem::Version
183
170
  version: '0'
184
171
  required_rubygems_version: !ruby/object:Gem::Requirement
185
- none: false
186
172
  requirements:
187
- - - ! '>='
173
+ - - ">="
188
174
  - !ruby/object:Gem::Version
189
175
  version: '0'
190
176
  requirements: []
191
177
  rubyforge_project:
192
- rubygems_version: 1.8.24
178
+ rubygems_version: 2.4.4
193
179
  signing_key:
194
- specification_version: 3
180
+ specification_version: 4
195
181
  summary: Discogs::Wrapper is a full wrapper for the http://www.discogs.com API V2
196
182
  test_files:
197
- - spec/spec_helper.rb
198
- - spec/samples/valid_search_results.json
183
+ - spec/wrapper_methods/get_artist_spec.rb
184
+ - spec/wrapper_methods/get_order_spec.rb
185
+ - spec/wrapper_methods/add_release_to_user_wantlist_spec.rb
186
+ - spec/wrapper_methods/get_artist_releases_spec.rb
187
+ - spec/wrapper_methods/get_label_releases_spec.rb
188
+ - spec/wrapper_methods/get_user_folders_spec.rb
189
+ - spec/wrapper_methods/get_user_wantlist_spec.rb
190
+ - spec/wrapper_methods/get_label_spec.rb
191
+ - spec/wrapper_methods/get_order_messages_spec.rb
192
+ - spec/wrapper_methods/edit_release_in_user_wantlist_spec.rb
193
+ - spec/wrapper_methods/get_release_spec.rb
194
+ - spec/wrapper_methods/get_identity_spec.rb
195
+ - spec/wrapper_methods/get_listing_spec.rb
196
+ - spec/wrapper_methods/get_master_release_versions_spec.rb
197
+ - spec/wrapper_methods/get_price_suggestions_spec.rb
198
+ - spec/wrapper_methods/get_master_release_spec.rb
199
+ - spec/wrapper_methods/get_user_spec.rb
200
+ - spec/wrapper_methods/get_user_folder_spec.rb
201
+ - spec/wrapper_methods/get_user_inventory_spec.rb
202
+ - spec/wrapper_methods/edit_user_spec.rb
203
+ - spec/wrapper_methods/search_spec.rb
204
+ - spec/wrapper_methods/get_user_collection_spec.rb
205
+ - spec/samples/valid_identity.json
206
+ - spec/samples/valid_user_wantlist.json
207
+ - spec/samples/valid_artist.json
199
208
  - spec/samples/valid_master_release.json
209
+ - spec/samples/valid_master_release_versions.json
210
+ - spec/samples/valid_label.json
211
+ - spec/samples/valid_search_results.json
212
+ - spec/samples/valid_folder.json
213
+ - spec/samples/valid_artist_releases.json
214
+ - spec/samples/valid_order.json
215
+ - spec/samples/valid_user_collection.json
216
+ - spec/samples/valid_order_messages.json
200
217
  - spec/samples/valid_user_folder.json
218
+ - spec/samples/valid_listing.json
201
219
  - spec/samples/valid_orders.json
202
- - spec/samples/valid_folder.json
203
- - spec/samples/valid_user_folders.json
204
220
  - spec/samples/valid_wantlist_release.json
205
- - spec/samples/valid_master_release_versions.json
206
- - spec/samples/valid_order_messages.json
207
- - spec/samples/valid_order.json
208
221
  - spec/samples/valid_price_suggestions.json
209
222
  - spec/samples/valid_fields.json
210
- - spec/samples/valid_identity.json
211
- - spec/samples/valid_listing.json
212
- - spec/samples/valid_artist.json
213
- - spec/samples/valid_user_collection.json
214
- - spec/samples/valid_user.json
215
- - spec/samples/valid_artist_releases.json
216
- - spec/samples/valid_release.json
217
- - spec/samples/valid_label.json
218
223
  - spec/samples/valid_user_inventory.json
219
224
  - spec/samples/valid_user_profile.json
225
+ - spec/samples/valid_user_folders.json
226
+ - spec/samples/valid_release.json
220
227
  - spec/samples/valid_label_releases.json
221
- - spec/samples/valid_user_wantlist.json
228
+ - spec/samples/valid_user.json
222
229
  - spec/wrapper_spec.rb
223
- - spec/wrapper_methods/get_release_spec.rb
224
- - spec/wrapper_methods/edit_release_in_user_wantlist_spec.rb
225
- - spec/wrapper_methods/get_order_messages_spec.rb
226
- - spec/wrapper_methods/get_artist_spec.rb
227
- - spec/wrapper_methods/get_master_release_versions_spec.rb
228
- - spec/wrapper_methods/get_user_spec.rb
229
- - spec/wrapper_methods/get_order_spec.rb
230
- - spec/wrapper_methods/get_user_wantlist_spec.rb
231
- - spec/wrapper_methods/get_user_folders_spec.rb
232
- - spec/wrapper_methods/edit_user_spec.rb
233
- - spec/wrapper_methods/get_user_inventory_spec.rb
234
- - spec/wrapper_methods/get_listing_spec.rb
235
- - spec/wrapper_methods/get_label_releases_spec.rb
236
- - spec/wrapper_methods/get_user_collection_spec.rb
237
- - spec/wrapper_methods/add_release_to_user_wantlist_spec.rb
238
- - spec/wrapper_methods/get_label_spec.rb
239
- - spec/wrapper_methods/get_price_suggestions_spec.rb
240
- - spec/wrapper_methods/get_user_folder_spec.rb
241
- - spec/wrapper_methods/get_master_release_spec.rb
242
- - spec/wrapper_methods/get_identity_spec.rb
243
- - spec/wrapper_methods/get_artist_releases_spec.rb
244
- - spec/wrapper_methods/search_spec.rb
245
- has_rdoc:
230
+ - spec/spec_helper.rb