Musix 0.1 → 0.2

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.
Files changed (2) hide show
  1. data/lib/musix.rb +5 -5
  2. metadata +3 -3
@@ -29,23 +29,23 @@ module Musix
29
29
  class Search
30
30
 
31
31
  # Searches Spotify for a track.
32
- def track(query, page = 1)
32
+ def self.track(query, page = 1)
33
33
  search("track", query, page)
34
34
  end
35
35
 
36
36
  # Searches Spotify for an album.
37
- def album(query, page = 1)
37
+ def self.album(query, page = 1)
38
38
  search("album", query, page)
39
39
  end
40
40
 
41
41
  # Searches Spotify for an artist.
42
- def artist(query, page = 1)
42
+ def self.artist(query, page = 1)
43
43
  search("artist", query, page)
44
44
  end
45
45
 
46
46
  private
47
- def search(type, query, page)
48
- Spotify::get("/search/1/#{method}", :query => { :q => query, :page => [args.first.to_i, 1].max }).fetch("#{method}s")
47
+ def self.search(type, query, page)
48
+ Spotify::get("/search/1/#{type}", :query => { :q => query, :page => page }).fetch("#{type}s")
49
49
  end
50
50
  end
51
51
 
metadata CHANGED
@@ -4,8 +4,8 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 1
8
- version: "0.1"
7
+ - 2
8
+ version: "0.2"
9
9
  platform: ruby
10
10
  authors:
11
11
  - Kim Burgestrand
@@ -13,7 +13,7 @@ autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
15
 
16
- date: 2010-04-25 00:00:00 +02:00
16
+ date: 2010-04-26 00:00:00 +02:00
17
17
  default_executable:
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency