We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2527735 commit 2c10c0aCopy full SHA for 2c10c0a
examples/base_resource.py
@@ -0,0 +1,18 @@
1
+import os
2
+
3
+from sparkpost.base import Resource
4
5
6
+class Webhooks(Resource):
7
+ key = "webhooks"
8
9
+ def list(self, **kwargs):
10
+ results = self.request('GET', self.uri, **kwargs)
11
+ return results
12
13
14
+api_key = os.environ.get('SPARKPOST_API_KEY', None)
15
+webhooks = Webhooks('https://api.sparkpost.com/api/v1', api_key)
16
17
+# returns a list of webhooks for your account
18
+print(webhooks.list())
0 commit comments