Exemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <exception cref="ErsatzTV.Api.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="deletePlayout"></param>
 /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
 /// <returns>Task of void</returns>
 public async System.Threading.Tasks.Task ApiPlayoutsDeleteAsync(DeletePlayout deletePlayout, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     await ApiPlayoutsDeleteWithHttpInfoAsync(deletePlayout, cancellationToken).ConfigureAwait(false);
 }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="ErsatzTV.Api.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="deletePlayout"></param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse</returns>
        public async System.Threading.Tasks.Task <ErsatzTV.Api.Sdk.Client.ApiResponse <Object> > ApiPlayoutsDeleteWithHttpInfoAsync(DeletePlayout deletePlayout, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            // verify the required parameter 'deletePlayout' is set
            if (deletePlayout == null)
            {
                throw new ErsatzTV.Api.Sdk.Client.ApiException(400, "Missing required parameter 'deletePlayout' when calling PlayoutApi->ApiPlayoutsDelete");
            }


            ErsatzTV.Api.Sdk.Client.RequestOptions localVarRequestOptions = new ErsatzTV.Api.Sdk.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/json-patch+json",
                "application/json",
                "text/json",
                "application/_*+json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };


            var localVarContentType = ErsatzTV.Api.Sdk.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = ErsatzTV.Api.Sdk.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.Data = deletePlayout;


            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.DeleteAsync <Object>("/api/playouts", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("ApiPlayoutsDelete", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Exemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <exception cref="ErsatzTV.Api.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="deletePlayout"></param>
 /// <returns></returns>
 public void ApiPlayoutsDelete(DeletePlayout deletePlayout)
 {
     ApiPlayoutsDeleteWithHttpInfo(deletePlayout);
 }