Commits

jessedp  committed 9cae89a

documentation and readme updates

  • Participants
  • Parent commits 72e33f5
  • Tags 2.0.3

Comments (0)

Files changed (3)

-Mailchimp is a Python API client and suite of CLI-based tools for the MailChimp email service.
-
-The API client is comprehensive, but the CLI functionality is minimal at this time.
-
-Examples:
-import mailchimp
-m = mailchimp.Mailchimp('YOUR_API_KEY')
-print m.users.ping()
---> "Everthing's Chimpy!"
-
-CLI Examples:
-mailchimp setup
-mailchimp ping -c10
+A Python client for v2 of MailChimp's API v2

File mailchimp.py

         params = json.dumps(params)
         self.log('POST to %s%s.json: %s' % (ROOT, url, params))
         start = time.time()
-        r = self.session.post('%s%s.json' % (ROOT, url), data=params, headers={'content-type': 'application/json', 'user-agent': 'MailChimp-Python/2.0.2'})
+        r = self.session.post('%s%s.json' % (ROOT, url), data=params, headers={'content-type': 'application/json', 'user-agent': 'MailChimp-Python/2.0.3'})
         try:
             remote_addr = r.raw._original_response.fp._sock.getpeername() # grab the remote_addr before grabbing the text since the socket will go away
         except:
         Raises:
            InvalidOptionsError:
            ListDoesNotExistError:
+           ListAlreadySubscribedError:
            Error: A general Mailchimp error has occurred
         """
         _params = {'id': id, 'batch': batch, 'double_optin': double_optin, 'update_existing': update_existing, 'replace_interests': replace_interests}
                    data.merge_vars (array): of structs for each merge var::
                        data.merge_vars.name (string): Name of the merge field
                        data.merge_vars.req (bool): Denotes whether the field is required (true) or not (false)
-                       data.merge_vars.field_type (string): The "data type" of this merge var. One of: email, text, number, radio, dropdown, date, address, phone, url, imageurl
+                       data.merge_vars.field_type (string): The "data type" of this merge var. One of the options accepted by field_type in lists/merge-var-add
                        data.merge_vars.public (bool): Whether or not this field is visible to list subscribers
                        data.merge_vars.show (bool): Whether the list owner has this field displayed on their list dashboard
                        data.merge_vars.order (string): The order the list owner has set this field to display in
 
         Raises:
            ListDoesNotExistError:
+           EmailNotExistsError:
+           ListAlreadySubscribedError:
            Error: A general Mailchimp error has occurred
         """
         _params = {'id': id, 'email': email, 'merge_vars': merge_vars, 'email_type': email_type, 'double_optin': double_optin, 'update_existing': update_existing, 'replace_interests': replace_interests, 'send_welcome': send_welcome}
         Raises:
            ListDoesNotExistError:
            EmailNotExistsError:
+           ListAlreadySubscribedError:
            Error: A general Mailchimp error has occurred
         """
         _params = {'id': id, 'email': email, 'delete_member': delete_member, 'send_goodbye': send_goodbye, 'send_notify': send_notify}
            cid (string): the Campaign Id to replicate
 
         Returns:
-           struct.  the matching campaign's details - will return same data as single campaign from campaigns/list()
+           struct.  containing:::
+               is_ready (bool): whether or not you're going to be able to send this campaign
+               items (array): an array of structs explaining basically what the app's confirmation step would::
+                   items.type (string): the item type - generally success, warning, or error
+                   items.heading (string): the item's heading in the app
+                   items.details (string): the item's details from the app, sans any html tags/links
+
 
         Raises:
            CampaignDoesNotExistError:
 
 setup(
     name = 'mailchimp',
-    version = '2.0.2',
+    version = '2.0.3',
     author = 'MailChimp Devs',
     author_email = 'api@mailchimp.com',
     description = 'A CLI client and Python API library for the MailChimp email platform.',