diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2020-12-11 01:08:37 +0100 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2020-12-11 01:08:37 +0100 |
commit | 75204dcd93a06699669e51f6e34487aacbcde6a7 (patch) | |
tree | 9baca3c9b86c3d8563ef67fd87245447707e9243 /phpipam/backend.py | |
parent | 17bd5b60a6d1445d208c1486c5b937c7f7881154 (diff) | |
download | python-phpipam-75204dcd93a06699669e51f6e34487aacbcde6a7.tar.gz |
error handling, doc
Diffstat (limited to 'phpipam/backend.py')
-rwxr-xr-x | phpipam/backend.py | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/phpipam/backend.py b/phpipam/backend.py index 81af316..64dfcb0 100755 --- a/phpipam/backend.py +++ b/phpipam/backend.py @@ -14,24 +14,6 @@ class apiObjectNotFoundException(Exception): class phpipamBackend: def __init__(self, api_url, app_id, api_user, api_password): - """ - Parameters - ---------- - api_url : str - URL of the phpIPAM instance. Example: https://phpipam.example.com/ - app_id : str - AppID set in phpIPAM API settings - api_user : str - username, leave blank to use static token-authentication - api_password : str - user password or static auth token - - Raises - ------ - apiConnectionException - if the connection/authentification fails - """ - self.api_url = api_url.strip('/') + '/api/' + app_id self.api_user = api_user self.api_password = api_password @@ -62,8 +44,6 @@ class phpipamBackend: return expiration < datetime.datetime.now() def request ( self, method, url, data = {} ): - """Wrapper for _req for checking result and only returning data""" - if self._isTokenExpired(): self._getApiToken() |