From 66772edce6d09058ad0bbb620d10c17014efce29 Mon Sep 17 00:00:00 2001 From: KymikoLoco Date: Mon, 20 Mar 2017 16:26:35 -0400 Subject: [PATCH] Adding 'wiki' representation for 'convert_contentbody_to_new_type'. Tested on Confluence 5.10.1 --- PythonConfluenceAPI/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PythonConfluenceAPI/api.py b/PythonConfluenceAPI/api.py index 170fd7a..6a4e156 100644 --- a/PythonConfluenceAPI/api.py +++ b/PythonConfluenceAPI/api.py @@ -1122,6 +1122,7 @@ def convert_contentbody_to_new_type(self, content_data, old_representation, new_ -------------------------------------------------------------- "storage" | "view","export_view","editor" "editor" | "storage" + "wiki" | "storage" "view" | None "export_view" | None @@ -1133,7 +1134,7 @@ def convert_contentbody_to_new_type(self, content_data, old_representation, new_ :return: The JSON data returned from the contentbody/convert/{to} endpoint, or the results of the callback. Will raise requests.HTTPError on bad input, potentially. """ - assert {old_representation, new_representation} < {"storage", "editor", "view", "export_view"} + assert {old_representation, new_representation} < {"storage", "editor", "view", "export_view", "wiki"} # TODO: Enforce conversion rules better here. request_data = {"value": str(content_data), "representation": old_representation} return self._service_post_request("rest/api/contentbody/convert/{to}".format(to=new_representation),