platypush/plugins/chat/telegram/__init__.py
def send_video(self, chat_id: Union[str, int],
                   file_id: Optional[int] = None,
                   url: Optional[str] = None,
                   path: Optional[str] = None,
                   duration: Optional[int] = None,
                   caption: Optional[str] = None,
                   width: Optional[int] = None,
                   height: Optional[int] = None,
                   parse_mode: Optional[str] = None,
                   disable_notification: bool = False,
                   reply_to_message_id: Optional[int] = None,
                   timeout: int = 20) -> TelegramMessageResponse:
        """
        Send a video to a chat.

        :param chat_id: Chat ID. Can be either a numerical ID or a unique identifier in the format ``@channelname``.
            In order to get your own Telegram chat_id open a conversation with
            `@IDBot <https://telegram.me/IDBot>`_ and type ``/start`` followed by ``/getid``. Similar procedures
            also exist to get a group or channel chat_id - just Google for "Telegram get channel/group chat_id".

        :param file_id: Set it if the file already exists on Telegram servers and has a file_id.
            Note that you'll have to specify either ``file_id``, ``url`` or ``path``.

        :param url: Set it if you want to send a file from a remote URL.
            Note that you'll have to specify either ``file_id``, ``url`` or ``path``.

        :param path: Set it if you want to send a file from the local filesystem.
            Note that you'll have to specify either ``file_id``, ``url`` or ``path``.

        :param duration: Duration in seconds.
        :param caption: Optional caption for the picture.
        :param width: Video width.
        :param height: Video height.
        :param parse_mode: Set to 'Markdown' or 'HTML' to send either Markdown or HTML content.
        :param disable_notification: If True then no notification will be sent to the users.
        :param reply_to_message_id: If set then the message will be sent as a response to the specified message.
        :param timeout: Upload timeout (default: 20 seconds)
        """

        telegram = self.get_telegram()

        with Resource(file_id=file_id, url=url, path=path) as resource:
            msg = telegram.bot.send_video(chat_id=chat_id,
                                          video=resource,
                                          duration=duration,
                                          caption=caption,
                                          width=width,
                                          height=height,
                                          disable_notification=disable_notification,
                                          reply_to_message_id=reply_to_message_id,
                                          timeout=timeout,
                                          parse_mode=parse_mode)

        return self.parse_msg(msg)

        Send a video to a chat.

        :param chat_id: Chat ID. Can be either a numerical ID or a unique identifier in the format ``@channelname``.
            In order to get your own Telegram chat_id open a conversation with
            `@IDBot <https://telegram.me/IDBot>`_ and type ``/start`` followed by ``/getid``. Similar procedures
            also exist to get a group or channel chat_id - just Google for "Telegram get channel/group chat_id".

        :param file_id: Set it if the file already exists on Telegram servers and has a file_id.
            Note that you'll have to specify either ``file_id``, ``url`` or ``path``.

        :param url: Set it if you want to send a file from a remote URL.
            Note that you'll have to specify either ``file_id``, ``url`` or ``path``.

        :param path: Set it if you want to send a file from the local filesystem.
            Note that you'll have to specify either ``file_id``, ``url`` or ``path``.

        :param duration: Duration in seconds.
        :param caption: Optional caption for the picture.
        :param width: Video width.
        :param height: Video height.
        :param parse_mode: Set to 'Markdown' or 'HTML' to send either Markdown or HTML content.
        :param disable_notification: If True then no notification will be sent to the users.
        :param reply_to_message_id: If set then the message will be sent as a response to the specified message.
        :param timeout: Upload timeout (default: 20 seconds)
        
Send a video to a chat.
Send a video to a chat .
def send_video(self, chat_id: Union[str, int],
                   file_id: Optional[int] = None,
                   url: Optional[str] = None,
                   path: Optional[str] = None,
                   duration: Optional[int] = None,
                   caption: Optional[str] = None,
                   width: Optional[int] = None,
                   height: Optional[int] = None,
                   parse_mode: Optional[str] = None,
                   disable_notification: bool = False,
                   reply_to_message_id: Optional[int] = None,
                   timeout: int = 20) -> TelegramMessageResponse:
        telegram = self.get_telegram()
        with Resource(file_id=file_id, url=url, path=path) as resource:
            msg = telegram.bot.send_video(chat_id=chat_id,
                                          video=resource,
                                          duration=duration,
                                          caption=caption,
                                          width=width,
                                          height=height,
                                          disable_notification=disable_notification,
                                          reply_to_message_id=reply_to_message_id,
                                          timeout=timeout,
                                          parse_mode=parse_mode)
        return self.parse_msg(msg)
def send_video ( self , chat_id : Union [ str , int ] , file_id : Optional [ int ] = None , url : Optional [ str ] = None , path : Optional [ str ] = None , duration : Optional [ int ] = None , caption : Optional [ str ] = None , width : Optional [ int ] = None , height : Optional [ int ] = None , parse_mode : Optional [ str ] = None , disable_notification : bool = False , reply_to_message_id : Optional [ int ] = None , timeout : int = 20 ) -> TelegramMessageResponse : telegram = self . get_telegram ( ) with Resource ( file_id = file_id , url = url , path = path ) as resource : msg = telegram . bot . send_video ( chat_id = chat_id , video = resource , duration = duration , caption = caption , width = width , height = height , disable_notification = disable_notification , reply_to_message_id = reply_to_message_id , timeout = timeout , parse_mode = parse_mode ) return self . parse_msg ( msg )
Send a video to a chat.
Send a video to a chat .
"""
        Send a video to a chat.

        :param chat_id: Chat ID. Can be either a numerical ID or a unique identifier in the format ``@channelname``.
            In order to get your own Telegram chat_id open a conversation with
            `@IDBot <https://telegram.me/IDBot>`_ and type ``/start`` followed by ``/getid``. Similar procedures
            also exist to get a group or channel chat_id - just Google for "Telegram get channel/group chat_id".

        :param file_id: Set it if the file already exists on Telegram servers and has a file_id.
            Note that you'll have to specify either ``file_id``, ``url`` or ``path``.

        :param url: Set it if you want to send a file from a remote URL.
            Note that you'll have to specify either ``file_id``, ``url`` or ``path``.

        :param path: Set it if you want to send a file from the local filesystem.
            Note that you'll have to specify either ``file_id``, ``url`` or ``path``.

        :param duration: Duration in seconds.
        :param caption: Optional caption for the picture.
        :param width: Video width.
        :param height: Video height.
        :param parse_mode: Set to 'Markdown' or 'HTML' to send either Markdown or HTML content.
        :param disable_notification: If True then no notification will be sent to the users.
        :param reply_to_message_id: If set then the message will be sent as a response to the specified message.
        :param timeout: Upload timeout (default: 20 seconds)
        """
self
chat_id
Union[str, int]
Chat ID. Can be either a numerical ID or a unique identifier in the format ``@channelname``.
In order to get your own Telegram chat_id open a conversation with
`@IDBot `_ and type ``/start`` followed by ``/getid``. Similar procedures
also exist to get a group or channel chat_id - just Google for "Telegram get channel/group chat_id".
Chat ID . Can be either a numerical ID or a unique identifier in the format ` ` @channelname ` ` . In order to get your own Telegram chat_id open a conversation with ` @IDBot ` _ and type ` ` / start ` ` followed by ` ` / getid ` ` . Similar procedures also exist to get a group or channel chat_id - just Google for " Telegram get channel / group chat_id " .
file_id
Optional[int]
Set it if the file already exists on Telegram servers and has a file_id.
Note that you'll have to specify either ``file_id``, ``url`` or ``path``.
Set it if the file already exists on Telegram servers and has a file_id . Note that you ' ll have to specify either ` ` file_id ` ` ` ` url ` ` or ` ` path ` ` .
url
Optional[str]
Set it if you want to send a file from a remote URL.
Note that you'll have to specify either ``file_id``, ``url`` or ``path``.
Set it if you want to send a file from a remote URL . Note that you ' ll have to specify either ` ` file_id ` ` ` ` url ` ` or ` ` path ` ` .
path
Optional[str]
Set it if you want to send a file from the local filesystem.
Note that you'll have to specify either ``file_id``, ``url`` or ``path``.
Set it if you want to send a file from the local filesystem . Note that you ' ll have to specify either ` ` file_id ` ` ` ` url ` ` or ` ` path ` ` .
duration
Optional[int]
Duration in seconds.
Duration in seconds .
caption
Optional[str]
Optional caption for the picture.
Optional caption for the picture .
width
Optional[int]
None
height
Optional[int]
None
parse_mode
Optional[str]
Set to 'Markdown' or 'HTML' to send either Markdown or HTML content.
Set to ' Markdown ' or ' HTML ' to send either Markdown or HTML content .
disable_notification
bool
If True then no notification will be sent to the users.
If True then no notification will be sent to the users .
reply_to_message_id
Optional[int]
If set then the message will be sent as a response to the specified message.
If set then the message will be sent as a response to the specified message .
timeout
int
Upload timeout (default: 20 seconds)
Upload timeout ( default : 20 seconds )