implement de_list

This commit is contained in:
Jannes Höke 2016-04-17 12:43:09 +02:00
parent 5cccf2603b
commit 5f19452dd7

View file

@ -51,3 +51,21 @@ class MessageEntity(TelegramObject):
data = super(MessageEntity, MessageEntity).de_json(data)
return MessageEntity(**data)
@staticmethod
def de_list(data):
"""
Args:
data (list):
Returns:
List<telegram.MessageEntity>:
"""
if not data:
return list()
entities = list()
for entity in data:
entities.append(MessageEntity.de_json(entity))
return entities