How to use the aiogram.api.methods.base.Request function in aiogram

To help you get started, we’ve selected a few aiogram examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aiogram / aiogram / aiogram / api / methods / get_user_profile_photos.py View on Github external
def build_request(self) -> Request:
        data: Dict[str, Any] = self.dict()

        return Request(method="getUserProfilePhotos", data=data)
github aiogram / aiogram / aiogram / api / methods / get_file.py View on Github external
def build_request(self) -> Request:
        data: Dict[str, Any] = self.dict()

        return Request(method="getFile", data=data)
github aiogram / aiogram / aiogram / api / methods / send_animation.py View on Github external
def build_request(self) -> Request:
        data: Dict[str, Any] = self.dict(exclude={"animation", "thumb"})

        files: Dict[str, InputFile] = {}
        prepare_file(data=data, files=files, name="animation", value=self.animation)
        prepare_file(data=data, files=files, name="thumb", value=self.thumb)

        return Request(method="sendAnimation", data=data, files=files)
github aiogram / aiogram / aiogram / api / methods / set_sticker_position_in_set.py View on Github external
def build_request(self) -> Request:
        data: Dict[str, Any] = self.dict()

        return Request(method="setStickerPositionInSet", data=data)
github aiogram / aiogram / aiogram / api / methods / send_location.py View on Github external
def build_request(self) -> Request:
        data: Dict[str, Any] = self.dict()

        return Request(method="sendLocation", data=data)
github aiogram / aiogram / aiogram / api / methods / answer_pre_checkout_query.py View on Github external
def build_request(self) -> Request:
        data: Dict[str, Any] = self.dict()

        return Request(method="answerPreCheckoutQuery", data=data)
github aiogram / aiogram / aiogram / api / methods / get_webhook_info.py View on Github external
def build_request(self) -> Request:
        data: Dict[str, Any] = self.dict()

        return Request(method="getWebhookInfo", data=data)
github aiogram / aiogram / aiogram / api / methods / send_contact.py View on Github external
def build_request(self) -> Request:
        data: Dict[str, Any] = self.dict()

        return Request(method="sendContact", data=data)
github aiogram / aiogram / aiogram / api / methods / get_sticker_set.py View on Github external
def build_request(self) -> Request:
        data: Dict[str, Any] = self.dict()

        return Request(method="getStickerSet", data=data)
github aiogram / aiogram / aiogram / api / methods / edit_message_text.py View on Github external
def build_request(self) -> Request:
        data: Dict[str, Any] = self.dict()

        return Request(method="editMessageText", data=data)