a
    :¶g  ã                   @  sP   d dl mZ d dlmZmZmZ ddlmZ ddlm	Z	 G dd„ de	e
 ƒZd	S )
é    )Úannotations)ÚTYPE_CHECKINGÚAnyÚOptionalé   )Ú	InputFileé   )ÚTelegramMethodc                      s¤   e Zd ZU dZeZdZded< dZded< dZ	ded	< dZ
d
ed< dZded< dZded< dZded< erœdddddddœdddd
ddddddœ	‡ fdd„Z‡  ZS )Ú
SetWebhooka¼  
    Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request (a request with response `HTTP status code <https://en.wikipedia.org/wiki/List_of_HTTP_status_codes>`_ different from :code:`2XY`), we will repeat the request and give up after a reasonable amount of attempts. Returns :code:`True` on success.
    If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter *secret_token*. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content.

     **Notes**

     **1.** You will not be able to receive updates using :class:`aiogram.methods.get_updates.GetUpdates` for as long as an outgoing webhook is set up.

     **2.** To use a self-signed certificate, you need to upload your `public key certificate <https://core.telegram.org/bots/self-signed>`_ using *certificate* parameter. Please upload as InputFile, sending a String will not work.

     **3.** Ports currently supported *for webhooks*: **443, 80, 88, 8443**.
     If you're having any trouble setting up webhooks, please check out this `amazing guide to webhooks <https://core.telegram.org/bots/webhooks>`_.

    Source: https://core.telegram.org/bots/api#setwebhook
    Z
setWebhookÚstrÚurlNzOptional[InputFile]ÚcertificatezOptional[str]Ú
ip_addresszOptional[int]Úmax_connectionszOptional[list[str]]Úallowed_updateszOptional[bool]Údrop_pending_updatesÚsecret_token)r   r   r   r   r   r   r   ÚNone)	r   r   r   r   r   r   r   Ú_SetWebhook__pydantic_kwargsÚreturnc          	   
     s&   t ƒ jf |||||||dœ|¤Ž d S )N)r   r   r   r   r   r   r   )ÚsuperÚ__init__)	Z__pydantic__self__r   r   r   r   r   r   r   r   ©Ú	__class__© úx/var/www/vosh/data/www/fastworkle.ru/webshop-tgbot-v.1.0/venv/lib/python3.9/site-packages/aiogram/methods/set_webhook.pyr   0   s    ùøzSetWebhook.__init__)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚboolZ__returning__Z__api_method__Ú__annotations__r   r   r   r   r   r   r   r   Ú__classcell__r   r   r   r   r
   	   s$   
÷r
   N)Ú
__future__r   Útypingr   r   r   Útypesr   Úbaser	   r    r
   r   r   r   r   Ú<module>   s   