def patch(self, params, key, **kwargs): body_data = {key: value for (key, value) in kwargs.items()} resp_ok, resp_status, resp_data = self.__request('PATCH', params=params, key=key, body=body_data) if resp_ok and resp_status == 200: return True else: raise exceptions.UpdateException(resp_data)
def patch(self, params, key, **kwargs): body_data = {key: value for (key, value) in kwargs.items()} resp_ok, resp_status, resp_data = self.__request('PATCH', params=params, key=key, body=body_data) if resp_ok and resp_status == 200: return resp_data if resp_status == 404: raise exceptions.NotFoundException("object not found with id {}".format(key), from_con=True) raise exceptions.UpdateException(resp_data)
def patch(self, params, key, **kwargs): if self.auth: raise exceptions.AuthException( 'With basic auth the API is not writable') body_data = {key: value for (key, value) in kwargs.items()} resp_ok, resp_status, resp_data = self.__request('PATCH', params=params, key=key, body=body_data) if resp_ok and resp_status == 200: return True else: raise exceptions.UpdateException(resp_data)