`<>`_

        :arg calendar_id: The ID of the calendar to modify
        :arg event_id: The ID of the event to remove from the calendar
13699
def delete_calendar_event(self, calendar_id, event_id, params=None):
        
        for param in (calendar_id, event_id):
            if param in SKIP_IN_PATH:
                raise ValueError("Empty value passed for a required argument.")
        return self.transport.perform_request(
            "DELETE",
            _make_path("_ml", "calendars", calendar_id, "events", event_id),
            params=params,
        )
823497
function(eventType, activityId) {
      var attrsKey = this._event_attributes_key(eventType);
      return this._events.some(function (evt) {
          if (evt.eventType === eventType) {
             if (this.activityIdFor(evt[attrsKey].scheduledEventId) === activityId) {
                return true;
             }
          }
       }, this);
   }
1117987
def get_calendar(self, calendar_id=None, calendar_name=None):
        
        if calendar_id and calendar_name:
            raise RuntimeError('Provide only one of the options')

        if not calendar_id and not calendar_name:
            raise RuntimeError('Provide one of the options')

        if calendar_id:
            # get calendar by it's id
            url = self.build_url(
                self._endpoints.get('get_calendar').format(id=calendar_id))
            params = None
        else:
            # get calendar by name
            url = self.build_url(self._endpoints.get('root_calendars'))
            params = {
                '$filter': "{} eq '{}'".format(self._cc('name'), calendar_name),
                '$top': 1}

        response = self.con.get(url, params=params)
        if not response:
            return None

        if calendar_id:
            data = response.json()
        else:
            data = response.json().get('value')
            data = data[0] if data else None
            if data is None:
                return None

        # Everything received from cloud must be passed as self._cloud_data_key
        return self.calendar_constructor(parent=self,
                                         **{self._cloud_data_key: data})
1305772
def edit(self, **kwargs):
        
        response = self._requester.request(
            'PUT',
            'calendar_events/{}'.format(self.id),
            _kwargs=combine_kwargs(**kwargs)
        )

        if 'title' in response.json():
            super(CalendarEvent, self).set_attributes(response.json())

        return CalendarEvent(self._requester, response.json())
295628
def _args_to_event(name_or_event, params={})
      raise ArgumentError, 'event parameters must be a hash' unless params.is_a?(Hash)

      case name_or_event
      when Event
        name_or_event.tap { |e| e.instance_variable_set(:@instance, self) }
      else
        Event.new(name_or_event, params.merge(instance: self))
      end
    end
1274118
def move_to(self, folder_id):
    
    if not folder_id:
      raise TypeError(u"You can't move an event to a non-existant folder")

    if not isinstance(folder_id, BASESTRING_TYPES):
      raise TypeError(u"folder_id must be a string")

    if not self.id:
      raise TypeError(u"You can't move an event that hasn't been created yet.")

    self.refresh_change_key()
    response_xml = self.service.send(soap_request.move_event(self, folder_id))
    new_id, new_change_key = self._parse_id_and_change_key_from_response(response_xml)
    if not new_id:
      raise ValueError(u"MoveItem returned success but requested item not moved")

    self._id = new_id
    self._change_key = new_change_key
    self.calendar_id = folder_id
    return self
834797
def upsert_event(self, calendar_id, event):
        
        event['start'] = format_event_time(event['start'])
        event['end'] = format_event_time(event['end'])
        self.request_handler.post(
            endpoint='calendars/%s/events' % calendar_id, data=event)
301363
def dispatch_event(event, subject='id'):
    
    def wrapper(method):
        def inner_wrapper(*args, **kwargs):
            resource = method(*args, **kwargs)
            if isinstance(resource, dict):
                subject_ = resource.get(subject)
                data = resource
            else:
                subject_ = getattr(resource, subject)
                data = resource.__dict__
            event(subject_, data).dispatch()
            return resource
        return inner_wrapper
    return wrapper
746350
def remove(event, value=nil)
      return unless @listeners[event]
      if value
        @listeners[event].delete(value)
        if @listeners[event].empty?
          @listeners.delete(event)
        end
      else
        @listeners.delete(event)
      end
    end
254095
def register_eventclass(event_id):
    
    def register(cls):
        if not issubclass(cls, Event):
            raise MessageException(('Cannot register a class that'
                                    ' is not a subclass of Event'))
        EVENT_REGISTRY[event_id] = cls
        logger.debug('######### Event registry is now: {0}'.format(
            EVENT_REGISTRY))
        return cls
    return register
115522
def discard_event(event: events.Event, bot_id: str = None) -> bool:
    
    if event["type"] in SKIP_EVENTS:
        return True
    elif bot_id and isinstance(event, events.Message):
        if event.get("bot_id") == bot_id:
            LOG.debug("Ignoring event: %s", event)
            return True
        elif "message" in event and event["message"].get("bot_id") == bot_id:
            LOG.debug("Ignoring event: %s", event)
            return True
    return False
1079109
def modify_calendar_resource(self, calres, attrs):
        
        attrs = [{'n': k, '_content': v} for k, v in attrs.items()]
        self.request('ModifyCalendarResource', {
            'id': self._get_or_fetch_id(
                calres, self.get_calendar_resource),
            'a': attrs
        })
1128579
def event(self, interface_id, key, value):
        
        LOG.info(
            "HMGeneric.event: address=%s, interface_id=%s, key=%s, value=%s"
            % (self._ADDRESS, interface_id, key, value))

        self._VALUES[key] = value   # Cache the value

        for callback in self._eventcallbacks:
            LOG.debug("HMGeneric.event: Using callback %s " % str(callback))
            callback(self._ADDRESS, interface_id, key, value)
59033
def remove(self, event=None):
        
        observers = self._pool.get(event)
        if observers:
            self._pool[event] = []
1339804
def bind(self, event_name, callback):
        

        if event_name not in self.event_callbacks.keys():
            self.event_callbacks[event_name] = []

        self.event_callbacks[event_name].append(callback)
638543
public void deleteCalendar(GoogleCalendar calendar) throws IOException {
        dao.calendars().delete(calendar.getId()).execute();
    }
1012119
def delete_event(self, client, check):
        
        self._request('DELETE', '/events/{}/{}'.format(client, check))
        return True