Exemple #1
0
        public virtual ApiArtistClientRequestModel MapClientResponseToRequest(
            ApiArtistClientResponseModel response)
        {
            var request = new ApiArtistClientRequestModel();

            request.SetProperties(
                response.AspNetUserId,
                response.Bio,
                response.ExternalId,
                response.Facebook,
                response.Name,
                response.SoundCloud,
                response.Twitter,
                response.Venmo,
                response.Website);
            return(request);
        }
        public virtual async Task <UpdateResponse <ApiArtistClientResponseModel> > ArtistUpdateAsync(int id, ApiArtistClientRequestModel item, CancellationToken cancellationToken = default(CancellationToken))
        {
            HttpResponseMessage httpResponse = await this.Client.PutAsJsonAsync($"api/Artists/{id}", item, cancellationToken).ConfigureAwait(false);

            this.HandleResponseCode(httpResponse);
            return(JsonConvert.DeserializeObject <UpdateResponse <ApiArtistClientResponseModel> >(httpResponse.Content.ContentToString()));
        }