webthing/event.py
def as_event_description(self):
        """
        Get the event description.

        Returns a dictionary describing the event.
        """
        description = {
            self.name: {
                'timestamp': self.time,
            },
        }

        if self.data is not None:
            description[self.name]['data'] = self.data

        return description
def as_event_description(self):
        description = {
            self.name: {
                'timestamp': self.time,
            },
        }

        if self.data is not None:
            description[self.name]['data'] = self.data

        return description
def as_event_description ( self ) : description = { self . name : { 'timestamp' : self . time , } , } if self . data is not None : description [ self . name ] [ 'data' ] = self . data return description
Get the event description.

        Returns a dictionary describing the event.
Get the event description .