rspotify 2.8.0 → 2.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/rspotify/base.rb +3 -3
- data/lib/rspotify/playlist.rb +1 -1
- data/lib/rspotify/user.rb +9 -3
- data/lib/rspotify/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd4464a0bd9145130472ed8f8abe11c595e3e5065a44e083d7a41ef26a315dad
|
4
|
+
data.tar.gz: a81d26ab41cfb8ff340eb30a39f6d878503481378757ca4cc480db89c147bd07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23d30c3094d7c243733190ca8e02231159968027a3d3b30eb72c0d8fb0694ecde85bb0b7c3327b86021a624bfa96890f33315d8acb134f67396124068c4bcee2
|
7
|
+
data.tar.gz: ec899b94e25402f6a22ba6e9ecca3be4ced60f763ed4108d3f206d6f054449ce3f6d3b3b1eab4b4cc47053532c3320756d382d5a11bc2c41b966c51fbaf6be3c
|
data/Gemfile
CHANGED
data/lib/rspotify/base.rb
CHANGED
@@ -125,9 +125,9 @@ module RSpotify
|
|
125
125
|
|
126
126
|
# Generate an embed code for an album, artist or track.
|
127
127
|
# @param [Hash] options
|
128
|
-
# @option options [
|
129
|
-
# @option options [
|
130
|
-
# @option options [
|
128
|
+
# @option options [Integer] :width the width of the frame
|
129
|
+
# @option options [Integer] :height the height of the frame
|
130
|
+
# @option options [Integer] :frameborder the frameborder of the frame
|
131
131
|
# @option options [Boolean] :allowtransparency toggle frame transparency
|
132
132
|
# @option options [nil|String|Symbol] :view specific view option for iframe
|
133
133
|
# @option options [nil|String|Symbol] :theme specific theme option for iframe
|
data/lib/rspotify/playlist.rb
CHANGED
@@ -303,7 +303,7 @@ module RSpotify
|
|
303
303
|
# positions = [0,3,8]
|
304
304
|
# playlist.remove_tracks!(positions, snapshot_id: '0ZvtH...')
|
305
305
|
def remove_tracks!(tracks, snapshot_id: nil)
|
306
|
-
positions = tracks if tracks.first.is_a?
|
306
|
+
positions = tracks if tracks.first.is_a? Integer
|
307
307
|
|
308
308
|
tracks = tracks.map do |track|
|
309
309
|
next { uri: track.uri } if track.is_a? Track
|
data/lib/rspotify/user.rb
CHANGED
@@ -104,6 +104,8 @@ module RSpotify
|
|
104
104
|
# Creates a playlist in user's Spotify account. This method is only available when the current
|
105
105
|
# user has granted access to the *playlist-modify-public* and *playlist-modify-private* scopes.
|
106
106
|
#
|
107
|
+
# @note To create a collaborative playlist the public option must be set to false.
|
108
|
+
#
|
107
109
|
# @param name [String] The name for the new playlist
|
108
110
|
# @param public [Boolean] Whether the playlist is public or private. Default: true
|
109
111
|
# @return [Playlist]
|
@@ -116,10 +118,14 @@ module RSpotify
|
|
116
118
|
# playlist = user.create_playlist!('my-second-playlist', public: false)
|
117
119
|
# playlist.name #=> "my-second-playlist"
|
118
120
|
# playlist.public #=> false
|
119
|
-
def create_playlist!(name, public: true)
|
121
|
+
def create_playlist!(name, description: nil, public: true, collaborative: false)
|
120
122
|
url = "users/#{@id}/playlists"
|
121
|
-
request_data = {
|
122
|
-
|
123
|
+
request_data = {
|
124
|
+
name: name,
|
125
|
+
public: public,
|
126
|
+
description: description,
|
127
|
+
collaborative: collaborative
|
128
|
+
}.to_json
|
123
129
|
response = User.oauth_post(@id, url, request_data)
|
124
130
|
return response if RSpotify.raw_response
|
125
131
|
Playlist.new response
|
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.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guilherme Sad
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
@@ -136,7 +136,7 @@ dependencies:
|
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '3.0'
|
139
|
-
description:
|
139
|
+
description:
|
140
140
|
email:
|
141
141
|
- gorgulhoguilherme@gmail.com
|
142
142
|
executables: []
|
@@ -260,7 +260,7 @@ homepage: http://rubygems.org/gems/rspotify
|
|
260
260
|
licenses:
|
261
261
|
- MIT
|
262
262
|
metadata: {}
|
263
|
-
post_install_message:
|
263
|
+
post_install_message:
|
264
264
|
rdoc_options: []
|
265
265
|
require_paths:
|
266
266
|
- lib
|
@@ -276,7 +276,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
276
276
|
version: '0'
|
277
277
|
requirements: []
|
278
278
|
rubygems_version: 3.0.6
|
279
|
-
signing_key:
|
279
|
+
signing_key:
|
280
280
|
specification_version: 4
|
281
281
|
summary: A ruby wrapper for the Spotify Web API
|
282
282
|
test_files:
|