o
    éË·eÁ  ã                   @   s0   d Z ddlmZ ddlmZ G dd„ deƒZdS )zÕ
The Location Report API endpoint

Documentation: http://developer.mailchimp.com/documentation/mailchimp/reference/reports/locations/
Schema: https://api.mailchimp.com/schema/3.0/Reports/Locations/Collection.json
é    )Úunicode_literals)ÚBaseApic                       s*   e Zd ZdZ‡ fdd„Zddd„Z‡  ZS )ÚReportLocationsz9
    Get top open locations for a specific campaign.
    c                    s&   t t| ƒj|i |¤Ž d| _d| _dS )z)
        Initialize the endpoint
        ÚreportsN)Úsuperr   Ú__init__ÚendpointÚcampaign_id)ÚselfÚargsÚkwargs©Ú	__class__© úZ/var/www/ideatree/venv/lib/python3.10/site-packages/mailchimp3/entities/reportlocations.pyr      s   
zReportLocations.__init__Fc                 K   sD   || _ |r| jdd|  |d¡i|¤ŽS | jjdd|  |d¡i|¤ŽS )aß  
        Get top open locations for a specific campaign.

        :param campaign_id: The unique id for the campaign.
        :type campaign_id: :py:class:`str`
        :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
        ÚurlÚ	locationsNr   )r	   Ú_iterateÚ_build_pathÚ
_mc_clientÚ_get)r
   r	   Úget_allÚqueryparamsr   r   r   Úall   s   zReportLocations.all)F)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Ú__classcell__r   r   r   r   r      s    	r   N)r   Ú
__future__r   Úmailchimp3.baseapir   r   r   r   r   r   Ú<module>   s   