コード例 #1
0
        /// <summary>
        /// Upload a video This method begins the video upload process for the authenticated user. For more information, see our [upload documentation](https://developer.vimeo.com/api/upload/videos).
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="inlineObject26"></param>
        /// <returns>ApiResponse of Video</returns>
        public VimeoOpenApi.Client.ApiResponse <Video> UploadVideoAlt1WithHttpInfo(InlineObject26 inlineObject26)
        {
            // verify the required parameter 'inlineObject26' is set
            if (inlineObject26 == null)
            {
                throw new VimeoOpenApi.Client.ApiException(400, "Missing required parameter 'inlineObject26' when calling VideosUploadsApi->UploadVideoAlt1");
            }

            VimeoOpenApi.Client.RequestOptions localVarRequestOptions = new VimeoOpenApi.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/json"
            };

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

            var localVarContentType = VimeoOpenApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

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

            var localVarAccept = VimeoOpenApi.Client.ClientUtils.SelectHeaderAccept(_accepts);

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

            localVarRequestOptions.Data = inlineObject26;

            // 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 = this.Client.Post <Video>("/me/videos", localVarRequestOptions, this.Configuration);

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

            return(localVarResponse);
        }
コード例 #2
0
        /// <summary>
        /// Upload a video This method begins the video upload process for the authenticated user. For more information, see our [upload documentation](https://developer.vimeo.com/api/upload/videos).
        /// </summary>
        /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="inlineObject26"></param>
        /// <returns>Task of Video</returns>
        public async System.Threading.Tasks.Task <Video> UploadVideoAlt1Async(InlineObject26 inlineObject26)
        {
            VimeoOpenApi.Client.ApiResponse <Video> localVarResponse = await UploadVideoAlt1AsyncWithHttpInfo(inlineObject26);

            return(localVarResponse.Data);
        }
コード例 #3
0
 /// <summary>
 /// Upload a video This method begins the video upload process for the authenticated user. For more information, see our [upload documentation](https://developer.vimeo.com/api/upload/videos).
 /// </summary>
 /// <exception cref="VimeoOpenApi.Client.ApiException">Thrown when fails to make API call</exception>
 /// <param name="inlineObject26"></param>
 /// <returns>Video</returns>
 public Video UploadVideoAlt1(InlineObject26 inlineObject26)
 {
     VimeoOpenApi.Client.ApiResponse <Video> localVarResponse = UploadVideoAlt1WithHttpInfo(inlineObject26);
     return(localVarResponse.Data);
 }