Ejemplo n.º 1
0
        /// <summary>
        /// Edit a poster on an On Demand page This method edits a poster image on the specified On Demand page. The authenticated user must be the owner of the page.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="ondemandId">The ID of the On Demand page.</param>
        /// <param name="posterId">The ID of the poster.</param>
        /// <param name="inlineObject32"> (optional)</param>
        /// <returns>Task of Picture</returns>
        public async System.Threading.Tasks.Task <Picture> EditVodPosterAsync(decimal ondemandId, decimal posterId, InlineObject32 inlineObject32 = default(InlineObject32))
        {
            VimeoOpenApi.Client.ApiResponse <Picture> localVarResponse = await EditVodPosterAsyncWithHttpInfo(ondemandId, posterId, inlineObject32);

            return(localVarResponse.Data);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Edit a poster on an On Demand page This method edits a poster image on the specified On Demand page. The authenticated user must be the owner of the page.
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="ondemandId">The ID of the On Demand page.</param>
        /// <param name="posterId">The ID of the poster.</param>
        /// <param name="inlineObject32"> (optional)</param>
        /// <returns>Task of ApiResponse (Picture)</returns>
        public async System.Threading.Tasks.Task <VimeoOpenApi.Client.ApiResponse <Picture> > EditVodPosterAsyncWithHttpInfo(decimal ondemandId, decimal posterId, InlineObject32 inlineObject32 = default(InlineObject32))
        {
            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/vnd.vimeo.picture+json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/vnd.vimeo.picture+json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            localVarRequestOptions.PathParameters.Add("ondemand_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(ondemandId)); // path parameter
            localVarRequestOptions.PathParameters.Add("poster_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(posterId));     // path parameter
            localVarRequestOptions.Data = inlineObject32;

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken);
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.PatchAsync <Picture>("/ondemand/pages/{ondemand_id}/pictures/{poster_id}", localVarRequestOptions, this.Configuration);

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

            return(localVarResponse);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Edit a poster on an On Demand page This method edits a poster image on the specified On Demand page. The authenticated user must be the owner of the page.
 /// </summary>
 /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="ondemandId">The ID of the On Demand page.</param>
 /// <param name="posterId">The ID of the poster.</param>
 /// <param name="inlineObject32"> (optional)</param>
 /// <returns>Picture</returns>
 public Picture EditVodPoster(decimal ondemandId, decimal posterId, InlineObject32 inlineObject32 = default(InlineObject32))
 {
     VimeoOpenApi.Client.ApiResponse <Picture> localVarResponse = EditVodPosterWithHttpInfo(ondemandId, posterId, inlineObject32);
     return(localVarResponse.Data);
 }