rspotify 1.25.1 → 1.26.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
  SHA1:
3
- metadata.gz: 329704cda3c04b00d6fd736a343ff454ae10bab0
4
- data.tar.gz: 99112da79287ac9ae9d4dad05dfda682973d79fc
3
+ metadata.gz: 0bc5d8b598c4b640f11fbb275717b5c9935416df
4
+ data.tar.gz: dbf190b220aaa14fe3a1d2b145f966da8f517b29
5
5
  SHA512:
6
- metadata.gz: f39f9a8d1d9747ae269676f13b5e672028e398097da3f667417239228905922bd8460f29bd0d0eb081df659d5ce29cdb86b232059b32f42c64b05670c4c3971e
7
- data.tar.gz: 35603e5d98e9e732ab289e55f51dea5648fbd7b1f82899cf76848c47b42e3f738c851546567546df397a254484a87acebf904b53a8582523301b18ab47f48f47
6
+ metadata.gz: cc831e87cd9e4510ed841aa51ae79c29a4188dde8ff339572d31fc2ec934dc53ae60e0af0282ca10a02c48b9c44bb7770cbcd412b946b21493579d04d4eb5bf4
7
+ data.tar.gz: 2c3775293b7ccac518b71f3bb894957db0039e862bc938c96b6613b6ede5b9e7f7435346ebbd16d5979490528b8e2ed2a38036342bce8abb3f6f581a25fb95ff
@@ -126,9 +126,37 @@ module RSpotify
126
126
  # User must be a premium subscriber for this feature to work.
127
127
  def play_track(song_uri)
128
128
  url = "me/player/play"
129
- verb = 'put'
130
129
  params = {"uris": [song_uri]}
131
- response = User.oauth_put(@id, url, params.to_json)
130
+ User.oauth_put(@id, url, params.to_json)
131
+ end
132
+
133
+ # Play the user's currently active player
134
+ #
135
+ # @example
136
+ # player = user.player
137
+ # player.play
138
+ def play
139
+ url = 'me/player/play'
140
+ User.oauth_put(@id, url, {})
141
+ end
142
+
143
+ # Pause the user's currently active player
144
+ #
145
+ # @example
146
+ # player = user.player
147
+ # player.pause
148
+ def pause
149
+ url = 'me/player/pause'
150
+ User.oauth_put(@id, url, {})
151
+ end
152
+
153
+ # Get the current user’s player
154
+ #
155
+ # @example
156
+ # player = user.player
157
+ def player
158
+ url = 'me/player'
159
+ User.oauth_get(@id, url)
132
160
  end
133
161
 
134
162
  # Get the current user’s recently played tracks. Requires the *user-read-recently-played* scope.
@@ -1,3 +1,3 @@
1
1
  module RSpotify
2
- VERSION = '1.25.1'
2
+ VERSION = '1.26.0'
3
3
  end
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: 1.25.1
4
+ version: 1.26.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: 2018-01-02 00:00:00.000000000 Z
11
+ date: 2018-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2
@@ -342,3 +342,4 @@ test_files:
342
342
  - spec/vcr_cassettes/user_find_spotify.yml
343
343
  - spec/vcr_cassettes/user_find_wizzler.yml
344
344
  - spec/vcr_cassettes/user_wizzler_playlists_limit_20_offset_0.yml
345
+ has_rdoc: