Пример #1
0
        public async Task <IActionResult> DeleteLibrary(int libraryId, CancellationToken token = default(CancellationToken))
        {
            var request = new DeleteLibraryRequest(libraryId);
            await _commandProcessor.SendAsync(request, cancellationToken : token);

            return(new NoContentResult());
        }
        /// <summary>
        /// 删除 PaaS 服务媒体库
        /// </summary>
        /// <param name="req"><see cref="DeleteLibraryRequest"/></param>
        /// <returns><see cref="DeleteLibraryResponse"/></returns>
        public DeleteLibraryResponse DeleteLibrarySync(DeleteLibraryRequest req)
        {
            JsonResponseModel <DeleteLibraryResponse> rsp = null;

            try
            {
                var strResp = this.InternalRequestSync(req, "DeleteLibrary");
                rsp = JsonConvert.DeserializeObject <JsonResponseModel <DeleteLibraryResponse> >(strResp);
            }
            catch (JsonSerializationException e)
            {
                throw new TencentCloudSDKException(e.Message);
            }
            return(rsp.Response);
        }