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 +4 -4
- data/lib/rspotify/playlist.rb +17 -4
- data/lib/rspotify/version.rb +1 -1
- data/rspotify.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 072acdba8d1a732336c1ce986f03694d9279cacf
|
4
|
+
data.tar.gz: c140a7c62c9b8b73169abe527a21fa86257f4967
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 576e165c656683421697f7fb9a1669ab1118dcdb69c68a9361d41c27281d31056d631bca53ed5947c3a5d6da731512dde0e2a69dc073d0beebc894aec46b1aea
|
7
|
+
data.tar.gz: 9665298242913480d10d9c80d8a58be669538b73da98029233264aa829e030460a6f72f5769c2de65d7adad38e0d1668cfdbdda92bbf29ad513824aa2f2d2e7d
|
data/lib/rspotify/playlist.rb
CHANGED
@@ -29,10 +29,23 @@ module RSpotify
|
|
29
29
|
Playlist.new json
|
30
30
|
end
|
31
31
|
|
32
|
-
#
|
33
|
-
|
34
|
-
|
35
|
-
|
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 = {})
|
data/lib/rspotify/version.rb
CHANGED
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.
|
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.
|
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-
|
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.
|
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.
|
40
|
+
version: '1.8'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|