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 +4 -4
- data/lib/rspotify/user.rb +8 -1
- data/lib/rspotify/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a2e674f79d628114b4e4e3c97006abfef2048d5
|
4
|
+
data.tar.gz: 25c75aa60824f65221f693faf413428f1ed01f9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6cba50aae45497ca2c4d01b5eda78a41d38673ca5c3f61b83432c2afebf12c2377b7dc2555a03f5c3b02e25316b1bd7b77066c2f8cccedd3c807170dd71e9b6
|
7
|
+
data.tar.gz: a1289477f05cc11072f2212eadcc24c6095e8bf7fa8e792bed6f2b71c29dce5ddf0ecc0cd1908f4794db31acb5e24e7d0bbe87fc574cc3509c7c180cb2c0fb64
|
data/lib/rspotify/user.rb
CHANGED
@@ -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
|
-
|
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
|
|
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.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-
|
11
|
+
date: 2019-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|