1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Implemented getUserProfilePhotos (Though I do not see the use of it currently, because bots cannot download photos with the API)

This commit is contained in:
pieter
2015-06-30 16:40:44 +02:00
parent 77580e6784
commit 759474924d
4 changed files with 40 additions and 5 deletions

View File

@@ -256,6 +256,13 @@ class Location:
class UserProfilePhotos:
@classmethod
def de_json(cls, json_string):
obj = json.loads(json_string)
total_count = obj['total_count']
photos = [[PhotoSize.de_json(json.dumps(y)) for y in x] for x in obj['photos']]
return UserProfilePhotos(total_count, photos)
def __init__(self, total_count, photos):
self.total_count = total_count
self.photos = photos