Skip to content

Commit 7f2c3e7

Browse files
author
Célian Haydont
committed
not use camelCase for named param
1 parent 38d70a2 commit 7f2c3e7

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

dataikuapi/dss/wiki.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,22 @@ def create_article(self, article_name, parent_id=None, content=None):
8989

9090
return article
9191

92-
def get_export_stream(self, paperSize="A4", exportAttachment=False):
92+
def get_export_stream(self, paper_size="A4", export_attachment=False):
9393
"""
9494
Download the whole wiki of the project in PDF format as a binary stream.
9595
Warning: this stream will monopolize the DSSClient until closed.
9696
"""
9797
body = {
98-
"paperSize": paperSize,
99-
"exportAttachment": exportAttachment
98+
"paperSize": paper_size,
99+
"exportAttachment": export_attachment
100100
}
101101
return self.client._perform_raw("POST", "/projects/%s/wiki/actions/export" % (self.project_key), body=body)
102102

103-
def export_to_file(self, path, paperSize="A4", exportAttachment=False):
103+
def export_to_file(self, path, paper_size="A4", export_attachment=False):
104104
"""
105105
Download the whole wiki of the project in PDF format into the given output file.
106106
"""
107-
with self.get_export_stream(paperSize=paperSize, exportAttachment=exportAttachment) as stream:
107+
with self.get_export_stream(paper_size=paper_size, export_attachment=export_attachment) as stream:
108108
with open(path, 'wb') as f:
109109
for chunk in stream.iter_content(chunk_size=10000):
110110
if chunk:
@@ -269,23 +269,23 @@ def get_uploaded_file(self, upload_id):
269269
"""
270270
return self.client._perform_raw("GET", "/projects/%s/wiki/%s/uploads/%s" % (self.project_key, self.article_id, upload_id))
271271

272-
def get_export_stream(self, paperSize="A4", exportChildren=False, exportAttachment=False):
272+
def get_export_stream(self, paper_size="A4", export_children=False, export_attachment=False):
273273
"""
274274
Download an article in PDF format as a binary stream.
275275
Warning: this stream will monopolize the DSSClient until closed.
276276
"""
277277
body = {
278-
"paperSize": paperSize,
279-
"exportChildren": exportChildren,
280-
"exportAttachment": exportAttachment
278+
"paperSize": paper_size,
279+
"exportChildren": export_children,
280+
"exportAttachment": export_attachment
281281
}
282282
return self.client._perform_raw("POST", "/projects/%s/wiki/%s/actions/export" % (self.project_key, self.article_id), body=body)
283283

284-
def export_to_file(self, path, paperSize="A4", exportChildren=False, exportAttachment=False):
284+
def export_to_file(self, path, paper_size="A4", export_children=False, export_attachment=False):
285285
"""
286286
Download an article in PDF format into the given output file.
287287
"""
288-
with self.get_export_stream(paperSize=paperSize, exportChildren=exportChildren, exportAttachment=exportAttachment) as stream:
288+
with self.get_export_stream(paper_size=paper_size, export_children=export_children, export_attachment=export_attachment) as stream:
289289
with open(path, 'wb') as f:
290290
for chunk in stream.iter_content(chunk_size=10000):
291291
if chunk:

0 commit comments

Comments
 (0)