(self, event_id, index, comment_text)
return error.get_response_json(response, logger)
Adds a comment to a single event.

        Args:
            event_id: id of the event
            index: The OpenSearch index name
            comment_text: text to add as a comment
        Returns:
             a json data of the query.
Adds a comment to a single event.
Adds a comment to a single event .
def comment_event(self, event_id, index, comment_text):
        """Adds a comment to a single event.

        Args:
            event_id: id of the event
            index: The OpenSearch index name
            comment_text: text to add as a comment
        Returns:
             a json data of the query.
        """
        if self.is_archived():
            raise RuntimeError(
                'Unable to comment on an event in an archived sketch.')

        form_data = {
            'annotation': comment_text,
            'annotation_type': 'comment',
            'events': {
                '_id': event_id,
                '_index': index,
                '_type': 'generic_event'}
        }
        resource_url = '{0:s}/sketches/{1:d}/event/annotate/'.format(
            self.api.api_root, self.id)
        response = self.api.session.post(resource_url, json=form_data)
        return error.get_response_json(response, logger)
def comment_event ( self , event_id , index , comment_text ) : if self . is_archived ( ) : raise RuntimeError ( 'Unable to comment on an event in an archived sketch.' ) form_data = { 'annotation' : comment_text , 'annotation_type' : 'comment' , 'events' : { '_id' : event_id , '_index' : index , '_type' : 'generic_event' } } resource_url = '{0:s}/sketches/{1:d}/event/annotate/' . format ( self . api . api_root , self . id ) response = self . api . session . post ( resource_url , json = form_data ) return error . get_response_json ( response , logger )