/// <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="userId">The ID of the user.</param> /// <param name="inlineObject50"></param> /// <returns>Task of Video</returns> public async System.Threading.Tasks.Task <Video> UploadVideoAsync(decimal userId, InlineObject50 inlineObject50) { VimeoOpenApi.Client.ApiResponse <Video> localVarResponse = await UploadVideoAsyncWithHttpInfo(userId, inlineObject50); return(localVarResponse.Data); }
/// <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="userId">The ID of the user.</param> /// <param name="inlineObject50"></param> /// <returns>Task of ApiResponse (Video)</returns> public async System.Threading.Tasks.Task <VimeoOpenApi.Client.ApiResponse <Video> > UploadVideoAsyncWithHttpInfo(decimal userId, InlineObject50 inlineObject50) { // verify the required parameter 'inlineObject50' is set if (inlineObject50 == null) { throw new VimeoOpenApi.Client.ApiException(400, "Missing required parameter 'inlineObject50' when calling VideosUploadsApi->UploadVideo"); } 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" }; foreach (var _contentType in _contentTypes) { localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); } foreach (var _accept in _accepts) { localVarRequestOptions.HeaderParameters.Add("Accept", _accept); } localVarRequestOptions.PathParameters.Add("user_id", VimeoOpenApi.Client.ClientUtils.ParameterToString(userId)); // path parameter localVarRequestOptions.Data = inlineObject50; // 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.PostAsync <Video>("/users/{user_id}/videos", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UploadVideo", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <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="userId">The ID of the user.</param> /// <param name="inlineObject50"></param> /// <returns>Video</returns> public Video UploadVideo(decimal userId, InlineObject50 inlineObject50) { VimeoOpenApi.Client.ApiResponse <Video> localVarResponse = UploadVideoWithHttpInfo(userId, inlineObject50); return(localVarResponse.Data); }