コード例 #1
0
 public IPlaybackPlayBuilder StartAt(string trackId)
 {
     return(new PlaybackPlayBuilder(this.playbackContext, new Body(this.body)
     {
         Offset = new Offset {
             TrackUri = SpotifyUri.ForTrack(trackId)
         }
     }));
 }
コード例 #2
0
 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));
 }
コード例 #3
0
 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 }));
 }
コード例 #4
0
 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));
 }
コード例 #5
0
 public IPlaybackPlayWithOffsetBuilder Tracks(IEnumerable <string> ids)
 {
     return(new PlaybackPlayBuilder(this.playbackContext, new Body {
         TrackUris = ids.Select(item => SpotifyUri.ForTrack(item)).ToArray()
     }));
 }