Skip to content

Commit a1cba01

Browse files
committed
chore(workflows): actor is optional
1 parent ae3ed47 commit a1cba01

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

knockapi/client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,12 @@ def notify(self, key, actor, recipients, data={}, cancellation_key=None, tenant=
7070
7171
Args:
7272
key (str): The key of the workflow to invoke.
73-
actor (str): The ID of the actor performing this action.
74-
recipients (array): An array of user IDs of who should be notified.
73+
actor (str or dict): An optional reference for who/what performed the action.
74+
recipients (array): An array of recipient identifiers of who/what should be notified.
7575
data (dict): Any data to be passed to the notify call.
7676
tenant (str): An optional identifier for the tenant object that the notifications
77-
cancellation_key (str): A key used to cancel this workflow.
77+
belong to.
78+
cancellation_key (str): A key used to cancel this notify.
7879
7980
Returns:
8081
dict: Response from Knock.

knockapi/resources/workflows.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def trigger(self, key, actor, recipients, data={}, cancellation_key=None, tenant
88
99
Args:
1010
key (str): The key of the workflow to invoke.
11-
actor (str or dict): A recipient reference of who performed the action.
11+
actor (str or dict): An optional reference for who/what performed the action.
1212
recipients (array): An array of recipient identifiers of who/what should be notified.
1313
data (dict): Any data to be passed to the notify call.
1414
tenant (str): An optional identifier for the tenant object that the notifications

0 commit comments

Comments
 (0)