add html arg to update page

This commit is contained in:
Sarah 2022-02-26 14:43:50 +00:00
parent 50617e94e8
commit 5d2e08eabc
1 changed files with 2 additions and 1 deletions

View File

@ -69,11 +69,12 @@ def delete_attachment(wiki_url, token_id, token_secret, attachment_id):
requests.delete(wiki_url + "/api/attachments/{}".format(attachment_id), headers=headers)
def update_page(wiki_url, token_id, token_secret, page_id, markdown):
def update_page(wiki_url, token_id, token_secret, page_id, markdown=None, html=None):
headers = {}
headers.update(get_auth_header(token_id, token_secret))
data = {}
data['markdown'] = markdown
data['html'] = html
requests.put(wiki_url + "/api/pages/{}".format(page_id), data=data, headers=headers)