rspotify 1.6.0 → 1.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd91d4241fb7d693fc24393b42e69135885f6695
4
- data.tar.gz: f097e381987b3df3b6916eb66ad9d6beca9d9d67
3
+ metadata.gz: 072acdba8d1a732336c1ce986f03694d9279cacf
4
+ data.tar.gz: c140a7c62c9b8b73169abe527a21fa86257f4967
5
5
  SHA512:
6
- metadata.gz: 2d27bdd4e56feb9795d87e69ea04ab9aff66c775146efb233849200eb6731a7cd5405550b783bd860bf9a63911f1a0323ddebffe5b7ef8d37197de4a8521e9bc
7
- data.tar.gz: 0cf6a167d4e5a7f085acd48bdb894c254b397f03a3715311650df424e5aad4a8cf4affbb0c202ed70b11355801a374ccda9c509df84fbf2d0a81551cbff15384
6
+ metadata.gz: 576e165c656683421697f7fb9a1669ab1118dcdb69c68a9361d41c27281d31056d631bca53ed5947c3a5d6da731512dde0e2a69dc073d0beebc894aec46b1aea
7
+ data.tar.gz: 9665298242913480d10d9c80d8a58be669538b73da98029233264aa829e030460a6f72f5769c2de65d7adad38e0d1668cfdbdda92bbf29ad513824aa2f2d2e7d
@@ -29,10 +29,23 @@ module RSpotify
29
29
  Playlist.new json
30
30
  end
31
31
 
32
- # Spotify does not support search for playlists. Prints warning and returns false
33
- def self.search(*)
34
- warn 'Spotify API does not support search for playlists'
35
- false
32
+ # Returns array of playlist objects matching the query
33
+ #
34
+ # @param query [String] The search query's keywords. See the q description in {https://developer.spotify.com/web-api/search-item here} for details.
35
+ # @param limit [Integer] Maximum number of playlists to return. Maximum: 50. Default: 20.
36
+ # @param offset [Integer] The index of the first playlist to return. Use with limit to get the next set of playlists. Default: 0.
37
+ # @return [Array<Playlist>]
38
+ #
39
+ # @example
40
+ # playlists = RSpotify::Playlist.search('Soundtrack')
41
+ # playlists.size #=> 20
42
+ # playlists.first.class #=> RSpotify::Playlist
43
+ # playlists.first.name #=> ""
44
+ #
45
+ # playlists = RSpotify::Playlist.search('Soundtrack', limit: 10)
46
+ # playlists.size #=> 10
47
+ def self.search(query, limit: 20, offset: 0)
48
+ super(query, 'playlist', limit: limit, offset: offset)
36
49
  end
37
50
 
38
51
  def initialize(options = {})
@@ -1,3 +1,3 @@
1
1
  module RSpotify
2
- VERSION = '1.6.0'
2
+ VERSION = '1.6.1'
3
3
  end
data/rspotify.gemspec CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.require_paths = ['lib']
18
18
 
19
19
  spec.add_dependency 'omniauth-oauth2', '~> 1.1'
20
- spec.add_dependency 'rest_client', '~> 1.7'
20
+ spec.add_dependency 'rest_client', '~> 1.8'
21
21
 
22
22
  spec.add_development_dependency 'bundler'
23
23
  spec.add_development_dependency 'fakeweb', '~> 1.3'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspotify
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guilherme Sad
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-10 00:00:00.000000000 Z
11
+ date: 2014-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.7'
33
+ version: '1.8'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.7'
40
+ version: '1.8'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement