rspotify 2.6.1 → 2.7.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
2
  SHA1:
3
- metadata.gz: 59c34bf71f214c47a5119f269b79451204658dd8
4
- data.tar.gz: b6b7e1e0adb4b392bf3a829d200820a434427142
3
+ metadata.gz: 3a2e674f79d628114b4e4e3c97006abfef2048d5
4
+ data.tar.gz: 25c75aa60824f65221f693faf413428f1ed01f9e
5
5
  SHA512:
6
- metadata.gz: 885ac9c2f2b2218e5f31c48ffa9585e5f98496457fb90ab0e5ded962fa26ac2220bc196ae2d7a85258372dc2c31ff598a5a22c46f379ab4a18c33362ebbf352f
7
- data.tar.gz: 66265e27d689adb88a2336b2be6e724c1e2e49fe4506bf6c84fb8dca801b4148cadfc7a72a89a91d9fac10c081f54100951d874e91146c84831643512abd2437
6
+ metadata.gz: b6cba50aae45497ca2c4d01b5eda78a41d38673ca5c3f61b83432c2afebf12c2377b7dc2555a03f5c3b02e25316b1bd7b77066c2f8cccedd3c807170dd71e9b6
7
+ data.tar.gz: a1289477f05cc11072f2212eadcc24c6095e8bf7fa8e792bed6f2b71c29dce5ddf0ecc0cd1908f4794db31acb5e24e7d0bbe87fc574cc3509c7c180cb2c0fb64
@@ -139,14 +139,21 @@ module RSpotify
139
139
  # Get the current user’s recently played tracks. Requires the *user-read-recently-played* scope.
140
140
  #
141
141
  # @param limit [Integer] Optional. The number of entities to return. Default: 20. Minimum: 1. Maximum: 50.
142
+ # @param after [String] Optional. A Unix timestamp in milliseconds. Returns all items after (but not including) this cursor position. If after is specified, before must not be specified.
143
+ # @param before [String] Optional. A Unix timestamp in milliseconds. Returns all items before (but not including) this cursor position. If before is specified, after must not be specified.
142
144
  # @return [Array<Track>]
143
145
  #
144
146
  # @example
145
147
  # recently_played = user.recently_played
146
148
  # recently_played.size #=> 20
147
149
  # recently_played.first.name #=> "Ice to Never"
148
- def recently_played(limit: 20)
150
+ # user.recently_played(limit: 50)
151
+ # user.recently_played(after: '1572561234', before: '1572562369')
152
+ def recently_played(limit: 20, after: nil, before: nil)
149
153
  url = "me/player/recently-played?limit=#{limit}"
154
+ url << "&after=#{after}" if after
155
+ url << "&before=#{before}" if before
156
+
150
157
  response = RSpotify.resolve_auth_request(@id, url)
151
158
  return response if RSpotify.raw_response
152
159
 
@@ -1,3 +1,3 @@
1
1
  module RSpotify
2
- VERSION = '2.6.1'.freeze
2
+ VERSION = '2.7.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.6.1
4
+ version: 2.7.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-04 00:00:00.000000000 Z
11
+ date: 2019-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2