o
    éË·e„  ã                   @   s¨   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ ddlmZ dd	lmZ dd
lm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 Reports API endpoint

Documentation: http://developer.mailchimp.com/documentation/mailchimp/reference/reports/
Schema: https://api.mailchimp.com/schema/3.0/Reports/Instance.json
é    )Úunicode_literals)ÚBaseApi)ÚReportCampaignAbuseReports)ÚReportCampaignAdvice)ÚReportClickDetailReports)ÚReportDomainPerformance)ÚReportEepURL)ÚReportEmailActivity)ÚReportLocations)ÚReportSentTo)ÚReportSubReports)ÚReportUnsubscribesc                       s2   e Zd ZdZ‡ fdd„Zd	dd„Zdd„ Z‡  ZS )
ÚReportsuê   
    Manage campaign reports for your MailChimp account. All Reports endpoints
    are read-only. MailChimpâ€™s campaign and Automation reports analyze clicks,
    opens, subscribersâ€™ social activity, e-commerce data, and more.
    c                    sŠ   t t| ƒj|i |¤Ž d| _d| _t| ƒ| _t| ƒ| _t	| ƒ| _
t| ƒ| _t| ƒ| _t| ƒ| _t| ƒ| _t| ƒ| _t| ƒ| _t| ƒ| _dS )z)
        Initialize the endpoint
        ÚreportsN)Úsuperr   Ú__init__ÚendpointÚcampaign_idr   Úabuse_reportsr   Úadvicer   Úclick_detailsr   Údomain_performancer   Úeepurlr	   Úemail_activityr
   Ú	locationsr   Úsent_tor   Ú
subreportsr   Úunsubscribes)ÚselfÚargsÚkwargs©Ú	__class__© úR/var/www/ideatree/venv/lib/python3.10/site-packages/mailchimp3/entities/reports.pyr      s   








zReports.__init__Fc                 K   s<   d| _ |r| jdd|  ¡ i|¤ŽS | jjdd|  ¡ i|¤ŽS )a¥  
        Get campaign reports.

        .. note::
            The before_send_time and since_send_time queryparams expect times
            to be listed in the ISO 8601 format in UTC (ex.
            2015-10-21T15:41:36+00:00).

        :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['type'] = []
        queryparams['before_send_time'] = string
        queryparams['since_send_time'] = string
        NÚurlr#   )r   Ú_iterateÚ_build_pathÚ
_mc_clientÚ_get)r   Úget_allÚqueryparamsr#   r#   r$   Úall0   s   zReports.allc                 K   s"   || _ | jjdd|  |¡i|¤ŽS )a0  
        Get report details for a specific sent campaign.

        :param campaign_id: The unique id for the campaign.
        :type campaign_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$   ÚgetK   s   
zReports.get)F)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r,   r-   Ú__classcell__r#   r#   r!   r$   r      s
    
r   N)r1   Ú
__future__r   Úmailchimp3.baseapir   Ú.mailchimp3.entities.reportcampaignabusereportsr   Ú(mailchimp3.entities.reportcampaignadvicer   Ú,mailchimp3.entities.reportclickdetailreportsr   Ú+mailchimp3.entities.reportdomainperformancer   Ú mailchimp3.entities.reporteepurlr   Ú'mailchimp3.entities.reportemailactivityr	   Ú#mailchimp3.entities.reportlocationsr
   Ú mailchimp3.entities.reportsenttor   Ú$mailchimp3.entities.reportsubreportsr   Ú&mailchimp3.entities.reportunsubscribesr   r   r#   r#   r#   r$   Ú<module>   s   