Beispiel #1
0
    bool,
    int,
    str,
    Equals(None),
])

alert_words_event = event_dict_type(required_keys=[
    # force vertical formatting
    ("type", Equals("alert_words")),
    ("alert_words", ListType(str)),
])
check_alert_words = make_checker(alert_words_event)

attachment_message_type = DictType(required_keys=[
    # force vertical
    ("id", int),
    ("date_sent", int),
])

attachment_type = DictType(required_keys=[
    ("id", int),
    ("name", str),
    ("size", int),
    ("path_id", str),
    ("create_time", int),
    ("messages", ListType(attachment_message_type)),
])

attachment_add_event = event_dict_type(required_keys=[
    ("type", Equals("attachment")),
    ("op", Equals("add")),