/// <summary> /// <para>Update the contents of a Cloud Doc. This should be called for files with a /// max size of 150MB. This route requires Cloud Docs auth. Please make a request to /// cloud_docs/authorize and supply that token in the Authorization header.</para> /// </summary> /// <param name="fileId">The file id</param> /// <param name="actorTokens">A list of auth_tokens, one for each editor who made /// changes to the document since the last call to update_content.</param> /// <param name="additionalContents">Currently, this will always be empty until we /// implement upload_additional_content.</param> /// <param name="body">The document to upload</param> /// <returns>The task that represents the asynchronous send operation. The TResult /// parameter contains the response from the server.</returns> /// <exception cref="Dropbox.Api.ApiException{TError}">Thrown if there is an error /// processing the request; This will contain a <see /// cref="UpdateContentError"/>.</exception> public t.Task <UpdateContentResult> UpdateContentAsync(string fileId, col.IEnumerable <string> actorTokens, col.IEnumerable <Content> additionalContents = null, io.Stream body = null) { var updateContentArg = new UpdateContentArg(fileId, actorTokens, additionalContents); return(this.UpdateContentAsync(updateContentArg, body)); }
/// <summary> /// <para>Begins an asynchronous send to the update content route.</para> /// </summary> /// <param name="fileId">The file id</param> /// <param name="actorTokens">A list of auth_tokens, one for each editor who made /// changes to the document since the last call to update_content.</param> /// <param name="additionalContents">Currently, this will always be empty until we /// implement upload_additional_content.</param> /// <param name="body">The document to upload</param> /// <param name="callback">The method to be called when the asynchronous send is /// completed.</param> /// <param name="callbackState">A user provided object that distinguished this send /// from other send requests.</param> /// <returns>An object that represents the asynchronous send request.</returns> public sys.IAsyncResult BeginUpdateContent(string fileId, col.IEnumerable <string> actorTokens, col.IEnumerable <Content> additionalContents = null, io.Stream body = null, sys.AsyncCallback callback = null, object callbackState = null) { var updateContentArg = new UpdateContentArg(fileId, actorTokens, additionalContents); return(this.BeginUpdateContent(updateContentArg, body, callback, callbackState)); }
/// <summary> /// <para>Begins an asynchronous send to the update content route.</para> /// </summary> /// <param name="updateContentArg">The request parameters.</param> /// <param name="body">The content to upload.</param> /// <param name="callback">The method to be called when the asynchronous send is /// completed.</param> /// <param name="state">A user provided object that distinguished this send from other /// send requests.</param> /// <returns>An object that represents the asynchronous send request.</returns> public sys.IAsyncResult BeginUpdateContent(UpdateContentArg updateContentArg, io.Stream body, sys.AsyncCallback callback, object state = null) { var task = this.UpdateContentAsync(updateContentArg, body); return(enc.Util.ToApm(task, callback, state)); }
/// <summary> /// <para>Update the contents of a Cloud Doc. This should be called for files with a /// max size of 150MB. This route requires Cloud Docs auth. Please make a request to /// cloud_docs/authorize and supply that token in the Authorization header.</para> /// </summary> /// <param name="updateContentArg">The request parameters</param> /// <param name="body">The content to upload.</param> /// <returns>The task that represents the asynchronous send operation. The TResult /// parameter contains the response from the server.</returns> /// <exception cref="Dropbox.Api.ApiException{TError}">Thrown if there is an error /// processing the request; This will contain a <see /// cref="UpdateContentError"/>.</exception> public t.Task <UpdateContentResult> UpdateContentAsync(UpdateContentArg updateContentArg, io.Stream body) { return(this.Transport.SendUploadRequestAsync <UpdateContentArg, UpdateContentResult, UpdateContentError>(updateContentArg, body, "content", "/cloud_docs/update_content", "user", global::Dropbox.Api.CloudDocs.UpdateContentArg.Encoder, global::Dropbox.Api.CloudDocs.UpdateContentResult.Decoder, global::Dropbox.Api.CloudDocs.UpdateContentError.Decoder)); }