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 List Member Goals API endpoint

Documentation: http://developer.mailchimp.com/documentation/mailchimp/reference/lists/members/goals/
Schema: https://api.mailchimp.com/schema/3.0/Lists/Members/Goals/Collection.json
é    )Úunicode_literals)ÚBaseApi)Úcheck_subscriber_hashc                       s(   e Zd ZdZ‡ fdd„Zdd„ Z‡  ZS )ÚListMemberGoalszN
    Get information about recent goal events for a specific list member.
    c                    s,   t t| ƒj|i |¤Ž d| _d| _d| _dS )z)
        Initialize the endpoint
        ÚlistsN)Úsuperr   Ú__init__ÚendpointÚlist_idÚsubscriber_hash)ÚselfÚargsÚkwargs©Ú	__class__© úZ/var/www/ideatree/venv/lib/python3.10/site-packages/mailchimp3/entities/listmembergoals.pyr      s   
zListMemberGoals.__init__c              	   K   s6   t |ƒ}|| _|| _| jjdd|  |d|d¡i|¤ŽS )uÕ  
        Get the last 50 Goal events for a member on a specific list.

        :param list_id: The unique id for the list.
        :type list_id: :py:class:`str`
        :param subscriber_hash: The MD5 hash of the lowercase version of the
          list memberâ€™s email address.
        :type subscriber_hash: :py:class:`str`
        :param queryparams: The query string parameters
        queryparams['fields'] = []
        queryparams['exclude_fields'] = []
        ÚurlÚmembersÚgoalsNr   )r   r
   r   Ú
_mc_clientÚ_getÚ_build_path)r   r
   r   Úqueryparamsr   r   r   Úall   s   "zListMemberGoals.all)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Ú__classcell__r   r   r   r   r      s    
r   N)r   Ú
__future__r   Úmailchimp3.baseapir   Úmailchimp3.helpersr   r   r   r   r   r   Ú<module>   s
   