예제 #1
0
        public async Task <bool> UnfollowPlaylist(string playlistId)
        {
            Ensure.ArgumentNotNullOrEmptyString(playlistId, nameof(playlistId));

            var statusCode = await API
                             .Delete(URLs.PlaylistFollowers(playlistId), null, null)
                             .ConfigureAwait(false);

            return(statusCode == HttpStatusCode.OK);
        }
예제 #2
0
        public async Task <bool> FollowPlaylist(string playlistId, FollowPlaylistRequest request)
        {
            Ensure.ArgumentNotNullOrEmptyString(playlistId, nameof(playlistId));
            Ensure.ArgumentNotNull(request, nameof(request));

            var statusCode = await API
                             .Put(URLs.PlaylistFollowers(playlistId), null, request.BuildBodyParams())
                             .ConfigureAwait(false);

            return(statusCode == HttpStatusCode.OK);
        }