o
    éË·e³  ã                   @   s<   d Z ddlmZ ddlmZ ddlmZ G dd„ deƒZdS )zç
The Conversations API endpoint

Note: This is a paid feature

Documentation: http://developer.mailchimp.com/documentation/mailchimp/reference/conversations/
Schema: https://api.mailchimp.com/schema/3.0/Conversations/Instance.json
é    )Úunicode_literals)ÚBaseApi)ÚConversationMessagesc                       s2   e Zd ZdZ‡ fdd„Zd	dd„Zdd„ Z‡  ZS )
ÚConversationsuŒ   
    Conversation tracking is a paid feature that lets you view subscribersâ€™
    replies to your campaigns in your MailChimp account.
    c                    s0   t t| ƒj|i |¤Ž d| _d| _t| ƒ| _dS )z)
        Initialize the endpoint
        ÚconversationsN)Úsuperr   Ú__init__ÚendpointÚconversation_idr   Úmessages)ÚselfÚargsÚkwargs©Ú	__class__© úX/var/www/ideatree/venv/lib/python3.10/site-packages/mailchimp3/entities/conversations.pyr      s   zConversations.__init__Fc                 K   s<   d| _ |r| jdd|  ¡ i|¤ŽS | jjdd|  ¡ i|¤ŽS )aý  
        Get a list of conversations for the account.

        :param get_all: Should the query get all results
        :type get_all: :py:class:`bool`
        :param queryparams: The query string parameters
        queryparams['fields'] = []
        queryparams['exclude_fields'] = []
        queryparams['count'] = integer
        queryparams['offset'] = integer
        queryparams['has_unread_messages'] = string
        queryparams['list_id'] = string
        queryparams['campaign_id'] = string
        NÚurlr   )r
   Ú_iterateÚ_build_pathÚ
_mc_clientÚ_get)r   Úget_allÚqueryparamsr   r   r   Úall    s   zConversations.allc                 K   s"   || _ | jjdd|  |¡i|¤ŽS )a9  
        Get details about an individual conversation.

        :param conversation_id: The unique id for the conversation.
        :type conversation_id: :py:class:`str`
        :param queryparams: The query string parameters
        queryparams['fields'] = []
        queryparams['exclude_fields'] = []
        r   Nr   )r
   r   r   r   )r   r
   r   r   r   r   Úget7   s   
zConversations.get)F)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   Ú__classcell__r   r   r   r   r      s
    
r   N)r   Ú
__future__r   Úmailchimp3.baseapir   Ú(mailchimp3.entities.conversationmessagesr   r   r   r   r   r   Ú<module>   s
   