rename file and change method names/arg orders
This commit is contained in:
parent
4d2eb88f8c
commit
e7d3657c5d
|
@ -7,7 +7,7 @@ def get_auth_header(token_id, token_secret):
|
|||
return {"Authorization": "Token {}:{}".format(token_id, token_secret)}
|
||||
|
||||
|
||||
def get_page_export_html(page_id, wiki_url, token_id, token_secret):
|
||||
def get_page_html(wiki_url, token_id, token_secret, page_id):
|
||||
headers = {}
|
||||
headers.update(get_auth_header(token_id, token_secret))
|
||||
|
||||
|
@ -20,14 +20,14 @@ def get_attachments(wiki_url, token_id, token_secret):
|
|||
headers = {}
|
||||
headers.update(get_auth_header(token_id, token_secret))
|
||||
|
||||
r = requests.get(wiki_url + "/api/attachments/", headers=headers)
|
||||
r = requests.get(wiki_url + "/api/attachments", headers=headers)
|
||||
|
||||
attachment_data = json.loads(r.text)['data']
|
||||
|
||||
return attachment_data
|
||||
|
||||
|
||||
def get_attachment_id(attachment_name, page_id, wiki_url, token_id, token_secret):
|
||||
def get_attachment_id(wiki_url, token_id, token_secret, attachment_name, page_id):
|
||||
attachment_data = get_attachments(wiki_url, token_id, token_secret)
|
||||
|
||||
for attachment in attachment_data:
|
||||
|
@ -37,7 +37,7 @@ def get_attachment_id(attachment_name, page_id, wiki_url, token_id, token_secret
|
|||
return None
|
||||
|
||||
|
||||
def get_attachment_contents(attachment_id, wiki_url, token_id, token_secret):
|
||||
def get_attachment(wiki_url, token_id, token_secret, attachment_id):
|
||||
headers = {}
|
||||
headers.update(get_auth_header(token_id, token_secret))
|
||||
|
||||
|
@ -48,7 +48,7 @@ def get_attachment_contents(attachment_id, wiki_url, token_id, token_secret):
|
|||
return attachment_data_decoded
|
||||
|
||||
|
||||
def update_page(page_id, markdown, wiki_url, token_id, token_secret):
|
||||
def update_page(wiki_url, token_id, token_secret, page_id, markdown):
|
||||
headers = {}
|
||||
headers.update(get_auth_header(token_id, token_secret))
|
||||
|
Loading…
Reference in New Issue