rspotify 2.7.0 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +1 -1
- data/lib/rspotify/user.rb +6 -2
- data/lib/rspotify/version.rb +1 -1
- metadata +3 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fbc84ae149d3f5b010bdbcb003b757f62f59c3a1deaac10de9ce6c56d0cf0380
|
4
|
+
data.tar.gz: e138e3f06dca550ffe532fc602916de472cbbc2bf7da823ebd34b5cd1ff38c52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5bcfac52c8847d66d6ee5847194fdedf8540fade7e17a2a42b3357f4aac2cf416292dcc049a8fc25ca9ad596f83aef7b490a95c347be1a7cd58247a9309bce0
|
7
|
+
data.tar.gz: afd9f4b87df52ed78102be3b78202261e6838ae88cac00241683c21496530dcfefbfd181554f82042e507c8450443e2976f1e053062f04844cf58a90385f90fe
|
data/Gemfile
CHANGED
data/lib/rspotify/user.rb
CHANGED
@@ -307,14 +307,16 @@ module RSpotify
|
|
307
307
|
#
|
308
308
|
# @param limit [Integer] Maximum number of tracks to return. Maximum: 50. Minimum: 1. Default: 20.
|
309
309
|
# @param offset [Integer] The index of the first track to return. Use with limit to get the next set of tracks. Default: 0.
|
310
|
+
# @param market [String] Optional. An {http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 ISO 3166-1 alpha-2 country code}.
|
310
311
|
# @return [Array<Track>]
|
311
312
|
#
|
312
313
|
# @example
|
313
314
|
# tracks = user.saved_tracks
|
314
315
|
# tracks.size #=> 20
|
315
316
|
# tracks.first.name #=> "Do I Wanna Know?"
|
316
|
-
def saved_tracks(limit: 20, offset: 0)
|
317
|
+
def saved_tracks(limit: 20, offset: 0, market: nil)
|
317
318
|
url = "me/tracks?limit=#{limit}&offset=#{offset}"
|
319
|
+
url << "&market=#{market}" if market
|
318
320
|
response = User.oauth_get(@id, url)
|
319
321
|
json = RSpotify.raw_response ? JSON.parse(response) : response
|
320
322
|
|
@@ -382,14 +384,16 @@ module RSpotify
|
|
382
384
|
#
|
383
385
|
# @param limit [Integer] Maximum number of albums to return. Maximum: 50. Minimum: 1. Default: 20.
|
384
386
|
# @param offset [Integer] The index of the first album to return. Use with limit to get the next set of albums. Default: 0.
|
387
|
+
# @param market [String] Optional. An {http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 ISO 3166-1 alpha-2 country code}.
|
385
388
|
# @return [Array<Album>]
|
386
389
|
#
|
387
390
|
# @example
|
388
391
|
# albums = user.saved_albums
|
389
392
|
# albums.size #=> 20
|
390
393
|
# albums.first.name #=> "Launeddas"
|
391
|
-
def saved_albums(limit: 20, offset: 0)
|
394
|
+
def saved_albums(limit: 20, offset: 0, market: nil)
|
392
395
|
url = "me/albums?limit=#{limit}&offset=#{offset}"
|
396
|
+
url << "&market=#{market}" if market
|
393
397
|
response = User.oauth_get(@id, url)
|
394
398
|
json = RSpotify.raw_response ? JSON.parse(response) : response
|
395
399
|
|
data/lib/rspotify/version.rb
CHANGED
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: 2.
|
4
|
+
version: 2.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guilherme Sad
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
@@ -275,8 +275,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
275
275
|
- !ruby/object:Gem::Version
|
276
276
|
version: '0'
|
277
277
|
requirements: []
|
278
|
-
|
279
|
-
rubygems_version: 2.6.8
|
278
|
+
rubygems_version: 3.0.6
|
280
279
|
signing_key:
|
281
280
|
specification_version: 4
|
282
281
|
summary: A ruby wrapper for the Spotify Web API
|
@@ -368,4 +367,3 @@ test_files:
|
|
368
367
|
- spec/vcr_cassettes/user_find_spotify.yml
|
369
368
|
- spec/vcr_cassettes/user_find_wizzler.yml
|
370
369
|
- spec/vcr_cassettes/user_wizzler_playlists_limit_20_offset_0.yml
|
371
|
-
has_rdoc:
|