def save(self):
if self.object_id:<EOL><INDENT>if not self._track_changes:<EOL><INDENT>return True  <EOL><DEDENT>url = self.build_url(<EOL>self._endpoints.get('<STR_LIT>').format(id=self.object_id))<EOL>method = self.con.patch<EOL>data = self.to_api_data(restrict_keys=self._track_changes)<EOL><DEDENT>else:<EOL><INDENT>if self.calendar_id:<EOL><INDENT>url = self.build_url(<EOL>self._endpoints.get('<STR_LIT>').format(<EOL>id=self.calendar_id))<EOL><DEDENT>else:<EOL><INDENT>url = self.build_url(self._endpoints.get('<STR_LIT>'))<EOL><DEDENT>method = self.con.post<EOL>data = self.to_api_data()<EOL><DEDENT>response = method(url, data=data)<EOL>if not response:<EOL><INDENT>return False<EOL><DEDENT>self._track_changes.clear()  <EOL>if not self.object_id:<EOL><INDENT>event = response.json()<EOL>self.object_id = event.get(self._cc('<STR_LIT:id>'), None)<EOL>self.__created = event.get(self._cc('<STR_LIT>'), None)<EOL>self.__modified = event.get(self._cc('<STR_LIT>'), None)<EOL>self.__created = parse(self.__created).astimezone(<EOL>self.protocol.timezone) if self.__created else None<EOL>self.__modified = parse(self.__modified).astimezone(<EOL>self.protocol.timezone) if self.__modified else None<EOL><DEDENT>else:<EOL><INDENT>self.__modified = self.protocol.timezone.localize(dt.datetime.now())<EOL><DEDENT>return True<EOL>
Create a new event or update an existing one by checking what
        values have changed and update them on the server

        :return: Success / Failure
        :rtype: bool