public IPlaybackPlayBuilder StartAt(string trackId) { return(new PlaybackPlayBuilder(this.playbackContext, new Body(this.body) { Offset = new Offset { TrackUri = SpotifyUri.ForTrack(trackId) } })); }
public Task <PlaylistSnapshot> ReplaceAsync(CancellationToken cancellationToken) { return(this.SendAsync <PlaylistSnapshot, TrackUris>( HttpMethod.Put, new TrackUris { Uris = this.Sequence.Select(item => SpotifyUri.ForTrack(item)).ToArray() }, cancellationToken)); }
public Task <PlaylistSnapshot> AddAsync(int?position, CancellationToken cancellationToken) { return(this.SendAsync <PlaylistSnapshot, TrackUris>( HttpMethod.Post, new TrackUris { Uris = this.Sequence.Select(item => SpotifyUri.ForTrack(item)).ToArray() }, cancellationToken, optionalQueryStringParameters: new { position })); }
public Task <PlaylistSnapshot> RemoveAsync(CancellationToken cancellationToken) { return(this.SendAsync <PlaylistSnapshot, TrackUriWithPositions>( HttpMethod.Delete, new TrackUriWithPositions { Tracks = this.Sequence.Select(item => new TrackUriWithPosition { Uri = SpotifyUri.ForTrack(item) }).ToArray() }, cancellationToken)); }
public IPlaybackPlayWithOffsetBuilder Tracks(IEnumerable <string> ids) { return(new PlaybackPlayBuilder(this.playbackContext, new Body { TrackUris = ids.Select(item => SpotifyUri.ForTrack(item)).ToArray() })); }