# HG changeset patch # User Peter Sanchez # Date 1603396836 25200 # Thu Oct 22 13:00:36 2020 -0700 # Node ID 93690adaadf04c89380979d746c20ef3392ebf22 # Parent 7634d32c4e4b951906029e4d172fa3bf63a1ff94 Updating for Sendy 5.0 support 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:** 4.0.9 +**Version:** 5.0 **Author:** Peter Sanchez () - () @@ -68,7 +68,13 @@ **Subscribe** : - api.subscribe('list_id_here', 'email@address.com', 'optional first name', custom_field_1='value', custom_field_2='value', ...) + api.subscribe( + 'list_id_here', + 'email@address.com', + 'optional first name', + optional_field=value, + ... + ) *Optional fields* @@ -77,12 +83,8 @@ - `referrer`: The URL where the user signed up from. - `gdpr`: If you're signing up EU users in a GDPR compliant manner. - `hp`: Include this 'honeypot' field to prevent spambots. - - - - data = {"gdpr": True, "ipaddress": "127.0.0.1", "country": "US"} - - api.subscribe(list_id, email, **data) +- `silent`: If `true` then Sendy will treat subscription as single opt-in + regardless of list settings (defaults to `false`) **Unsubscribe** : @@ -113,17 +115,19 @@ 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 + 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, ) Copyright & Warranty ==================== All documentation, libraries, and sample code are Copyright 2016 -Netlandish Inc., Peter Sanchez <>. The +Netlandish Inc., Peter Sanchez <>. The library and sample code are made available to you under the terms of the BSD license which is contained in the included file, BSD-LICENSE. diff --git a/sendy/api.py b/sendy/api.py --- a/sendy/api.py +++ b/sendy/api.py @@ -77,6 +77,8 @@ "segment_ids", "exclude_list_ids", "exclude_segments_ids", + "track_opens", + "track_clicks", ], success_message=["Campaign created", "Campaign created and now sending"], method="POST",