Add send get ussr profile photos

This commit is contained in:
Alex Root Junior 2017-05-30 23:18:47 +03:00
parent 5534b5b802
commit 19e7b15a9f
2 changed files with 7 additions and 1 deletions

View file

@ -102,7 +102,7 @@ class ApiMethods:
SEND_VENUE = 'sendVenue'
SEND_CONTACT = 'sendContact'
SEND_CHAT_ACTION = 'sendChatAction'
GET_USER_PROFILE_PHOTOS = 'getUserProfilePhotos' # TODO
GET_USER_PROFILE_PHOTOS = 'getUserProfilePhotos'
GET_FILE = 'getFile' # TODO
KICK_CHAT_MEMBER = 'kickChatMember' # TODO
UNBAN_CHAT_MEMBER = 'unbanChatMember' # TODO

View file

@ -3,6 +3,7 @@ import json
import aiohttp
from aiogram.types.user_profile_photos import UserProfilePhotos
from . import api
from .api import ApiMethods
from .types.chat import Chat
@ -259,3 +260,8 @@ class AIOGramBot:
payload = generate_payload(**locals())
message = await self.request(ApiMethods.SEND_CHAT_ACTION, payload)
return self.prepare_object(Message.de_json(message))
async def get_user_profile_photos(self, user_id, offset=None, limit=None):
payload = generate_payload(**locals())
message = await self.request(ApiMethods.GET_USER_PROFILE_PHOTOS, payload)
return self.prepare_object(UserProfilePhotos.de_json(message))