diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2023-01-04 15:51:34 +0100 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2023-01-04 15:51:34 +0100 |
commit | 1767724486352c149acc8ba8d38aa0daef85895a (patch) | |
tree | 11aea3105a720a35d431c72aec2a9a0cfe9b3d63 | |
parent | dd0c15c8b264341c1fb8e4e862467c1bbcfacb55 (diff) | |
download | python-phpipam-1767724486352c149acc8ba8d38aa0daef85895a.tar.gz |
resources.py: Add 'object_id' parameter to create()
-rw-r--r-- | README.md | 2 | ||||
-rwxr-xr-x | phpipam_api/resources.py | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -24,7 +24,7 @@ Functions shared by all controllers: * `get()` returns all obejcts in in controller * `byID(object_id=<object id>)` get specific obejct by ID -* `create(data=<data>)` +* `create(object_id=<object id>, data=<data>)` * `edit(object_id=<object id>, data=<data>)` * `delete(object_id=<object id>)` diff --git a/phpipam_api/resources.py b/phpipam_api/resources.py index b8faef5..7d79166 100755 --- a/phpipam_api/resources.py +++ b/phpipam_api/resources.py @@ -124,7 +124,7 @@ class PhpipamResource: """object identified by object_id : str""" return self._backend.request('GET', f'/{self._type}/{object_id}') - def create(self, data): + def create(self, object_id, data): return self._backend.request('POST', f'/{self._type}/{object_id}', data=data) def edit(self, object_id, data): |