o
    #`^h                    @   s2  d Z ddlZddlmZ ddlmZ ddlmZmZ ddl	m
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z& ddl'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7 dd	l8m9Z9 dd
l:m:Z: e:dde9dG dd de;Z<dS )zlinebot.api module.    N   )__version__)LineBotApiError)
HttpClientRequestsHttpClient)ErrorProfile	MemberIdsContentRichMenuResponseMessageQuotaResponseMessageQuotaConsumptionResponseIssueLinkTokenResponseIssueChannelTokenResponse MessageDeliveryBroadcastResponse MessageDeliveryMulticastResponseMessageDeliveryPushResponseMessageDeliveryReplyResponseInsightMessageDeliveryResponseInsightFollowersResponseInsightDemographicResponseInsightMessageEventResponseBroadcastResponseNarrowcastResponse!MessageProgressNarrowcastResponseBotInfoGetWebhookResponseTestWebhookResponseAudienceGroupClickAudienceGroupImpAudienceGroupGetAuthorityLevelAudienceCreateAudienceGroup)GroupUserIdsRichMenuAliasResponseRichMenuAliasListResponseChannelAccessTokensIssueChannelTokenResponseV2VerifyChannelTokenResponseV2ValidAccessTokenKeyIDsResponse2InsightMessageEventOfCustomAggregationUnitResponseAggregationInfoResponseAggregationNameListResponse'ValidateBroadcastMessageObjectsResponse'ValidateMulticastMessageObjectsResponse(ValidateNarrowcastMessageObjectsResponse"ValidatePushMessageObjectsResponse#ValidateReplyMessageObjectsResponse)LineBotSdkDeprecatedIn30)
deprecatedz|Use v3 class; linebot.v3.<feature>. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.3.0.0reasonversioncategoryc                   @   s|  e Zd ZdZdZdZeeejefddZ	e
ddeddddZe
dded			
dddZe
dded			
dddZe
ddeddddZe
dded	
	
dddZe
ddeddddZe
ddeddddZe
ddeddd d!Ze
d"deddd#d$Ze
d%deddd&d'Ze
d(deddd)d*Ze
d+deddd,d-Ze
d.deddd/d0Ze
d1deddd2d3Ze
d4deddd5d6Ze
d7deddd8d9Ze
d:deddd;d<Ze
d=deddd>d?Ze
d@dedddAdBZe
dCdedddDdEZe
dFdedddGdHZ e
dIdedd	dJdKZ!e
dLdedd	dMdNZ"e
dOdedddPdQZ#e
dRdedddSdTZ$e
dUdedddVdWZ%e
dXdedddYdZZ&e
d[dedd	d\d]Z'e
d^deddd_d`Z(e
dadedddbdcZ)e
dddedddedfZ*e
dgdedddhdiZ+e
djdedddkdlZ,e
dmdedddndoZ-e
dpdedddqdrZ.e
dsdedddtduZ/e
dvdedddwdxZ0e
dydedddzd{Z1e
d|deddd}d~Z2e
ddeddddZ3e
ddeddddZ4e
ddeddddZ5e
ddeddddZ6e
ddeddddZ7e
ddeddddZ8e
ddeddddZ9e
ddeddddZ:e
ddeddddZ;e
ddeddddZ<e
dded	
d
ddZ=e
ddeddddZ>e
ddeddddZ?e
ddeddddZ@e
ddeddddZAe
ddeddddZBe
ddeddddZCe
dded	
	
dddZDe
ddeddddZEe
dded		
	
dddZFe
ddeddddZGe
ddeddddÄZHe
dded	
d	ddƄZIe
ddeddddɄZJe
ddedddd̈́ZKe
dded	
d	ddЄZLe
dded	
dddӄZMe
ddeddddքZNe
ddeddddلZOe
ddedd	dd܄ZPe
ddeddddZQe
dded			
dddZRe
dded	
dddZS		
dddZTe
ddeddddZUe
dded		
dddZVe
ddeddddZWe
ddeddddZXe
ddeddddZYdddZZdddZ[dddZ\dd dZ]e^dd Z_d
S (  
LineBotApiz5LineBotApi provides interface for LINE messaging API.zhttps://api.line.mezhttps://api-data.line.mec                 C   sD   || _ || _d| dt d| _|r||d| _dS t|d| _dS )a  __init__ method.

        :param str channel_access_token: Your channel access token
        :param str endpoint: (optional) Default is https://api.line.me
        :param str data_endpoint: (optional) Default is https://api-data.line.me
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is linebot.http_client.HttpClient.DEFAULT_TIMEOUT
        :type timeout: float | tuple(float, float)
        :param http_client: (optional) Default is
            :py:class:`linebot.http_client.RequestsHttpClient`
        :type http_client: T <= :py:class:`linebot.http_client.HttpClient`
        zBearer zline-bot-sdk-python/)Authorizationz
User-AgenttimeoutN)data_endpointendpointr   headershttp_clientr   )selfchannel_access_tokenr@   r?   r>   rB    rE   I/home/air/shanriGPT/back/venv/lib/python3.10/site-packages/linebot/api.py__init__8   s   zLineBotApi.__init__zUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).reply_message(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.r6   r7   FNc                 C   sD   t |ttfs
|g}|dd |D |d}| jdt||d dS )a  Call reply message API.

        https://developers.line.biz/en/reference/messaging-api/#send-reply-message

        Respond to events from users, groups, and rooms.

        Webhooks are used to notify you when an event occurs.
        For events that you can respond to, a replyToken is issued for replying to messages.

        Because the replyToken becomes invalid after a certain period of time,
        responses should be sent as soon as a message is received.

        Reply tokens can only be used once.

        :param str reply_token: replyToken received via webhook
        :param messages: Messages.
            Max: 5
        :type messages: T <= :py:class:`linebot.models.send_messages.SendMessage` |
            list[T <= :py:class:`linebot.models.send_messages.SendMessage`]
        :param bool notification_disabled: (optional) True to disable push notification
            when the message is sent. The default value is False.
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        c                 S      g | ]}|  qS rE   as_json_dict.0messagerE   rE   rF   
<listcomp>w       z,LineBotApi.reply_message.<locals>.<listcomp>)
replyTokenmessagesnotificationDisabledz/v2/bot/message/replydatar>   N)
isinstancelisttuple_postjsondumps)rC   reply_tokenrQ   notification_disabledr>   rT   rE   rE   rF   reply_messageU   s   
zLineBotApi.reply_messagezUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).push_message(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   v   t |ttfs
|g}|r|| jd< |dd |D |d}|dur.t |ttfs*|g}||d< | jdt||d dS )	a  Call push message API.

        https://developers.line.biz/en/reference/messaging-api/#send-push-message

        Send messages to users, groups, and rooms at any time.

        :param str to: ID of the receiver
        :param messages: Messages.
            Max: 5
        :type messages: T <= :py:class:`linebot.models.send_messages.SendMessage` |
            list[T <= :py:class:`linebot.models.send_messages.SendMessage`]
        :param retry_key: (optional) Arbitrarily generated UUID in hexadecimal notation.
        :param bool notification_disabled: (optional) True to disable push notification
            when the message is sent. The default value is False.
        :param custom_aggregation_units: (optional) Name of aggregation unit. Case-sensitive.
            Max unit: 1
            Max aggregation unit name length: 30 characters
            Supported character types: Half-width alphanumeric characters and underscore
        :type custom_aggregation_units: str | list[str]
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        X-Line-Retry-Keyc                 S   rH   rE   rI   rK   rE   rE   rF   rN      rO   z+LineBotApi.push_message.<locals>.<listcomp>torQ   rR   NcustomAggregationUnitsz/v2/bot/message/pushrS   rU   rV   rW   rA   rX   rY   rZ   rC   ra   rQ   	retry_keyr\   custom_aggregation_unitsr>   rT   rE   rE   rF   push_message   s   

zLineBotApi.push_messagezUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).multicast(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   r^   )	ak  Call multicast API.

        https://developers.line.biz/en/reference/messaging-api/#send-multicast-message

        Sends push messages to multiple users at any time.
        Messages cannot be sent to groups or rooms.

        :param to: IDs of the receivers
            Max: 500 users
        :type to: list[str]
        :param messages: Messages.
            Max: 5
        :type messages: T <= :py:class:`linebot.models.send_messages.SendMessage` |
            list[T <= :py:class:`linebot.models.send_messages.SendMessage`]
        :param retry_key: (optional) Arbitrarily generated UUID in hexadecimal notation.
        :param bool notification_disabled: (optional) True to disable push notification
            when the message is sent. The default value is False.
        :param custom_aggregation_units: (optional) Name of aggregation unit. Case-sensitive.
            Max unit: 1
            Max aggregation unit name length: 30 characters
            Supported character types: Half-width alphanumeric characters and underscore
        :type custom_aggregation_units: str | list[str]
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        r_   c                 S   rH   rE   rI   rK   rE   rE   rF   rN      rO   z(LineBotApi.multicast.<locals>.<listcomp>r`   Nrb   z/v2/bot/message/multicastrS   rc   rd   rE   rE   rF   	multicast   s   

zLineBotApi.multicastzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).broadcast(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s^   t |ttfs
|g}|r|| jd< dd |D |d}| jdt||d}t|jddS )	a  Call broadcast API.

        https://developers.line.biz/en/reference/messaging-api/#send-broadcast-message

        Sends push messages to multiple users at any time.

        :param messages: Messages.
            Max: 5
        :type messages: T <= :py:class:`linebot.models.send_messages.SendMessage` |
            list[T <= :py:class:`linebot.models.send_messages.SendMessage`]
        :param retry_key: (optional) Arbitrarily generated UUID in hexadecimal notation.
        :param bool notification_disabled: (optional) True to disable push notification
            when the message is sent. The default value is False.
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.BroadcastResponse`
        r_   c                 S   rH   rE   rI   rK   rE   rE   rF   rN     rO   z(LineBotApi.broadcast.<locals>.<listcomp>)rQ   rR   z/v2/bot/message/broadcastrS   X-Line-Request-Id
request_id)	rU   rV   rW   rA   rX   rY   rZ   r   get)rC   rQ   re   r\   r>   rT   responserE   rE   rF   	broadcast   s   
zLineBotApi.broadcastzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).narrowcast(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c           
      C   sp   t |ttfs
|g}|r|| jd< dd |D | | | |d}| jdt||d}	t|	j	ddS )	a  Call narrowcast API.

        https://developers.line.biz/en/reference/messaging-api/#send-narrowcast-message

        Sends push messages to multiple users at any time.
        Messages cannot be sent to groups or rooms.

        :param messages: Messages.
            Max: 5
        :type messages: T <= :py:class:`linebot.models.send_messages.SendMessage` |
            list[T <= :py:class:`linebot.models.send_messages.SendMessage`]
        :param retry_key: (optional) Arbitrarily generated UUID in hexadecimal notation.
        :param recipient: audience object of recipient
        :type recipient: T <= :py:class:`linebot.models.recipient.AudienceRecipient`
        :param filter: demographic filter of recipient
        :type filter: T <= :py:class:`linebot.models.filter.DemographicFilter`
        :param limit: limit on this narrowcast
        :type limit: T <= :py:class:`linebot.models.limit.Limit`
        :param bool notification_disabled: (optional) True to disable push notification
            when the message is sent. The default value is False.
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.NarrowcastResponse`
        r_   c                 S   rH   rE   rI   rK   rE   rE   rF   rN   4  rO   z)LineBotApi.narrowcast.<locals>.<listcomp>)rQ   	recipientfilterlimitrR   z/v2/bot/message/narrowcastrS   ri   rj   )
rU   rV   rW   rA   rJ   rX   rY   rZ   r   rl   )
rC   rQ   re   ro   rp   rq   r\   r>   rT   rm   rE   rE   rF   
narrowcast  s    
zLineBotApi.narrowcastzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_narrowcast_progress(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   "   | j dj|d|d}t|jS )a  Get progress status of narrowcast messages sent.

        https://developers.line.biz/en/reference/messaging-api/#get-narrowcast-progress-status

        Gets the number of messages sent with the /bot/message/progress/narrowcast endpoint.

        :param str request_id: request ID of narrowcast.
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.MessageDeliveryBroadcastResponse`
        z:/v2/bot/message/progress/narrowcast?requestId={request_id}rj   r=   )_getformatr   new_from_json_dictrY   rC   rk   r>   rm   rE   rE   rF   get_progress_status_narrowcastA  s   z)LineBotApi.get_progress_status_narrowcastzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).validate_reply(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   N   t |ttfs
|g}ddd |D i}| jdt||d}t|jddS )a  Call validate reply message objects API.

        https://developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-reply-message

        You can validate that an array of message objects is valid as a value
        for the messages property of the request body for the send reply message endpoint.

        :param messages: Messages.
            Max: 5
        :type messages: T <= :py:class:`linebot.models.send_messages.SendMessage` |
            list[T <= :py:class:`linebot.models.send_messages.SendMessage`]
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.ValidateReplyMessageObjectsResponse`
        rQ   c                 S   rH   rE   rI   rK   rE   rE   rF   rN   q  rO   z=LineBotApi.validate_reply_message_objects.<locals>.<listcomp>z/v2/bot/message/validate/replyrS   ri   rj   )	rU   rV   rW   rX   rY   rZ   r3   rA   rl   rC   rQ   r>   rT   rm   rE   rE   rF   validate_reply_message_objectsY     

z)LineBotApi.validate_reply_message_objectszUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).validate_push(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   ry   )a  Call validate push message objects API.

        https://developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-push-message

        You can validate that an array of message objects is valid as a value
        for the messages property of the request body for the send push message endpoint.

        :param messages: Messages.
            Max: 5
        :type messages: T <= :py:class:`linebot.models.send_messages.SendMessage` |
            list[T <= :py:class:`linebot.models.send_messages.SendMessage`]
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.ValidatePushMessageObjectsResponse`
        rQ   c                 S   rH   rE   rI   rK   rE   rE   rF   rN     rO   z<LineBotApi.validate_push_message_objects.<locals>.<listcomp>z/v2/bot/message/validate/pushrS   ri   rj   )	rU   rV   rW   rX   rY   rZ   r2   rA   rl   rz   rE   rE   rF   validate_push_message_objects|  r|   z(LineBotApi.validate_push_message_objectszUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).validate_multicast(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   ry   )a  Call validate multicast message objects API.

        https://developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-multicast-message

        You can validate that an array of message objects is valid as a value
        for the messages property of the request body for the send multicast message endpoint.

        :param messages: Messages.
            Max: 5
        :type messages: T <= :py:class:`linebot.models.send_messages.SendMessage` |
            list[T <= :py:class:`linebot.models.send_messages.SendMessage`]
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.ValidateMulticastMessageObjectsResponse`
        rQ   c                 S   rH   rE   rI   rK   rE   rE   rF   rN     rO   zALineBotApi.validate_multicast_message_objects.<locals>.<listcomp>z"/v2/bot/message/validate/multicastrS   ri   rj   )	rU   rV   rW   rX   rY   rZ   r0   rA   rl   rz   rE   rE   rF   "validate_multicast_message_objects  r|   z-LineBotApi.validate_multicast_message_objectszUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).validate_broadcast(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   ry   )a  Call validate broadcast message objects API.

        https://developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-broadcast-message

        You can validate that an array of message objects is valid as a value
        for the messages property of the request body for the send broadcast message endpoint.

        :param messages: Messages.
            Max: 5
        :type messages: T <= :py:class:`linebot.models.send_messages.SendMessage` |
            list[T <= :py:class:`linebot.models.send_messages.SendMessage`]
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.ValidateBroadcastMessageObjectsResponse`
        rQ   c                 S   rH   rE   rI   rK   rE   rE   rF   rN     rO   zALineBotApi.validate_broadcast_message_objects.<locals>.<listcomp>z"/v2/bot/message/validate/broadcastrS   ri   rj   )	rU   rV   rW   rX   rY   rZ   r/   rA   rl   rz   rE   rE   rF   "validate_broadcast_message_objects  r|   z-LineBotApi.validate_broadcast_message_objectszUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).validate_narrowcast(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   ry   )a  Call validate narrowcast message objects API.

        https://developers.line.biz/en/reference/messaging-api/#validate-message-objects-of-narrowcast-message

        You can validate that an array of message objects is valid as a value
        for the messages property of the request body for the send narrowcast message endpoint.

        :param messages: Messages.
            Max: 5
        :type messages: T <= :py:class:`linebot.models.send_messages.SendMessage` |
            list[T <= :py:class:`linebot.models.send_messages.SendMessage`]
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.ValidateNarrowcastMessageObjectsResponse`
        rQ   c                 S   rH   rE   rI   rK   rE   rE   rF   rN     rO   zBLineBotApi.validate_narrowcast_message_objects.<locals>.<listcomp>z#/v2/bot/message/validate/narrowcastrS   ri   rj   )	rU   rV   rW   rX   rY   rZ   r1   rA   rl   rz   rE   rE   rF   #validate_narrowcast_message_objects  r|   z.LineBotApi.validate_narrowcast_message_objectszUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_number_of_sent_broadcast_messages(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   rs   )a  Get number of sent broadcast messages.

        https://developers.line.biz/en/reference/messaging-api/#get-number-of-broadcast-messages

        Gets the number of messages sent with the /bot/message/broadcast endpoint.

        :param str date: Date the messages were sent. The format is `yyyyMMdd` (Timezone is UTC+9).
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.MessageDeliveryBroadcastResponse`
        z./v2/bot/message/delivery/broadcast?date={date}dater=   )rt   ru   r   rv   rY   rC   r   r>   rm   rE   rE   rF   get_message_delivery_broadcast  
   
z)LineBotApi.get_message_delivery_broadcastzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_number_of_sent_reply_messages(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   rs   )a  Get number of sent reply messages.

        https://developers.line.biz/en/reference/messaging-api/#get-number-of-reply-messages

        Gets the number of messages sent with the /bot/message/reply endpoint.

        :param str date: Date the messages were sent. The format is `yyyyMMdd` (Timezone is UTC+9).
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.MessageDeliveryReplyResponse`
        z*/v2/bot/message/delivery/reply?date={date}r   r=   )rt   ru   r   rv   rY   r   rE   rE   rF   get_message_delivery_reply  r   z%LineBotApi.get_message_delivery_replyzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_number_of_sent_push_messages(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   rs   )a  Get number of sent push messages.

        https://developers.line.biz/en/reference/messaging-api/#get-number-of-push-messages

        Gets the number of messages sent with the /bot/message/push endpoint.

        :param str date: Date the messages were sent. The format is `yyyyMMdd` (Timezone is UTC+9).
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.MessageDeliveryPushResponse`
        z)/v2/bot/message/delivery/push?date={date}r   r=   )rt   ru   r   rv   rY   r   rE   rE   rF   get_message_delivery_push6  r   z$LineBotApi.get_message_delivery_pushzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_number_of_sent_multicast_messages(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   rs   )a  Get number of sent multicast messages.

        https://developers.line.biz/en/reference/messaging-api/#get-number-of-multicast-messages

        Gets the number of messages sent with the /bot/message/multicast endpoint.

        :param str date: Date the messages were sent. The format is `yyyyMMdd` (Timezone is UTC+9).
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.MessageDeliveryMulticastResponse`
        z./v2/bot/message/delivery/multicast?date={date}r   r=   )rt   ru   r   rv   rY   r   rE   rE   rF   get_message_delivery_multicastM  r   z)LineBotApi.get_message_delivery_multicastzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_profile(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   rs   )a1  Call get profile API.

        https://developers.line.biz/en/reference/messaging-api/#get-profile

        Get user profile information.

        :param str user_id: User ID
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.Profile`
        :return: Profile instance
        z/v2/bot/profile/{user_id}user_idr=   rt   ru   r   rv   rY   rC   r   r>   rm   rE   rE   rF   get_profiled  
   
zLineBotApi.get_profilezUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_group_summary(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   rs   )a  Call get group summary API.

        https://developers.line.biz/en/reference/messaging-api/#get-group-summary

        Gets the group ID, group name, and group icon URL of a group
        where the LINE Official Account is a member.

        :param str group_id: Group ID
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.Group`
        :return: Profile instance
        z /v2/bot/group/{group_id}/summarygroup_idr=   )rt   ru   r$   rv   rY   rC   r   r>   rm   rE   rE   rF   get_group_summary|  s
   
zLineBotApi.get_group_summaryzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_group_member_count(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   "   | j dj|d|d}|jdS )aT  Call get members in group count API.

        https://developers.line.biz/en/reference/messaging-api/#get-members-group-count

        Gets the count of members in a group.

        :param str group_id: Group ID
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.Group`
        :return: Profile instance
        z&/v2/bot/group/{group_id}/members/countr   r=   countrt   ru   rY   rl   r   rE   rE   rF   get_group_members_count  r   z"LineBotApi.get_group_members_countzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_room_member_count(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   r   )aO  Call get members in room count API.

        https://developers.line.biz/en/reference/messaging-api/#get-members-room-count

        Gets the count of members in a room.

        :param str room_id: Room ID
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.Group`
        :return: Profile instance
        z$/v2/bot/room/{room_id}/members/countroom_idr=   r   r   )rC   r   r>   rm   rE   rE   rF   get_room_members_count  r   z!LineBotApi.get_room_members_countzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_group_member_profile(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   $   | j dj||d|d}t|jS )a  Call get group member profile API.

        https://developers.line.biz/en/reference/messaging-api/#get-group-member-profile

        Gets the user profile of a member of a group that
        the bot is in. This can be the user ID of a user who has
        not added the bot as a friend or has blocked the bot.

        :param str group_id: Group ID
        :param str user_id: User ID
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.Profile`
        :return: Profile instance
        z)/v2/bot/group/{group_id}/member/{user_id})r   r   r=   r   )rC   r   r   r>   rm   rE   rE   rF   get_group_member_profile  
   z#LineBotApi.get_group_member_profilezUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_room_member_profile(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   r   )a  Call get room member profile API.

        https://developers.line.biz/en/reference/messaging-api/#get-room-member-profile

        Gets the user profile of a member of a room that
        the bot is in. This can be the user ID of a user who has
        not added the bot as a friend or has blocked the bot.

        :param str room_id: Room ID
        :param str user_id: User ID
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.Profile`
        :return: Profile instance
        z'/v2/bot/room/{room_id}/member/{user_id})r   r   r=   r   )rC   r   r   r>   rm   rE   rE   rF   get_room_member_profile  r   z"LineBotApi.get_room_member_profilezUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_group_members_ids(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   8   |du rdnd|i}| j dj|d||d}t|jS )a
  Call get group member IDs API.

        https://developers.line.biz/en/reference/messaging-api/#get-group-member-ids

        Gets the user IDs of the members of a group that the bot is in.
        This includes the user IDs of users who have not added the bot as a friend
        or has blocked the bot.

        :param str group_id: Group ID
        :param str start: continuationToken
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.MemberIds`
        :return: MemberIds instance
        Nstartz$/v2/bot/group/{group_id}/members/idsr   paramsr>   rt   ru   r	   rv   rY   )rC   r   r   r>   r   rm   rE   rE   rF   get_group_member_ids     
zLineBotApi.get_group_member_idszUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_room_members_ids(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   r   )a  Call get room member IDs API.

        https://developers.line.biz/en/reference/messaging-api/#get-room-member-ids

        Gets the user IDs of the members of a group that the bot is in.
        This includes the user IDs of users who have not added the bot as a friend
        or has blocked the bot.

        :param str room_id: Room ID
        :param str start: continuationToken
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.MemberIds`
        :return: MemberIds instance
        Nr   z"/v2/bot/room/{room_id}/members/idsr   r   r   )rC   r   r   r>   r   rm   rE   rE   rF   get_room_member_ids  r   zLineBotApi.get_room_member_idszUse 'from linebot.v3.messaging import MessagingApiBlob' and 'MessagingApiBlob(...).get_message_content(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s$   | j dj|d| jd|d}t|S )aN  Call get content API.

        https://developers.line.biz/en/reference/messaging-api/#get-content

        Retrieve image, video, and audio data sent by users.

        :param str message_id: Message ID
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.Content`
        :return: Content instance
        z$/v2/bot/message/{message_id}/content)
message_idT)r@   streamr>   rt   ru   r?   r
   )rC   r   r>   rm   rE   rE   rF   get_message_content7  s
   
zLineBotApi.get_message_contentzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).leave_group(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C      | j dj|d|d dS )a  Call leave group API.

        https://developers.line.biz/en/reference/messaging-api/#leave-group

        Leave a group.

        :param str group_id: Group ID
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        z/v2/bot/group/{group_id}/leaver   r=   NrX   ru   )rC   r   r>   rE   rE   rF   leave_groupO     

zLineBotApi.leave_groupzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).leave_room(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   r   )a  Call leave room API.

        https://developers.line.biz/en/reference/messaging-api/#leave-room

        Leave a room.

        :param str room_id: Room ID
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        z/v2/bot/room/{room_id}/leaver   r=   Nr   )rC   r   r>   rE   rE   rF   
leave_roomc  r   zLineBotApi.leave_roomzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_rich_menu(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   rs   )a1  Call get rich menu API.

        https://developers.line.biz/en/reference/messaging-api/#get-rich-menu

        :param str rich_menu_id: ID of the rich menu
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.RichMenuResponse`
        :return: RichMenuResponse instance
        /v2/bot/richmenu/{rich_menu_id}rich_menu_idr=   )rt   ru   r   rv   rY   rC   r   r>   rm   rE   rE   rF   get_rich_menuw  
   
zLineBotApi.get_rich_menuzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_rich_menu_alias(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   rs   )ab  Call get rich menu alias API.

        https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-alias-by-id

        :param str rich_menu_alias_id: ID of an uploaded rich menu alias.
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.RichMenuAliasResponse`
        :return: RichMenuAliasResponse instance
        %/v2/bot/richmenu/alias/{rich_menu_id}r   r=   )rt   ru   r&   rv   rY   )rC   rich_menu_alias_idr>   rm   rE   rE   rF   get_rich_menu_alias  s
   
zLineBotApi.get_rich_menu_aliaszUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_rich_menu_alias_list(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C      | j d|d}t|jS )a"  Call get rich menu alias list API.

        https://developers.line.biz/en/reference/messaging-api/#update-rich-menu-alias

        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.RichMenuAliasListResponse`
        :return: RichMenuAliasListResponse instance
        z/v2/bot/richmenu/alias/listr=   )rt   r'   rv   rY   rC   r>   rm   rE   rE   rF   get_rich_menu_alias_list  s
   z#LineBotApi.get_rich_menu_alias_listzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).validate_rich_menu_object(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C      | j d| |d dS )a2  Call validate rich menu object API.

        https://developers.line.biz/ja/reference/messaging-api/#validate-rich-menu-object

        :param rich_menu: Inquired to validate a rich menu object.
        :type rich_menu: T <= :py:class:`linebot.models.rich_menu.RichMenu`
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        z/v2/bot/richmenu/validaterS   NrX   as_json_string)rC   	rich_menur>   rE   rE   rF   validate_rich_menu_object  s   
z$LineBotApi.validate_rich_menu_objectzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).create_rich_menu(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s    | j d| |d}|jdS )aP  Call create rich menu API.

        https://developers.line.biz/en/reference/messaging-api/#create-rich-menu

        :param rich_menu: Inquired to create a rich menu object.
        :type rich_menu: T <= :py:class:`linebot.models.rich_menu.RichMenu`
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: str
        :return: rich menu id
        z/v2/bot/richmenurS   
richMenuId)rX   r   rY   rl   )rC   r   r>   rm   rE   rE   rF   create_rich_menu  s   
zLineBotApi.create_rich_menuzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).create_rich_menu_alias(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   r   )as  Call create rich menu alias API.

        https://developers.line.biz/en/reference/messaging-api/#create-rich-menu-alias

        :param rich_menu_alias: Inquired to create a rich menu alias object.
        :type rich_menu_alias: T <= :py:class:`linebot.models.rich_menu.RichMenuAlias`
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: str
        :return: rich menu id
        z/v2/bot/richmenu/aliasrS   Nr   )rC   rich_menu_aliasr>   rE   rE   rF   create_rich_menu_alias  s   

z!LineBotApi.create_rich_menu_aliaszUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).update_rich_menu_alias(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s    | j dj|d| |d dS )a  Call update rich menu alias API.

        https://developers.line.biz/en/reference/messaging-api/#update-rich-menu-alias

        :param str rich_menu_alias_id: ID of an uploaded rich menu alias.
        :param rich_menu_alias: Inquired to create a rich menu alias object.
        :type rich_menu_alias: T <= :py:class:`linebot.models.rich_menu.RichMenuAlias`
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: str
        :return: rich menu id
        r   r   rS   N)rX   ru   r   )rC   r   r   r>   rE   rE   rF   update_rich_menu_alias  s
   

z!LineBotApi.update_rich_menu_aliaszUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).delete_rich_menu(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   r   )a  Call delete rich menu API.

        https://developers.line.biz/en/reference/messaging-api/#delete-rich-menu

        :param str rich_menu_id: ID of an uploaded rich menu
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        r   r   r=   N_deleteru   rC   r   r>   rE   rE   rF   delete_rich_menu
     

zLineBotApi.delete_rich_menuzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).delete_rich_menu_alias(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   r   )a  Call delete rich menu alias API.

        https://developers.line.biz/en/reference/messaging-api/#delete-rich-menu-alias

        :param str rich_menu_alias_id: ID of an uploaded rich menu alias.
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        z+/v2/bot/richmenu/alias/{rich_menu_alias_id})r   r=   Nr   )rC   r   r>   rE   rE   rF   delete_rich_menu_alias  s   
z!LineBotApi.delete_rich_menu_aliaszUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_rich_menu_id_of_user(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   r   )a  Call get rich menu ID of user API.

        https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-id-of-user

        :param str user_id: IDs of the user
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: str
        :return: rich menu id
        /v2/bot/user/{user_id}/richmenur   r=   r   r   r   rE   rE   rF   get_rich_menu_id_of_user/  r   z#LineBotApi.get_rich_menu_id_of_userzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).link_rich_menu_id_to_user(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s   | j dj||d|d dS )a  Call link rich menu to user API.

        https://developers.line.biz/en/reference/messaging-api/#link-rich-menu-to-user

        :param str user_id: ID of the user
        :param str rich_menu_id: ID of an uploaded rich menu
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        z./v2/bot/user/{user_id}/richmenu/{rich_menu_id})r   r   r=   Nr   )rC   r   r   r>   rE   rE   rF   link_rich_menu_to_userE  s   
z!LineBotApi.link_rich_menu_to_userzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).link_rich_menu_id_to_users(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s    | j dt||d|d dS )a>  Links a rich menu to multiple users.

        https://developers.line.biz/en/reference/messaging-api/#link-rich-menu-to-users

        :param user_ids: user IDs
            Max: 150 users
        :type user_ids: list[str]
        :param str rich_menu_id: ID of an uploaded rich menu
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        z/v2/bot/richmenu/bulk/link)userIdsr   rS   NrX   rY   rZ   )rC   user_idsr   r>   rE   rE   rF   link_rich_menu_to_users[  s   
z"LineBotApi.link_rich_menu_to_userszUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).unlink_rich_menu_id_from_user(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   r   )a  Call unlink rich menu from user API.

        https://developers.line.biz/en/reference/messaging-api#unlink-rich-menu-from-user

        :param str user_id: ID of the user
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        r   r   r=   Nr   )rC   r   r>   rE   rE   rF   unlink_rich_menu_from_usert  r   z%LineBotApi.unlink_rich_menu_from_userzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).unlink_rich_menu_id_from_users(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C      | j dtd|i|d dS )a  Unlinks rich menus from multiple users.

        https://developers.line.biz/en/reference/messaging-api/#unlink-rich-menu-from-users

        :param user_ids: user IDs
            Max: 150 users
        :type user_ids: list[str]
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        z/v2/bot/richmenu/bulk/unlinkr   rS   Nr   )rC   r   r>   rE   rE   rF   unlink_rich_menu_from_users  s   
z&LineBotApi.unlink_rich_menu_from_userszUse 'from linebot.v3.messaging import MessagingApiBlob' and 'MessagingApiBlob.get_rich_menu_image(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s"   | j dj|d| j|d}t|S )aT  Call download rich menu image API.

        https://developers.line.biz/en/reference/messaging-api#download-rich-menu-image

        :param str rich_menu_id: ID of the rich menu with the image to be downloaded
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.Content`
        :return: Content instance
        '/v2/bot/richmenu/{rich_menu_id}/contentr   )r@   r>   r   r   rE   rE   rF   get_rich_menu_image  s
   
zLineBotApi.get_rich_menu_imagezUse 'from linebot.v3.messaging import MessagingApiBlob' and 'MessagingApiBlob.set_rich_menu_image(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s&   | j dj|d| j|d|i|d dS )a  Call upload rich menu image API.

        https://developers.line.me/en/docs/messaging-api/reference/#upload-rich-menu-image

        Uploads and attaches an image to a rich menu.

        :param str rich_menu_id: IDs of the richmenu
        :param str content_type: image/jpeg or image/png
        :param content: image content as bytes, or file-like object
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        r   r   Content-Type)r@   rT   rA   r>   N)rX   ru   r?   )rC   r   content_typecontentr>   rE   rE   rF   set_rich_menu_image  s   

zLineBotApi.set_rich_menu_imagezUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_rich_menu_list(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s6   | j d|d}g }|jd D ]
}|t| q|S )a  Call get rich menu list API.

        https://developers.line.me/en/docs/messaging-api/reference/#get-rich-menu-list

        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: list(T <= :py:class:`linebot.models.responses.RichMenuResponse`)
        :return: list[RichMenuResponse] instance
        z/v2/bot/richmenu/listr=   	richmenus)rt   rY   appendr   rv   )rC   r>   rm   resultrichmenurE   rE   rF   get_rich_menu_list  s   zLineBotApi.get_rich_menu_listzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).set_default_rich_menu(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   r   )a  Set the default rich menu.

        https://developers.line.biz/en/reference/messaging-api/#set-default-rich-menu

        :param str rich_menu_id: ID of an uploaded rich menu
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        z(/v2/bot/user/all/richmenu/{rich_menu_id}r   r=   Nr   r   rE   rE   rF   set_default_rich_menu  s   
z LineBotApi.set_default_rich_menuzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_default_rich_menu_id(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s   | j d|d}|jdS )a  Get the ID of the default rich menu set with the Messaging API.

        https://developers.line.biz/en/reference/messaging-api/#get-default-rich-menu-id

        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        /v2/bot/user/all/richmenur=   r   )rt   rY   rl   r   rE   rE   rF   get_default_rich_menu  s
   z LineBotApi.get_default_rich_menuzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).cancel_default_rich_menu(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s   | j d|d dS )a  Cancel the default rich menu set with the Messaging API.

        https://developers.line.biz/en/reference/messaging-api/#cancel-default-rich-menu

        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        r   r=   N)r   )rC   r>   rE   rE   rF   cancel_default_rich_menu  s   
z#LineBotApi.cancel_default_rich_menuzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_message_quota(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   r   )a  Call Get the target limit for additional messages.

        https://developers.line.biz/en/reference/messaging-api/#get-quota

        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.MessageQuotaResponse`
        :return: MessageQuotaResponse instance
        z/v2/bot/message/quotar=   )rt   r   rv   rY   r   rE   rE   rF   get_message_quota  
   zLineBotApi.get_message_quotazUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_message_quota_consumption(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   r   )a,  Get number of messages sent this month.

        https://developers.line.biz/en/reference/messaging-api/#get-consumption

        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.MessageQuotaConsumptionResponse`
        :return: MessageQuotaConsumptionResponse instance
        z!/v2/bot/message/quota/consumptionr=   )rt   r   rv   rY   r   rE   rE   rF   get_message_quota_consumption2  r   z(LineBotApi.get_message_quota_consumptionzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).issue_link_token(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   rs   )ap  Issues a link token used for the account link feature.

        https://developers.line.biz/en/reference/messaging-api/#issue-link-token

        :param str user_id: User ID for the LINE account to be linked
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.IssueLinkTokenResponse`
        :return: IssueLinkTokenResponse instance
        z /v2/bot/user/{user_id}/linkTokenr   r=   )rX   ru   r   rv   rY   r   rE   rE   rF   issue_link_tokenG  s   zLineBotApi.issue_link_tokenzUse 'from linebot.v3.oauth import ChannelAccessToken' and 'ChannelAccessToken(...).issue_channel_token(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.client_credentialsc                 C   s*   | j d|||dddi|d}t|jS )a  Issues a short-lived channel access token.

        https://developers.line.biz/en/reference/messaging-api/#issue-channel-access-token

        :param str client_id: Channel ID.
        :param str client_secret: Channel secret.
        :param str grant_type: `client_credentials`
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.IssueChannelTokenResponse`
        :return: IssueChannelTokenResponse instance
        z/v2/oauth/accessToken)	client_idclient_secret
grant_typer   !application/x-www-form-urlencodedrT   rA   r>   )rX   r   rv   rY   )rC   r   r   r   r>   rm   rE   rE   rF   issue_channel_token_  s   zLineBotApi.issue_channel_tokenzUse 'from linebot.v3.oauth import ChannelAccessToken' and 'ChannelAccessToken(...).revoke_channel_token(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s   | j dd|iddi|d dS )a  Revokes a channel access token.

        https://developers.line.biz/en/reference/messaging-api/#revoke-channel-access-token

        :param str access_token: Channel access token.
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        z/v2/oauth/revokeaccess_tokenr   r   r   NrX   )rC   r   r>   rE   rE   rF   revoke_channel_token~  s   
zLineBotApi.revoke_channel_tokenzUse 'from linebot.v3.insight import Insight' and 'Insight(...).get_number_of_message_deliveries(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   rs   )aZ  Get the number of messages sent on a specified day.

        https://developers.line.biz/en/reference/messaging-api/#get-number-of-delivery-messages

        :param str date: Date for which to retrieve number of sent messages.
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.InsightMessageDeliveryResponse`
        z,/v2/bot/insight/message/delivery?date={date}r   r=   )rt   ru   r   rv   rY   r   rE   rE   rF   get_insight_message_delivery  
   
z'LineBotApi.get_insight_message_deliveryzUse 'from linebot.v3.insight import Insight' and 'Insight(...).get_insight_followers(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   rs   )af  Get the number of users who have added the bot on or before a specified date.

        https://developers.line.biz/en/reference/messaging-api/#get-number-of-followers

        :param str date: Date for which to retrieve the number of followers.
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.InsightFollowersResponse`
        z%/v2/bot/insight/followers?date={date}r   r=   )rt   ru   r   rv   rY   r   rE   rE   rF   get_insight_followers  r   z LineBotApi.get_insight_followerszUse 'from linebot.v3.insight import Insight' and 'Insight(...).get_friends_demographics(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   r   )a  Retrieve the demographic attributes for a bot's friends.

        https://developers.line.biz/en/reference/messaging-api/#get-demographic

        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.InsightDemographicResponse`
        z/v2/bot/insight/demographicr=   )rt   r   rv   rY   r   rE   rE   rF   get_insight_demographic  
   z"LineBotApi.get_insight_demographiczUse 'from linebot.v3.insight import Insight' and 'Insight(...).get_message_event(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   rs   )aL  Return statistics about how users interact with broadcast messages.

        https://developers.line.biz/en/reference/messaging-api/#get-message-event

        :param str request_id: Request ID of broadcast message.
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.InsightMessageEventResponse`
        z4/v2/bot/insight/message/event?requestId={request_id}rj   r=   )rt   ru   r   rv   rY   rw   rE   rE   rF   get_insight_message_event  r   z$LineBotApi.get_insight_message_eventzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_bot_info(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   r   )a  Get a bot's basic information.

        https://developers.line.biz/en/reference/messaging-api/#get-bot-info

        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.BotInfo`
        z/v2/bot/infor=   )rt   r   rv   rY   r   rE   rE   rF   get_bot_info  r   zLineBotApi.get_bot_infozUse 'from linebot.v3.audience import ManageAudience' and 'ManageAudience(...).create_audience_group(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   sR   |du rg }|rdd |D }| j dt||dd |D d|d}t|jS )aE  Create an audience group.

        https://developers.line.biz/en/reference/messaging-api/#create-upload-audience-group

        :param str audience_group_name: The audience's name
        :param list audiences: An array of user IDs or IFAs
        :param bool is_ifa: true | false
        :return: audience group id
        Nc                 S      g | ]}t |qS rE   r"   rv   rL   audiencerE   rE   rF   rN   	      z4LineBotApi.create_audience_group.<locals>.<listcomp>/v2/bot/audienceGroup/uploadc                 S   rH   rE   rI   r   rE   rE   rF   rN     rO   )descriptionisIfaAudience	audiencesrS   )rX   rY   rZ   r#   rv   )rC   audience_group_namer  is_ifar>   rm   rE   rE   rF   create_audience_group  s   
z LineBotApi.create_audience_groupzUse 'from linebot.v3.audience import ManageAudience' and 'ManageAudience(...).get_audience_data(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   rs   )a  Get the object of audience group.

        https://developers.line.biz/en/reference/messaging-api/#get-audience-group

        :param str audience_group_id: The audience ID
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :return: AudienceGroup instance
        z)/v2/bot/audienceGroup/{audience_group_id}audience_group_idr=   )rt   ru   r   rv   rY   )rC   r  r>   rm   rE   rE   rF   get_audience_group  s   zLineBotApi.get_audience_groupzUse 'from linebot.v3.audience import ManageAudience' and 'ManageAudience(...).get_audience_groups(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.r      c              
   C   s   i }|r||d< |r||d< |r||d< |r||d< |r ||d< |r&||d< | j d||d}	g }
|	jd	g D ]
}|
t| q7|	jd
drX|
| |d ||||||7 }
|
S )a  Get data for more than one audience.

        https://developers.line.biz/en/reference/messaging-api/#get-audience-groups

        :param int page: The page to return when getting (paginated) results. Must be 1 or higher
        :param str description: The name of the audience(s) to return
        :param str status: IN_PROGRESS | READY | FAILED | EXPIRED
        :param int size: The number of audiences per page. Default: 20, Max: 40
        :param bool include_external_public_group: true | false
        :param str create_route: How the audience was created.
        :type create_route: OA_MANAGER | MESSAGING_API
        :return: AudienceGroup instance
        pager   statussizeincludesExternalPublicGroupcreateRoutez/v2/bot/audienceGroup/list?r   audienceGroupshasNextPageFr   )rt   rY   rl   r   r   rv   get_audience_group_list)rC   r	  r   r
  r  include_external_public_groupcreate_router>   r   rm   r   audience_grouprE   rE   rF   r  ,  s6   z"LineBotApi.get_audience_group_listzUse 'from linebot.v3.audience import ManageAudience' and 'ManageAudience(...).delete_audience_group(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s   | j d||d dS )a  Delete an existing audience.

        https://developers.line.biz/en/reference/messaging-api/#delete-audience-group

        :param str audience_group_id: The audience ID
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        z/v2/bot/audienceGroup/{}r=   Nr   )rC   r  r>   rE   rE   rF   delete_audience_groupX  s   
z LineBotApi.delete_audience_groupzUse 'from linebot.v3.audience import ManageAudience' and 'ManageAudience(...).update_audience_group_description(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s&   | j dj|dtd|i|d dS )a  Modify the name of an existing audience.

        https://developers.line.biz/en/reference/messaging-api/#set-description-audience-group

        :param str audience_group_id: The audience ID
        :param str description: The new audience's name
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        z;/v2/bot/audienceGroup/{audience_group_id}/updateDescriptionr  r   rS    )_putru   rY   rZ   )rC   r  r   r>   rE   rE   rF   rename_audience_groupj  s   	z LineBotApi.rename_audience_groupzUse 'from linebot.v3.audience import ManageAudience' and 'ManageAudience(...).add_audience_to_audience_group(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s@   |r	dd |D }| j dt|dd |D |d|d}|jS )a  Add new user IDs or IFAs to an audience for uploading user IDs.

        https://developers.line.biz/en/reference/messaging-api/#update-upload-audience-group

        :param str audience_group_id: The audience ID
        :param list audiences: An array of user IDs or IFAs
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :param bool is_ifa: If this is false (default), recipients are specified by user IDs.
            If true, recipients must be specified by IFAs.
        :param str upload_description: The description to register for the job
        :type timeout: float | tuple(float, float)
        c                 S   r   rE   r   r   rE   rE   rF   rN     r   z>LineBotApi.add_audiences_to_audience_group.<locals>.<listcomp>r   c                 S   rH   rE   rI   r   rE   rE   rF   rN     rO   )audienceGroupIdr  uploadDescriptionrS   r  rY   rZ   )rC   r  r  upload_descriptionr>   rm   rE   rE   rF   add_audiences_to_audience_group  s   
z*LineBotApi.add_audiences_to_audience_groupzUse 'from linebot.v3.audience import ManageAudience' and 'ManageAudience(...).get_audience_group_authority_level(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   r   )a  Get the authority level of the audience.

        https://developers.line.biz/en/reference/messaging-api/#get-authority-level

        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :return: json
        $/v2/bot/audienceGroup/authorityLevelr=   )rt   r!   rv   rY   r   rE   rE   rF   "get_audience_group_authority_level  r   z-LineBotApi.get_audience_group_authority_levelzUse 'from linebot.v3.audience import ManageAudience' and 'ManageAudience(...).update_audience_group_authority_level(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.PUBLICc                 C   r   )zChange the authority level of all audiences created in the same channel.

        https://developers.line.biz/en/reference/messaging-api/#change-authority-level

        :param str authority_level: PUBLIC | PRIVATE.
        r  authorityLevelrS   r  r  )rC   authority_levelr>   rE   rE   rF   %change_audience_group_authority_level  s   z0LineBotApi.change_audience_group_authority_levelzUse 'from linebot.v3.audience import ManageAudience' and 'ManageAudience(...).create_click_based_audience_group(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s*   | j dt|||d|d}t|jS )a"  Create an audience for click-based retargeting.

        https://developers.line.biz/en/reference/messaging-api/#create-click-audience-group

        :param str description: The audience's name. Audience names must be unique.
        :param str request_id: The request ID of a message sent in the past 60 days.
        :param str click_url: The URL clicked by the user.
        If empty, users who clicked any URL in the message are added to the list of recipients.
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :return: ClickAudienceGroup instance
        z/v2/bot/audienceGroup/click)r   	requestIdclickUrlrS   )rX   rY   rZ   r   rv   )rC   r   rk   	click_urlr>   rm   rE   rE   rF   create_click_audience_group  s   
z&LineBotApi.create_click_audience_groupzUse 'from linebot.v3.audience import ManageAudience' and 'ManageAudience(...).create_imp_based_audience_group(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s(   | j dt||d|d}t|jS )a  Create an audience for impression-based retargeting.

        https://developers.line.biz/en/reference/messaging-api/#create-imp-audience-group

        :param str description: The audience's name. Audience names must be unique.
        :param str request_id: The request ID of a  message sent in the past 60 days.
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :return: ImpAudienceGroup instance
        z/v2/bot/audienceGroup/imp)r   r#  rS   )rX   rY   rZ   r    rv   )rC   r   rk   r>   rm   rE   rE   rF   create_imp_audience_group  s   	z$LineBotApi.create_imp_audience_groupzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).set_webhook_endpoint(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s$   d|i}| j dt||d}|jS )a  Set the webhook endpoint URL.

        https://developers.line.biz/en/reference/messaging-api/#set-webhook-endpoint-url

        :param str webhook_endpoint: A valid webhook URL to be set.
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: dict
        :return: Empty dict.
        r@    /v2/bot/channel/webhook/endpointrS   r  rC   webhook_endpointr>   rT   rm   rE   rE   rF   set_webhook_endpoint  s   zLineBotApi.set_webhook_endpointzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_webhook_endpoint(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   r   )aX  Get information on a webhook endpoint.

        https://developers.line.biz/en/reference/messaging-api/#get-webhook-endpoint-information

        :rtype: :py:class:`linebot.models.responses.GetWebhookResponse`
        :return: Webhook information, including `endpoint` for webhook
            URL and `active` for webhook usage status.
        r(  r=   )rt   r   rv   rY   r   rE   rE   rF   get_webhook_endpoint  s
   
zLineBotApi.get_webhook_endpointzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).test_webhook_endpoint(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s6   i }|dur
||d< | j dt||d}t|jS )a  Checks if the configured webhook endpoint can receive a test webhook event.

        https://developers.line.biz/en/reference/messaging-api/#test-webhook-endpoint

        :param webhook_endpoint: (optional) Set this parameter to
            specific the webhook endpoint of the webhook. Default is the webhook
            endpoint that is already set to the channel.
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.TestWebhookResponse`
        Nr@   z/v2/bot/channel/webhook/testrS   )rX   rY   rZ   r   rv   r)  rE   rE   rF   test_webhook_endpoint.  s   z LineBotApi.test_webhook_endpointzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_followers(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.,  c                 C   6   |du rd|in||d}| j d||d}t|jS )a  Get a list of users who added your LINE Official Account as a friend.

        https://developers.line.biz/en/reference/messaging-api/#get-follower-ids

        :param int limit: The maximum number of user IDs to retrieve in a single request.
            The default value is 300.
        :param str start: Get the next array of user IDs.
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.UserIds`
        Nrq   rq   r   z/v2/bot/followers/idsr   )rt   r%   rv   rY   rC   rq   r   r>   r   rm   rE   rE   rF   get_followers_idsK  s   zLineBotApi.get_followers_idszUse 'from linebot.v3.oauth import ChannelAccessToken' and 'ChannelAccessToken(...).issue_channel_token_by_jwt(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.6urn:ietf:params:oauth:client-assertion-type:jwt-bearerc                 C   s*   | j d|||dddi|d}t|jS )a  Issues a channel access token v2.1.

        https://developers.line.biz/en/reference/messaging-api/#issue-channel-access-token-v2-1

        :param str client_assertion: Client assertion.
        :param str grant_type: `client_credentials`
        :param str client_assertion_type: `urn:ietf:params:oauth:client-assertion-type:jwt-bearer`.
        :param timeout: (optional) How long to wait for the server
        to send data before giving up, as a float,
        or a (connect timeout, read timeout) float tuple.
        Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.IssueChannelTokenResponseV2`
        z/oauth2/v2.1/token)r   client_assertion_typeclient_assertionr   r   r   )rX   r)   rv   rY   )rC   r5  r   r4  r>   rm   rE   rE   rF   issue_channel_access_token_v2_1e  s   z*LineBotApi.issue_channel_access_token_v2_1zUse 'from linebot.v3.oauth import ChannelAccessToken' and 'ChannelAccessToken(...).revoke_channel_token_by_jwt(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s   | j d|||d|d dS )a=  Revokes a channel access token v2.1.

        https://developers.line.biz/en/reference/messaging-api/#revoke-channel-access-token-v2-1

        :param str client_id: Client id.
        :param str client_secret: Channel secret.
        :param str access_token: Channel access token.
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        z/oauth2/v2.1/revoke)r   r   r   rS   Nr   )rC   r   r   r   r>   rE   rE   rF    revoke_channel_access_token_v2_1  s   
z+LineBotApi.revoke_channel_access_token_v2_1c                 C   "   | j d||d|d}t|jS )a  Get issued channel access tokens v2.1.

        https://developers.line.biz/en/reference/messaging-api/#get-issued-channel-access-tokens-v2-1

        :param str client_assertion: Client assertion.
        :param str client_assertion_type: `urn:ietf:params:oauth:client-assertion-type:jwt-bearer`.
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.ChannelAccessTokens`
        z/oauth2/v2.1/tokensr5  r4  r   )rt   r(   rv   rY   rC   r5  r4  r>   rm   rE   rE   rF   get_channel_access_tokens_v2_1  s   z)LineBotApi.get_channel_access_tokens_v2_1zUse 'from linebot.v3.oauth import ChannelAccessToken' and 'ChannelAccessToken(...).verify_channel_token_by_jwt(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s    | j dd|i|d}t|jS )a3  Validate channel access token v2.1.

        https://developers.line.biz/en/reference/messaging-api/#verfiy-channel-access-token-v2-1

        :param str access_token: Channel access token.
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.VerifyChannelTokenResponseV2`
        z/oauth2/v2.1/verifyr   r   )rt   r*   rv   rY   )rC   r   r>   rm   rE   rE   rF    verify_channel_access_token_v2_1  s
   z+LineBotApi.verify_channel_access_token_v2_1zUse 'from linebot.v3.oauth import ChannelAccessToken' and 'ChannelAccessToken(...).gets_all_valid_channel_access_token_key_ids(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   r8  )a  Get all valid channel access token key IDs v2.1.

        https://developers.line.biz/en/reference/messaging-api/#get-all-valid-channel-access-token-key-ids-v2-1

        :param str client_assertion: Client assertion.
        :param str client_assertion_type: `urn:ietf:params:oauth:client-assertion-type:jwt-bearer`.
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:`linebot.models.responses.VerifyChannelTokenResponseV2`
        z/oauth2/v2.1/tokens/kidr9  r   )rt   r+   rv   rY   r:  rE   rE   rF   get_channel_token_key_ids_v2_1  s   z)LineBotApi.get_channel_token_key_ids_v2_1zUse 'from linebot.v3.insight import Insight' and 'Insight(...).get_statistics_per_unit(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   s&   | j dj|||d|d}t|jS )a  Return statistics about how users interact with push and multicast messages.

        https://developers.line.biz/en/reference/partner-docs/#get-statistics-per-unit

        :param str custom_aggregation_unit: Name of aggregation unit specified when sending
            the message like `push_message(...)` and `multicast(...)`.
        :param str from_date: Start date of aggregation period.
            The format is `yyyyMMdd` (Timezone is UTC+9).
        :param str to_date: End date of aggregation period.
            The end date can be specified for up to 30 days later.
            The format is `yyyyMMdd` (Timezone is UTC+9).
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class:
            `linebot.models.responses.InsightMessageEventOfCustomAggregationUnitResponse`
        zw/v2/bot/insight/message/event/aggregation?customAggregationUnit={custom_aggregation_unit}&from={from_date}&to={to_date})custom_aggregation_unit	from_dateto_dater=   )rt   ru   r,   rv   rY   )rC   r>  r?  r@  r>   rm   rE   rE   rF   get_statistics_per_unit  s   z"LineBotApi.get_statistics_per_unitzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_aggregation_unit_usage(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.c                 C   r   )a  Return the number of aggregation units used this month.

        https://developers.line.biz/en/reference/partner-docs/#get-number-of-units-used-this-month

        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class: `linebot.models.responses.AggregationInfoResponse`
        z /v2/bot/message/aggregation/infor=   )rt   r-   rv   rY   r   rE   rE   rF   #get_number_of_units_used_this_month  s   z.LineBotApi.get_number_of_units_used_this_monthzUse 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_aggregation_unit_name_list(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.d   c                 C   r/  )a  Return the name list of units used this month for statistics aggregation.

        :param int limit: Maximum number of aggregation units you can get per request.
            If you don't specify a value, or if you specify a value greater than or equal to 100,
            the maximum is 100.
        :param str start: Get the next array of name list of units
        :param timeout: (optional) How long to wait for the server
            to send data before giving up, as a float,
            or a (connect timeout, read timeout) float tuple.
            Default is self.http_client.timeout
        :type timeout: float | tuple(float, float)
        :rtype: :py:class: `linebot.models.responses.AggregationNameListResponse`
        Nrq   r0  z /v2/bot/message/aggregation/listr   )rt   r.   rv   rY   r1  rE   rE   rF   &get_name_list_of_units_used_this_month  s   z1LineBotApi.get_name_list_of_units_used_this_monthc           	      C   sJ   |p| j | }|d u ri }|| j | jj|||||d}| | |S )N)rA   r   r   r>   )r@   updaterA   rB   rl   _LineBotApi__check_error)	rC   pathr@   r   rA   r   r>   urlrm   rE   rE   rF   rt   +  s   

zLineBotApi._getc                 C   L   |p| j | }|d u rddi}|| j | jj||||d}| | |S Nr   zapplication/jsonrA   rT   r>   )r@   rE  rA   rB   postrF  rC   rG  r@   rT   rA   r>   rH  rm   rE   rE   rF   rX   9     
zLineBotApi._postc                 C   sH   |p| j | }|d u ri }|| j | jj||||d}| | |S )NrK  )r@   rE  rA   rB   deleterF  rM  rE   rE   rF   r   G  s   
zLineBotApi._deletec                 C   rI  rJ  )r@   rE  rA   rB   putrF  rM  rE   rE   rF   r  U  rN  zLineBotApi._putc                 C   sP   d| j   krdk rd S  t| j t| j | jd| jdt| jd)N   r.  ri   zX-Line-Accepted-Request-Id)status_coderA   rk   accepted_request_iderror)	rR  r   dictrA   itemsrl   r   rv   rY   )rm   rE   rE   rF   __check_errorc  s   


zLineBotApi.__check_error)FN)NFNN)NFN)NNNNFN)N)NN)r   N)r   NNr  NNN)r  N)r.  NN)r   r3  N)r3  N)rC  NN)NNNFN)NNNN)`__name__
__module____qualname____doc__DEFAULT_API_ENDPOINTDEFAULT_API_DATA_ENDPOINTr   DEFAULT_TIMEOUTr   rG   r5   r4   r]   rg   rh   rn   rr   rx   r{   r}   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r  r"  r&  r'  r+  r,  r-  r2  r6  r7  r;  r<  r=  rA  rB  rD  rt   rX   r   r  staticmethodrF  rE   rE   rE   rF   r;   1   s~   
)23&3"""""+r;   )=r[  rY   	__about__r   
exceptionsr   rB   r   r   modelsr   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   models.responsesr$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   deprecationsr4   r5   objectr;   rE   rE   rE   rF   <module>   s   |H	