rspotify 2.9.2 → 2.10.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/player.rb +15 -0
- data/lib/rspotify/version.rb +1 -1
- data/rspotify.gemspec +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: d2f3f63fb69d7fdea96a15bab0671af1bf613156372db785367769cd0ef57e5f
|
4
|
+
data.tar.gz: 84de02a228ae2466a06115d51cbee51a5e305249b2ee41966ff526101557e525
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c62e8935afb2c34db840a322d225be296b6be4b39011f4f7e42eeaabe0f8b4fde08ed1c6ba26d66fe10127988e5ac799e3facceffb4799cec5044b0adbd91a32
|
7
|
+
data.tar.gz: e68cede2897703d01e27fd9ce6154fc9a6dca1a39540c905f66449acc1c8c2a95b47af132689019095be90f01678de21acd6fbd323405b0c8a16a4e88da574ba
|
data/lib/rspotify/player.rb
CHANGED
@@ -73,6 +73,21 @@ module RSpotify
|
|
73
73
|
User.oauth_put(@user.id, url, params.to_json)
|
74
74
|
end
|
75
75
|
|
76
|
+
# Add an item to the end of the user’s current playback queue
|
77
|
+
# If `device_id` is not passed, the currently active spotify app will be triggered
|
78
|
+
#
|
79
|
+
# @param [String] device_id the ID of the device to set the repeat state on.
|
80
|
+
# @param [String] uri the spotify uri of the track to be queued
|
81
|
+
#
|
82
|
+
# @example
|
83
|
+
# player = user.player
|
84
|
+
# player.queue("spotify:track:4iV5W9uYEdYUVa79Axb7Rh")
|
85
|
+
def queue(device_id = nil, uri)
|
86
|
+
url = "me/player/queue?uri=#{uri}"
|
87
|
+
url = device_id.nil? ? url : "#{url}&device_id=#{device_id}"
|
88
|
+
User.oauth_post(@user.id, url, {})
|
89
|
+
end
|
90
|
+
|
76
91
|
# Toggle the current user's player repeat status.
|
77
92
|
# If `device_id` is not passed, the currently active spotify app will be triggered.
|
78
93
|
# If `state` is not passed, the currently active context will be set to repeat.
|
data/lib/rspotify/version.rb
CHANGED
data/rspotify.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.test_files = spec.files.grep(/^spec\//)
|
17
17
|
spec.require_paths = ['lib']
|
18
18
|
|
19
|
-
spec.add_dependency 'omniauth-oauth2', '
|
19
|
+
spec.add_dependency 'omniauth-oauth2', '>= 1.6'
|
20
20
|
spec.add_dependency 'rest-client', '~> 2.0.2'
|
21
21
|
spec.add_dependency 'addressable', '~> 2.5.2'
|
22
22
|
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspotify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.10.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: 2020-
|
11
|
+
date: 2020-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: '1.6'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: '1.6'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rest-client
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|