add html arg to update page
This commit is contained in:
parent
50617e94e8
commit
5d2e08eabc
|
@ -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)
|
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 = {}
|
||||||
headers.update(get_auth_header(token_id, token_secret))
|
headers.update(get_auth_header(token_id, token_secret))
|
||||||
|
|
||||||
data = {}
|
data = {}
|
||||||
data['markdown'] = markdown
|
data['markdown'] = markdown
|
||||||
|
data['html'] = html
|
||||||
|
|
||||||
requests.put(wiki_url + "/api/pages/{}".format(page_id), data=data, headers=headers)
|
requests.put(wiki_url + "/api/pages/{}".format(page_id), data=data, headers=headers)
|
||||||
|
|
Loading…
Reference in New Issue