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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3a2e674f79d628114b4e4e3c97006abfef2048d5
4
- data.tar.gz: 25c75aa60824f65221f693faf413428f1ed01f9e
2
+ SHA256:
3
+ metadata.gz: fbc84ae149d3f5b010bdbcb003b757f62f59c3a1deaac10de9ce6c56d0cf0380
4
+ data.tar.gz: e138e3f06dca550ffe532fc602916de472cbbc2bf7da823ebd34b5cd1ff38c52
5
5
  SHA512:
6
- metadata.gz: b6cba50aae45497ca2c4d01b5eda78a41d38673ca5c3f61b83432c2afebf12c2377b7dc2555a03f5c3b02e25316b1bd7b77066c2f8cccedd3c807170dd71e9b6
7
- data.tar.gz: a1289477f05cc11072f2212eadcc24c6095e8bf7fa8e792bed6f2b71c29dce5ddf0ecc0cd1908f4794db31acb5e24e7d0bbe87fc574cc3509c7c180cb2c0fb64
6
+ metadata.gz: f5bcfac52c8847d66d6ee5847194fdedf8540fade7e17a2a42b3357f4aac2cf416292dcc049a8fc25ca9ad596f83aef7b490a95c347be1a7cd58247a9309bce0
7
+ data.tar.gz: afd9f4b87df52ed78102be3b78202261e6838ae88cac00241683c21496530dcfefbfd181554f82042e507c8450443e2976f1e053062f04844cf58a90385f90fe
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source 'https://rubygems.org'
1
+ source 'http://rubygems.org'
2
2
 
3
3
  gemspec
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module RSpotify
2
- VERSION = '2.7.0'.freeze
2
+ VERSION = '2.8.0'.freeze
3
3
  end
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.7.0
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: 2019-11-12 00:00:00.000000000 Z
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
- rubyforge_project:
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: