aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2023-01-04 15:51:34 +0100
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2023-01-04 15:51:34 +0100
commit1767724486352c149acc8ba8d38aa0daef85895a (patch)
tree11aea3105a720a35d431c72aec2a9a0cfe9b3d63
parentdd0c15c8b264341c1fb8e4e862467c1bbcfacb55 (diff)
downloadpython-phpipam-1767724486352c149acc8ba8d38aa0daef85895a.tar.gz
resources.py: Add 'object_id' parameter to create()
-rw-r--r--README.md2
-rwxr-xr-xphpipam_api/resources.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index e3c7c97..3bd7c41 100644
--- a/README.md
+++ b/README.md
@@ -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):