From 1767724486352c149acc8ba8d38aa0daef85895a Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Wed, 4 Jan 2023 15:51:34 +0100 Subject: resources.py: Add 'object_id' parameter to create() --- README.md | 2 +- phpipam_api/resources.py | 2 +- 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=)` get specific obejct by ID -* `create(data=)` +* `create(object_id=, data=)` * `edit(object_id=, data=)` * `delete(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): -- cgit v1.2.3