public Task <SnapshotResponse> AddItems(string playlistId, PlaylistAddItemsRequest request) { Ensure.ArgumentNotNullOrEmptyString(playlistId, nameof(playlistId)); Ensure.ArgumentNotNull(request, nameof(request)); return(API.Post <SnapshotResponse>(URLs.PlaylistTracks(playlistId), null, request.BuildBodyParams())); }
public Task <Paging <PlaylistTrack <IPlayableItem> > > GetItems(string playlistId, PlaylistGetItemsRequest request) { Ensure.ArgumentNotNullOrEmptyString(playlistId, nameof(playlistId)); Ensure.ArgumentNotNull(request, nameof(request)); return(API.Get <Paging <PlaylistTrack <IPlayableItem> > >(URLs.PlaylistTracks(playlistId), request.BuildQueryParams())); }
public async Task <bool> ReplaceItems(string playlistId, PlaylistReplaceItemsRequest request) { Ensure.ArgumentNotNullOrEmptyString(playlistId, nameof(playlistId)); Ensure.ArgumentNotNull(request, nameof(request)); var statusCode = await API.Put(URLs.PlaylistTracks(playlistId), null, request.BuildBodyParams()).ConfigureAwait(false); return(statusCode == HttpStatusCode.Created); }