# HG changeset patch # User Peter Sanchez # Date 1636999067 28800 # Mon Nov 15 09:57:47 2021 -0800 # Node ID e80f22956f32d768919a788e2c3e11741898d654 # Parent 589b0b440988481fa666ea73c5c34c9edc0139c6 Updates for Sendy 5.2.5 diff --git a/README.md b/README.md --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Simple module to interface with the Sendy API () -**Version:** 5.0 +**Version:** 5.2.5 **Project Links:** [Issues][issues] - [Mailing List][pinbox] - @@ -126,6 +126,9 @@ exclude_segments_ids='segment_id_1,segment_id_2', track_opens=1, # defaults to 1, set to 0 do disable track_clicks=1, + "query_string"='extra data', + "schedule_date_time"='June 15, 2021 6:05pm', + "schedule_timezone"='America/New_York', ) # Contributing diff --git a/README.rst b/README.rst --- a/README.rst +++ b/README.rst @@ -3,7 +3,7 @@ Simple module to interface with the Sendy API (https://sendy.co/api) -**Version:** 5.0 +**Version:** 5.2.5 **Project Links:** `Issues `__ - @@ -43,19 +43,19 @@ :: - pip install sendypy + pip install sendypy Basic Manual Install: :: - $ python setup.py build - $ sudo python setup.py install + $ python setup.py build + $ sudo python setup.py install Alternative Install (Manually): Place sendy directory in your Python path. Either in your Python -installs site-packages directory or set your $PYTHONPATH environment +installs site-packages directory or set your \\$PYTHONPATH environment variable to include a directory where the impersonate directory lives. Use @@ -68,11 +68,11 @@ :: - from sendy.api import SendyAPI - api = SendyAPI( - host='https://your-sendy-install.com/sendy/', - api_key='YOUR_API_KEY', - ) + from sendy.api import SendyAPI + api = SendyAPI( + host='https://your-sendy-install.com/sendy/', + api_key='YOUR_API_KEY', + ) You can also provide the optional ``debug`` variable (defaults to False). This will print debug into to stdout when sending a request to @@ -82,13 +82,13 @@ :: - api.subscribe( - 'list_id_here', - 'email@address.com', - 'optional first name', - optional_field=value, - ... - ) + api.subscribe( + 'list_id_here', + 'email@address.com', + 'optional first name', + optional_field=value, + ... + ) *Optional fields* @@ -104,48 +104,51 @@ :: - api.unsubscribe('list_id_here', 'email@address.com') + api.unsubscribe('list_id_here', 'email@address.com') **Delete** : :: - api.delete('list_id_here', 'email@address.com') + api.delete('list_id_here', 'email@address.com') **Subscription Status** : :: - api.subscription_status('list_id_here', 'email@address.com') + api.subscription_status('list_id_here', 'email@address.com') **Subscriber Count** : :: - api.subscriber_count('list_id_here') + api.subscriber_count('list_id_here') **Create Campaign** : :: - api.create_campaign( - from_name='Your Name', - from_email='Your Sender Email', - reply_to='Your Reply-to Email', - title='Your Email Title', - subject='Your Email Subject', - plain_text='Plain Text Email Body', - html_text='HTML Email Body', - list_ids='list_id_1,list_id_2,list_id_3', - brand_id='your brand id', - query_string='Your query string', - send_campaign=0, # default's to 0, use 1 to send email right away - segment_ids='segment_id_1,segment_id_2', - exclude_list_ids='list_id_1,list_id_2,list_id_3', - exclude_segments_ids='segment_id_1,segment_id_2', - track_opens=1, # defaults to 1, set to 0 do disable - track_clicks=1, - ) + api.create_campaign( + from_name='Your Name', + from_email='Your Sender Email', + reply_to='Your Reply-to Email', + title='Your Email Title', + subject='Your Email Subject', + plain_text='Plain Text Email Body', + html_text='HTML Email Body', + list_ids='list_id_1,list_id_2,list_id_3', + brand_id='your brand id', + query_string='Your query string', + send_campaign=0, # default's to 0, use 1 to send email right away + segment_ids='segment_id_1,segment_id_2', + exclude_list_ids='list_id_1,list_id_2,list_id_3', + exclude_segments_ids='segment_id_1,segment_id_2', + track_opens=1, # defaults to 1, set to 0 do disable + track_clicks=1, + "query_string"='extra data', + "schedule_date_time"='June 15, 2021 6:05pm', + "schedule_timezone"='America/New_York', + ) Contributing ============ @@ -168,14 +171,14 @@ :: - [email] - to = ~netlandish/public-inbox@lists.code.netlandish.com + [email] + to = ~netlandish/public-inbox@lists.code.netlandish.com - [patchbomb] - flagtemplate = "sendypy" + [patchbomb] + flagtemplate = "sendypy" - [diff] - git = 1 + [diff] + git = 1 We have more information on the topic here: diff --git a/sendy/__init__.py b/sendy/__init__.py --- a/sendy/__init__.py +++ b/sendy/__init__.py @@ -1,6 +1,6 @@ name = 'sendypy' -VERSION = (5, 0, 0, 'final', 0) +VERSION = (5, 2, 5, 'final', 0) def get_version(): diff --git a/sendy/api.py b/sendy/api.py --- a/sendy/api.py +++ b/sendy/api.py @@ -79,7 +79,14 @@ "exclude_segments_ids", "track_opens", "track_clicks", + "query_string", + "schedule_date_time", + "schedule_timezone", ], - success_message=["Campaign created", "Campaign created and now sending"], + success_message=[ + "Campaign created", + "Campaign created and now sending", + "Campaign scheduled", + ], method="POST", )