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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user