spotify-client 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/spotify/version.rb +1 -1
- data/lib/spotify_client.rb +16 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7d5bcbac2b7f1892ea9b256eddacb21f963be42
|
4
|
+
data.tar.gz: e1ed20dccb1395e60fa612ef230097fcf4354d42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9c59c1aa145001010f8612d9b968e75d4af81348ef995cae4a381982b0b439802b6b77f57b76b8560be654b0b0eae2b08eaa9732bc1c0235dd1123349c2686c
|
7
|
+
data.tar.gz: 00db9789740401f76cf06a308bcd5427e926835a82a4b9cd49ce6d7048aa44340ba509f39b8b873542ba696c99f8b9bceda7f17e2a3d4498fe7e65e1e282e3d0
|
data/lib/spotify/version.rb
CHANGED
data/lib/spotify_client.rb
CHANGED
@@ -53,7 +53,22 @@ module Spotify
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def user_playlist_tracks(user_id, playlist_id)
|
56
|
-
|
56
|
+
tracks = { "items" => [] }
|
57
|
+
path = "/v1/users/#{user_id}/playlists/#{playlist_id}/tracks"
|
58
|
+
|
59
|
+
while path
|
60
|
+
response = run(:get, path, [200])
|
61
|
+
tracks["items"].concat(response.delete("items"))
|
62
|
+
tracks.merge!(response)
|
63
|
+
|
64
|
+
path = if response["next"]
|
65
|
+
response["next"].gsub(BASE_URI, '')
|
66
|
+
else
|
67
|
+
nil
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
tracks
|
57
72
|
end
|
58
73
|
|
59
74
|
# Create a playlist for a Spotify user. The playlist will be empty until you add tracks.
|