Skip to content

Commit ff622dd

Browse files
committed
feat: add messages list endpoint
1 parent 161c543 commit ff622dd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

knockapi/resources/messages.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
from .service import Service
22

33
class Messages(Service):
4+
def list(self, options=None):
5+
"""
6+
Gets a paginated list of Message records
7+
8+
Args:
9+
options (dict): An optional set of filtering options to pass to the query
10+
11+
Returns:
12+
dict: a paginated list of Message records
13+
"""
14+
endpoint = '/messages'
15+
return self.client.request('get', endpoint, payload=options)
16+
417
def get(self, id):
518
"""
619
Get a message by its id

0 commit comments

Comments
 (0)