mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add send get photo
This commit is contained in:
parent
19e7b15a9f
commit
56c6cf6839
2 changed files with 7 additions and 1 deletions
|
|
@ -103,7 +103,7 @@ class ApiMethods:
|
|||
SEND_CONTACT = 'sendContact'
|
||||
SEND_CHAT_ACTION = 'sendChatAction'
|
||||
GET_USER_PROFILE_PHOTOS = 'getUserProfilePhotos'
|
||||
GET_FILE = 'getFile' # TODO
|
||||
GET_FILE = 'getFile'
|
||||
KICK_CHAT_MEMBER = 'kickChatMember' # TODO
|
||||
UNBAN_CHAT_MEMBER = 'unbanChatMember' # TODO
|
||||
LEAVE_CHAT = 'leaveChat' # TODO
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import json
|
|||
|
||||
import aiohttp
|
||||
|
||||
from aiogram.types.file import File
|
||||
from aiogram.types.user_profile_photos import UserProfilePhotos
|
||||
from . import api
|
||||
from .api import ApiMethods
|
||||
|
|
@ -265,3 +266,8 @@ class AIOGramBot:
|
|||
payload = generate_payload(**locals())
|
||||
message = await self.request(ApiMethods.GET_USER_PROFILE_PHOTOS, payload)
|
||||
return self.prepare_object(UserProfilePhotos.de_json(message))
|
||||
|
||||
async def get_file(self, file_id):
|
||||
payload = generate_payload(**locals())
|
||||
message = await self.request(ApiMethods.GET_FILE, payload)
|
||||
return self.prepare_object(File.de_json(message))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue