Method: RSpotify::Player#repeat
- Defined in:
- lib/rspotify/player.rb
#repeat(device_id: nil, state: "context") ⇒ Object
Toggle the current user’s player repeat status. If device_id is not passed, the currently active spotify app will be triggered. If state is not passed, the currently active context will be set to repeat.
119 120 121 122 123 124 125 |
# File 'lib/rspotify/player.rb', line 119 def repeat(device_id: nil, state: "context") url = "me/player/repeat" url += "?state=#{state}" url += "&device_id=#{device_id}" if device_id User.oauth_put(@user.id, url, {}) end |