-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwebhook.py
More file actions
27 lines (23 loc) · 788 Bytes
/
webhook.py
File metadata and controls
27 lines (23 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from base import BaseRequest
class WebHook(BaseRequest):
def create_svix_app(self) -> str:
"""
Create a Svix app and associate it with the current instance
"""
path = "webhooks/svix"
response = self._post(path)
return response["svix_url"]
def delete_svix_app(self) -> True:
"""
Delete a Svix app and disassociate it from the current instance
"""
path = "webhooks/svix"
data = self._delete(path)
return True
def create_svix_dashboard_url(self) -> str:
"""
Generate a new url for accessing the Svix's management dashboard for that particular instance
"""
path = "webhooks/svix_url"
data = self._post(path)
return data["svix_url"]