Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="ErsatzTV.Api.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="id"></param>
        /// <param name="requestBody"></param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse (List&lt;MediaItemViewModel&gt;)</returns>
        public async System.Threading.Tasks.Task <ErsatzTV.Api.Sdk.Client.ApiResponse <List <MediaItemViewModel> > > ApiMediaCollectionsIdItemsPutWithHttpInfoAsync(int id, List <int> requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            // verify the required parameter 'requestBody' is set
            if (requestBody == null)
            {
                throw new ErsatzTV.Api.Sdk.Client.ApiException(400, "Missing required parameter 'requestBody' when calling MediaCollectionsApi->ApiMediaCollectionsIdItemsPut");
            }


            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.PathParameters.Add("id", ErsatzTV.Api.Sdk.Client.ClientUtils.ParameterToString(id)); // path parameter
            localVarRequestOptions.Data = requestBody;


            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.PutAsync <List <MediaItemViewModel> >("/api/media/collections/{id}/items", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);

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

            return(localVarResponse);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="ErsatzTV.Api.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="updateChannel"></param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse (ChannelViewModel)</returns>
        public async System.Threading.Tasks.Task <ErsatzTV.Api.Sdk.Client.ApiResponse <ChannelViewModel> > ApiChannelsPatchWithHttpInfoAsync(UpdateChannel updateChannel, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            // verify the required parameter 'updateChannel' is set
            if (updateChannel == null)
            {
                throw new ErsatzTV.Api.Sdk.Client.ApiException(400, "Missing required parameter 'updateChannel' when calling ChannelsApi->ApiChannelsPatch");
            }


            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 = updateChannel;


            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.PatchAsync <ChannelViewModel>("/api/channels", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);

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

            return(localVarResponse);
        }
Ejemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="ErsatzTV.Api.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="deleteFFmpegProfile"></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> > ApiFfmpegProfilesDeleteWithHttpInfoAsync(DeleteFFmpegProfile deleteFFmpegProfile, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            // verify the required parameter 'deleteFFmpegProfile' is set
            if (deleteFFmpegProfile == null)
            {
                throw new ErsatzTV.Api.Sdk.Client.ApiException(400, "Missing required parameter 'deleteFFmpegProfile' when calling FFmpegProfileApi->ApiFfmpegProfilesDelete");
            }


            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 = deleteFFmpegProfile;


            // make the HTTP request

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

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

            return(localVarResponse);
        }
Ejemplo n.º 4
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="ErsatzTV.Api.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="createSimpleMediaCollection"></param>
        /// <returns>ApiResponse of MediaCollectionViewModel</returns>
        public ErsatzTV.Api.Sdk.Client.ApiResponse <MediaCollectionViewModel> ApiMediaCollectionsPostWithHttpInfo(CreateSimpleMediaCollection createSimpleMediaCollection)
        {
            // verify the required parameter 'createSimpleMediaCollection' is set
            if (createSimpleMediaCollection == null)
            {
                throw new ErsatzTV.Api.Sdk.Client.ApiException(400, "Missing required parameter 'createSimpleMediaCollection' when calling MediaCollectionsApi->ApiMediaCollectionsPost");
            }

            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 = createSimpleMediaCollection;


            // make the HTTP request
            var localVarResponse = this.Client.Post <MediaCollectionViewModel>("/api/media/collections", localVarRequestOptions, this.Configuration);

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

            return(localVarResponse);
        }
Ejemplo n.º 5
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="ErsatzTV.Api.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="deleteChannel"></param>
        /// <returns>ApiResponse of Object(void)</returns>
        public ErsatzTV.Api.Sdk.Client.ApiResponse <Object> ApiChannelsDeleteWithHttpInfo(DeleteChannel deleteChannel)
        {
            // verify the required parameter 'deleteChannel' is set
            if (deleteChannel == null)
            {
                throw new ErsatzTV.Api.Sdk.Client.ApiException(400, "Missing required parameter 'deleteChannel' when calling ChannelsApi->ApiChannelsDelete");
            }

            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 = deleteChannel;


            // make the HTTP request
            var localVarResponse = this.Client.Delete <Object>("/api/channels", localVarRequestOptions, this.Configuration);

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

            return(localVarResponse);
        }
Ejemplo n.º 6
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="ErsatzTV.Api.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="updatePlayout"></param>
        /// <returns>ApiResponse of PlayoutViewModel</returns>
        public ErsatzTV.Api.Sdk.Client.ApiResponse <PlayoutViewModel> ApiPlayoutsPatchWithHttpInfo(UpdatePlayout updatePlayout)
        {
            // verify the required parameter 'updatePlayout' is set
            if (updatePlayout == null)
            {
                throw new ErsatzTV.Api.Sdk.Client.ApiException(400, "Missing required parameter 'updatePlayout' when calling PlayoutApi->ApiPlayoutsPatch");
            }

            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 = updatePlayout;


            // make the HTTP request
            var localVarResponse = this.Client.Patch <PlayoutViewModel>("/api/playouts", localVarRequestOptions, this.Configuration);

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

            return(localVarResponse);
        }
Ejemplo n.º 7
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="ErsatzTV.Api.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="id"></param>
        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
        /// <returns>Task of ApiResponse (List&lt;MediaItemViewModel&gt;)</returns>
        public async System.Threading.Tasks.Task <ErsatzTV.Api.Sdk.Client.ApiResponse <List <MediaItemViewModel> > > ApiMediaCollectionsIdItemsGetWithHttpInfoAsync(int id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            ErsatzTV.Api.Sdk.Client.RequestOptions localVarRequestOptions = new ErsatzTV.Api.Sdk.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // 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.PathParameters.Add("id", ErsatzTV.Api.Sdk.Client.ClientUtils.ParameterToString(id)); // path parameter


            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.GetAsync <List <MediaItemViewModel> >("/api/media/collections/{id}/items", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);

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

            return(localVarResponse);
        }
Ejemplo n.º 8
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="ErsatzTV.Api.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="id"></param>
        /// <returns>ApiResponse of List&lt;MediaItemViewModel&gt;</returns>
        public ErsatzTV.Api.Sdk.Client.ApiResponse <List <MediaItemViewModel> > ApiMediaCollectionsIdItemsGetWithHttpInfo(int id)
        {
            ErsatzTV.Api.Sdk.Client.RequestOptions localVarRequestOptions = new ErsatzTV.Api.Sdk.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // 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.PathParameters.Add("id", ErsatzTV.Api.Sdk.Client.ClientUtils.ParameterToString(id)); // path parameter


            // make the HTTP request
            var localVarResponse = this.Client.Get <List <MediaItemViewModel> >("/api/media/collections/{id}/items", localVarRequestOptions, this.Configuration);

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

            return(localVarResponse);
        }
Ejemplo n.º 9
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="ErsatzTV.Api.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="channelId"></param>
        /// <returns>ApiResponse of ChannelViewModel</returns>
        public ErsatzTV.Api.Sdk.Client.ApiResponse <ChannelViewModel> ApiChannelsChannelIdGetWithHttpInfo(int channelId)
        {
            ErsatzTV.Api.Sdk.Client.RequestOptions localVarRequestOptions = new ErsatzTV.Api.Sdk.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // 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.PathParameters.Add("channelId", ErsatzTV.Api.Sdk.Client.ClientUtils.ParameterToString(channelId)); // path parameter


            // make the HTTP request
            var localVarResponse = this.Client.Get <ChannelViewModel>("/api/channels/{channelId}", localVarRequestOptions, this.Configuration);

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

            return(localVarResponse);
        }
Ejemplo n.º 10
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="ErsatzTV.Api.Sdk.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>ApiResponse of List&lt;PlayoutViewModel&gt;</returns>
        public ErsatzTV.Api.Sdk.Client.ApiResponse <List <PlayoutViewModel> > ApiPlayoutsGetWithHttpInfo()
        {
            ErsatzTV.Api.Sdk.Client.RequestOptions localVarRequestOptions = new ErsatzTV.Api.Sdk.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // 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);
            }



            // make the HTTP request
            var localVarResponse = this.Client.Get <List <PlayoutViewModel> >("/api/playouts", localVarRequestOptions, this.Configuration);

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

            return(localVarResponse);
        }