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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c165c5081e4cca893c47dc2cd8f4f14575ab64aee6afd554124c3b0b36f3d9b6
4
- data.tar.gz: 851456edf9def81e75378588216daf83145afbc4aa5ea53d6f3efdb75bff3d73
3
+ metadata.gz: d2f3f63fb69d7fdea96a15bab0671af1bf613156372db785367769cd0ef57e5f
4
+ data.tar.gz: 84de02a228ae2466a06115d51cbee51a5e305249b2ee41966ff526101557e525
5
5
  SHA512:
6
- metadata.gz: f060beaba6b8c8995b23952d503703943dd89d765f4c23224dc7a4a05d34849f30a4ab551aea64c0f9bbd193014d524dd593f99cb5a9099a4c71084ecce8e3b0
7
- data.tar.gz: 3b877fc32c3ec4caf9aa31c72e7b4541e4b0bd432469e74ec6b33765eea1c90fa005bfc478dd70152b0da9260b98699c756541397fa1686d9bdc9d6f6de77607
6
+ metadata.gz: c62e8935afb2c34db840a322d225be296b6be4b39011f4f7e42eeaabe0f8b4fde08ed1c6ba26d66fe10127988e5ac799e3facceffb4799cec5044b0adbd91a32
7
+ data.tar.gz: e68cede2897703d01e27fd9ce6154fc9a6dca1a39540c905f66449acc1c8c2a95b47af132689019095be90f01678de21acd6fbd323405b0c8a16a4e88da574ba
@@ -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.
@@ -1,3 +1,3 @@
1
1
  module RSpotify
2
- VERSION = '2.9.2'.freeze
2
+ VERSION = '2.10.0'.freeze
3
3
  end
@@ -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', '~> 1.5.0'
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.9.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-09-23 00:00:00.000000000 Z
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.5.0
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.5.0
26
+ version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rest-client
29
29
  requirement: !ruby/object:Gem::Requirement