diff --git a/APSToolkitPython/src/aps_toolkit/Webhooks.py b/APSToolkitPython/src/aps_toolkit/Webhooks.py index bf2a52c..e2c4a2d 100644 --- a/APSToolkitPython/src/aps_toolkit/Webhooks.py +++ b/APSToolkitPython/src/aps_toolkit/Webhooks.py @@ -40,7 +40,7 @@ def get_all_app_hooks(self) -> dict: response = requests.get(url, headers=headers) return response.json() - def get_hook_by_id(self, hook_id: str, event="dm.version.added", system="data") -> dict: + def get_hook_by_id(self, hook_id: str, event: str = "dm.version.added", system: str = "data") -> dict: """ Get details of a webhook based on its webhook ID https://aps.autodesk.com/en/docs/webhooks/v1/reference/http/webhooks/systems-system-events-event-hooks-hook_id-GET/ @@ -57,7 +57,7 @@ def get_hook_by_id(self, hook_id: str, event="dm.version.added", system="data") response = requests.get(url, headers=headers) return response.json() - def delete_hook_by_id(self, hook_id: str, event="dm.version.added", system="data"): + def delete_hook_by_id(self, hook_id: str, event: str = "dm.version.added", system: str = "data"): """ Delete a webhook based on its webhook ID https://aps.autodesk.com/en/docs/webhooks/v1/reference/http/webhooks/systems-system-events-event-hooks-hook_id-DELETE/ @@ -73,8 +73,8 @@ def delete_hook_by_id(self, hook_id: str, event="dm.version.added", system="data } return requests.delete(url, headers=headers) - def create_system_event_hook(self, scope, callback_url="http://localhost:8080/api/webhooks/callback", - event="dm.version.added", system="data", hookAttribute=None): + def create_system_event_hook(self, scope: str, callback_url: str = "http://localhost:8080/api/webhooks/callback", + event: str = "dm.version.added", system: str = "data", hookAttribute: str = None): """ Add new webhooks to receive the notification on all the events. https://aps.autodesk.com/en/docs/webhooks/v1/reference/http/webhooks/systems-system-hooks-POST/ diff --git a/APSToolkitPython/src/test/context.py b/APSToolkitPython/src/test/context.py index 7586edd..76d0d11 100644 --- a/APSToolkitPython/src/test/context.py +++ b/APSToolkitPython/src/test/context.py @@ -25,6 +25,7 @@ from aps_toolkit import SVFMetadata from aps_toolkit import Bucket from aps_toolkit.units import DisplayUnits +from aps_toolkit import Webhooks APS_CLIENT_ID = os.environ["APS_CLIENT_ID"] APS_CLIENT_SECRET = os.environ["APS_CLIENT_SECRET"]