Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions exabyte_api_client/endpoints/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,19 @@ def delete(self, id_):
"""
return self.request("DELETE", "/".join((self.name, id_)), headers=self.headers)

def update(self, id_, modifier):
def update(self, id_, modifier, parameters=None):
"""
Updates a entity with given ID.

Args:
id_ (str): entity ID.
modifier (dict): a dictionary of key-values to update entity with.
parameters (dict): additional request parameters.

Returns:
dict: updated entity.
"""
return self.request("PATCH", "/".join((self.name, id_)), data=json.dumps(modifier), headers=self.headers)
return self.request("PATCH", "/".join((self.name, id_)), data=json.dumps(modifier), params=parameters, headers=self.headers)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add parameters as last


def create(self, config, owner_id=None):
"""
Expand Down
Loading