Skip to content

Commit 511a634

Browse files
feat: add message delivery logs method (#35)
* feat: add message delivery logs method * Update method desc
1 parent 7d27396 commit 511a634

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

knockapi/resources/messages.py

+13
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,16 @@ def get_events(self, id, options=None):
121121
"""
122122
endpoint = '/messages/{}/events'.format(id)
123123
return self.client.request('get', endpoint, options)
124+
125+
def get_delivery_logs(self, id, options=None):
126+
"""
127+
Get a message's delivery logs by its id
128+
129+
Args:
130+
id: The message ID
131+
132+
Returns:
133+
dict: paginated MessageDeliveryLog response from Knock.
134+
"""
135+
endpoint = '/messages/{}/delivery_logs'.format(id)
136+
return self.client.request('get', endpoint, options)

0 commit comments

Comments
 (0)