-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create Parsons Mailchimp connector (#239)
* Create Parsons Mailchimp connector * pep8 compliance * pep8 compliance * Added RST documentation for Mailchimp class * Used Parsons check_env for API key in __init__ * Substituted f-strings where appropriate * pep8 compliance * Completed docstrings for three functions * Completed docstrings * pep8 compliance * Removed transform_table function (not directly in use within Parsons) * Initial testing structure (functionality incomplete) * Fixed syntax and boolean references * Fixed API key structure * Continued work on test JSON * Fixed incorrectly formatted booleans * Added args for function calls * Fixed references to copy/pasted functions * Testing URI fixes * Added members JSON to tests * Added unsubscribe data to expected JSON * Fixed stray punctuation * Fixed punctuation * Added some basic asserts * Added Mailchimp to __init__.py * Return empty tables instead of None * Fixed Mailchimp references in __init__.py Co-authored-by: Eliot Stone <eliot@movementcooperative.org>
- Loading branch information
1 parent
c10b8c2
commit 189fd50
Showing
8 changed files
with
863 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,6 +179,7 @@ Indices and tables | |
google_sheets | ||
google_cloud | ||
hustle | ||
mailchimp | ||
mobilize_america | ||
newmode | ||
ngpvan | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Mailchimp | ||
========= | ||
|
||
`Mailchimp <https://www.mailchimp.com>`_ is a platform used for creating and sending mass emails. | ||
`The Mailchimp API <https://developers.braintreepayments.com/>`_ allows users to interact with data from existing | ||
email campaigns under their account and to configure further campaigns; this Parsons integration focuses on accessing | ||
information about previous email campaigns and the recipients of those campaigns. | ||
|
||
*********** | ||
Quick Start | ||
*********** | ||
|
||
.. code-block:: python | ||
from parsons import Mailchimp | ||
mc = Mailchimp() | ||
# Get all recipient lists under a Mailchimp account | ||
lists = mc.get_lists() | ||
# Get campaigns sent since the beginning of 2020 | ||
recent_campaigns = mc.get_campaigns(since_send_time='2020-01-01T00:00:00Z') | ||
# Get all unsubscribes from a campaign | ||
unsubscribes = mc.get_unsubscribes('dd693a3e74') | ||
*** | ||
API | ||
*** | ||
.. autoclass :: parsons.mailchimp.Mailchimp | ||
:inherited-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from parsons.mailchimp.mailchimp import Mailchimp | ||
|
||
__all__ = [ | ||
'Mailchimp' | ||
] |
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
Oops, something went wrong.