python-telegram-bot/telegram/groupchat.py
2015-07-19 23:25:44 -03:00

22 lines
469 B
Python

#!/usr/bin/env python
from .base import TelegramObject
class GroupChat(TelegramObject):
def __init__(self,
id,
title):
self.id = id
self.title = title
@staticmethod
def de_json(data):
return GroupChat(id=data.get('id', None),
title=data.get('title', None))
def to_dict(self):
data = {'id': self.id,
'title': self.title}
return data