Dapplo.Confluence
Dapplo.Confluence copied to clipboard
Using UpdateAsync doesn't work well, am I doing it wrong?
In order to get the UpdateAsync method to be accepted by Visual Studios I had to build and use a Content variable as follows:
Content content = confluenceClient.Content.GetAsync(contentDigest.Id).Result; String bodyViewValue = content.Body.View.Value;
content.Body.View.Value = PageBody; //Page Body is an string variable with HTML text in it content.Version.Number++; content.Version.When = DateTimeOffset.Now; content.Version.IsMinorEdit = true; content.Version.Message = "New Revision of the Document";
confluenceClient.Content.UpdateAsync(content).Wait();
Once I do that it will run, but it does not publish the content to the edited page. And looking at the page edits does not show any changes that should be there.
Also the Version.Message is blank.
Am I building the method call correctly? How do I get it to publish the page?
I got the functions to delete the existing page and then creating the new page to work, but I don't want to lose the page history.
I believe you'll want to use content.Body.View.Storage
instead of content.Body.View.Value
.