musix_match 0.1.13 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
data/lib/musix_match/api/base.rb
CHANGED
@@ -25,7 +25,8 @@ module MusixMatch
|
|
25
25
|
|
26
26
|
def self.get(method, params={})
|
27
27
|
raise APIKeyNotSpecifiedException.new('You must specify the API key. MusixMatch::API::Base.api_key = "YOUR_API_KEY"') if api_key.nil?
|
28
|
-
|
28
|
+
puts url_for(method, params)
|
29
|
+
response = perform_get_request(url_for(method, params))
|
29
30
|
parsed_response = case response.parsed_response
|
30
31
|
when Hash
|
31
32
|
response.parsed_response
|
@@ -38,6 +39,10 @@ module MusixMatch
|
|
38
39
|
end
|
39
40
|
parsed_response
|
40
41
|
end
|
42
|
+
|
43
|
+
def self.perform_get_request(url)
|
44
|
+
HTTParty.get(url)
|
45
|
+
end
|
41
46
|
|
42
47
|
def api_key
|
43
48
|
self.class.api_key
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: musix_match
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.14
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Andrea Franz
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-05-14 00:00:00 +02:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|