o
    ˷eV                     @   s0   d Z ddlmZ ddlmZ G dd deZdS )z
The Campaign Content API endpoint

Documentation: http://developer.mailchimp.com/documentation/mailchimp/reference/campaigns/content/
Schema: https://api.mailchimp.com/schema/3.0/Campaigns/Content/Collection.json
    )unicode_literals)BaseApic                       s0   e Zd ZdZ fddZdd Zdd Z  ZS )CampaignContentz]
    Manage the HTML, plain-text, and template content for your MailChimp
    campaigns.
    c                    s&   t t| j|i | d| _d| _dS )z)
        Initialize the endpoint
        	campaignsN)superr   __init__endpointcampaign_id)selfargskwargs	__class__ Z/var/www/ideatree/venv/lib/python3.10/site-packages/mailchimp3/entities/campaigncontent.pyr      s   
zCampaignContent.__init__c                 K   s$   || _ | jjdd| |di|S )a7  
        Get the the HTML and plain-text content for a 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'] = []
        urlcontentNr   )r	   
_mc_client_get_build_path)r
   r	   queryparamsr   r   r   get   s   
zCampaignContent.getc                 C   s   || _ | jj| |d|dS )z
        Set the content for a campaign.

        :param campaign_id: The unique id for the campaign.
        :type campaign_id: :py:class:`str`
        :param data: The request body parameters
        :type data: :py:class:`dict`
        r   )r   data)r	   r   _putr   )r
   r	   r   r   r   r   update)   s   	zCampaignContent.update)__name__
__module____qualname____doc__r   r   r   __classcell__r   r   r   r   r      s
    	r   N)r   
__future__r   mailchimp3.baseapir   r   r   r   r   r   <module>   s   