mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-02-18 03:16:35 +01:00
21 lines
644 B
Python
21 lines
644 B
Python
#!/usr/bin/env python
|
|
|
|
|
|
class PhotoSize(object):
|
|
def __init__(self, **kwargs):
|
|
param_defaults = {
|
|
'file_id': None,
|
|
'width': None,
|
|
'height': None,
|
|
'file_size': None
|
|
}
|
|
|
|
for (param, default) in param_defaults.iteritems():
|
|
setattr(self, param, kwargs.get(param, default))
|
|
|
|
@staticmethod
|
|
def newFromJsonDict(data):
|
|
return PhotoSize(file_id=data.get('file_id', None),
|
|
width=data.get('width', None),
|
|
height=data.get('height', None),
|
|
file_size=data.get('file_size', None))
|