def batch_proceed(self, records_or_modesls, action, assignee=""): url = self.API_ROOT.format(self.account.domain, "records/status.json") data = [ self.__to_proceed_format(rm, action, assignee) for rm in records_or_modesls ] data = {"app": self.app_id, "records": data} resp = self._request("PUT", url, params_or_data=data) r = mr.BatchUpdateResult(resp) return r
def batch_update(self, records_or_models): url = self.__multiple() _records = [self.__to_update_format(r) for r in records_or_models] data = {"app": self.app_id, "records": _records} resp = self._request("PUT", url, params_or_data=data) r = mr.BatchUpdateResult(resp) return r