musix_match 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
- response = HTTParty.get(url_for(method, params))
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
@@ -3,6 +3,7 @@ module MusixMatch
3
3
  class Search < Base
4
4
  def search_lyrics(options={})
5
5
  response = get('lyrics.search', options)
6
+ puts response.inspect
6
7
  LyricsSearchResult.new(response)
7
8
  end
8
9
 
@@ -28,6 +28,7 @@ module MusixMatch
28
28
  end
29
29
 
30
30
  def parse_response_body(response)
31
+ puts response.inspect
31
32
  response['message']['body']['lyrics_list'].each do |obj|
32
33
  @lyrics_list << Models::Lyrics.new(obj['lyrics'])
33
34
  end
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.13
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-04-19 00:00:00 +02:00
13
+ date: 2011-05-14 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency