Skip to content

Commit b3774f4

Browse files
committed
feat: support for notifcation URL when creating PDFs
1 parent e6bfdae commit b3774f4

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

dink/resources.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,14 @@ def __str__(self):
4949
return f'PDF: {self.store_key}'
5050

5151
@classmethod
52-
def create(cls,
52+
def create(
53+
cls,
5354
client,
5455
template_html,
5556
document_args,
5657
global_args=None,
57-
assets=None
58+
assets=None,
59+
notification_url=None
5860
):
5961
"""
6062
Create one or more PDFs. Returns a map of created PDFs with each key
@@ -72,8 +74,10 @@ def create(cls,
7274
'template_html': template_html,
7375
'document_args': json.dumps(document_args),
7476
'global_args': json.dumps(global_args) \
75-
if global_args else None
77+
if global_args else None,
78+
'notification_url': notification_url
7679
}
7780
)
7881

79-
return {k: cls(client, v) for k, v in results.items()}
82+
if notification_url is None:
83+
return {k: cls(client, v) for k, v in results.items()}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# Versions should comply with PEP440. For a discussion on single-sourcing
2222
# the version across setup.py and the project code, see
2323
# https://packaging.python.org/en/latest/single_source_version.html
24-
version='0.0.4',
24+
version='0.0.5',
2525
description=(
2626
'The DInk Python library provides a pythonic interface to the DInk '
2727
'API.',

0 commit comments

Comments
 (0)