ISpotifyApi
Interface
Members
10
GetNowPlayingAsync
method
The currently-playing track, or null when nothing is playing (or on error). Lets a graph branch on what's playing without a try/catch.Task<SpotifyNowPlaying> GetNowPlayingAsync(CancellationToken cancellationToken = default)NextAsync
method
Skips to the next track in the queue.Task NextAsync(CancellationToken cancellationToken = default)PauseAsync
method
Pauses playback on the active device.Task PauseAsync(CancellationToken cancellationToken = default)PlayAsync
method
Resumes playback on the active device.Task PlayAsync(CancellationToken cancellationToken = default)PlayContextAsync
method
Starts playback of a context — a playlist or album — by its Spotify URI (e.g. spotify:playlist:37i9dQZF1DX…). A blank URI no-ops.Task PlayContextAsync(string contextUri, CancellationToken cancellationToken = default)PreviousAsync
method
Skips to the previous track.Task PreviousAsync(CancellationToken cancellationToken = default)RestartAsync
method
Restarts the current track by seeking to position 0.Task RestartAsync(CancellationToken cancellationToken = default)SetRepeatAsync
method
Sets the repeat mode. mode is off, track, or context; any unrecognized value is treated as off.Task SetRepeatAsync(string mode, CancellationToken cancellationToken = default)SetShuffleAsync
method
Turns shuffle on or off.Task SetShuffleAsync(bool enabled, CancellationToken cancellationToken = default)SetVolumeAsync
method
Sets the playback volume; percent is clamped to 0..100.Task SetVolumeAsync(int percent, CancellationToken cancellationToken = default)
