diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-04-30 17:24:27 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-06-10 19:44:48 +0300 |
commit | fd3fd66a1db8925e5a9a3d34acdd213f49378877 (patch) | |
tree | 5246b011f1cd035417fbca0a361b78fc630b2317 /ick2/client.py | |
parent | 9759c2b51a1250aa345c21b7cc6b793f4965ac2d (diff) | |
download | ick2-fd3fd66a1db8925e5a9a3d34acdd213f49378877.tar.gz |
Add: notification service
Diffstat (limited to 'ick2/client.py')
-rw-r--r-- | ick2/client.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ick2/client.py b/ick2/client.py index 47941b5..e654d29 100644 --- a/ick2/client.py +++ b/ick2/client.py @@ -172,6 +172,12 @@ class ControllerClient: logging.info('Authentication URL: %r', url) return url + def get_notify_url(self): # pragma: no cover + version = self.get_version() + url = version.get('notify_url') + logging.info('Notification URL: %r', url) + return url + def get_auth_client(self): url = self.get_auth_url() ac = AuthClient() @@ -249,6 +255,10 @@ class ControllerClient: url = self.url(path) return self._api.get_blob(url) + def notify(self, notify): # pragma: no cover + url = self.get_notify_url() + self._api.post(url, body=notify) + class AuthClient: |