- Upgrades to Createsend API v3.3 which includes new breaking changes
- Breaking: 'client.campaigns' now returned an object to support pagination (use .Results to get the array of campaigns)
- Added 'Tags' as another field that is returned in 'client.scheduled', 'client.drafts' and client.campaigns'
- Added 'Name' as another field that is returned in 'campaign.summary'
- Add new support for 'client.tags' endpoint (ie: getting list of tags for the client)
- Add support for pagination, filtering and sorting to 'client.campaigns' endpoint
- Add Python 3.10 to
tox.ini
- Adding support for returning ListJoinedDate for each subscriber.
- List.Active()
- List.Bounced()
- List.Unsubscribed()
- List.Unconfirmed()
- List.Deleted()
- Segment.Subscribers()
- Subscriber.Get()
- Add
excludemessagebody
parameter for Transactional message details endpoint and update tests. - Update README with sample code for using message details and timeline endpoint.
- Add Python 3.8 to
tox.ini
.
- Added support for Journeys endpoints
- This includes client/journeys, journeys/summary and the journeys/email/... endpoints
- Upgrades to Createsend API v3.2 which includes new breaking changes
- Breaking: 'Consent to track' field is now mandatory for sending smart and classic transactionl emails
- Breaking: 'Consent to track' field is now mandatory when adding or updating subscribers
- Optional 'Include tracking preference' field when retrieving lists of subscribers
- Drop offical support for Python 2.6
- Add a client-side timeout setting to
CreateSend
- No breaking changes for Python2.7 or Python3.x
- Removes test dependencies from install package. (#53)
- Build and upload universal wheels alongside source dists.
- Fix bug where necessary files were not included in the source distribution. (#45, #50)
- Fix bug where the six module was not set as a installation dependency.
- Remove relative imports.
- Improve Python 3 support.
- Use PEP 8 formatting.
- See #43 for details.
- Decode JSON API responses using UTF-8: (#38)
- Fixed the MANIFEST file so that it includes new Transactional files (#25).
- Added support for Transactional Email
- Removed
CreateSend.apikey
to promote using OAuth rather than basic auth with an API key. - Started using the
https://api.createsend.com/api/v3.1/
API endpoint. - Added support for new segments structure.
-
Segments now includes a new
RuleGroups
member, instead of aRules
member.So for example, when you previously would have created a segment like so:
segment.create(list.ListID, 'Python API Segment', [ { "Subject": "EmailAddress", "Clauses": ["CONTAINS pyapi.com"] } ])
You would now do this:
segment.create(list.ListID, 'Python API Segment', [ { "Rules": [ { "RuleType": "EmailAddress", "Clause": "CONTAINS pyapi.com" } ] } ])
-
The Add Rule call is now Add Rule Group, taking a
rulegroup
argument instead of asubject
&clauses
argument.Segment.add_rulegroup(self, rulegroup):
So for example, when you previously would have added a rule like so:
segment.add_rule( "EmailAddress", ["CONTAINS pyapi.com"] )
You would now do this:
segment.add_rulegroup( { "Rules": [ { "RuleType": "EmailAddress", "Clause": "CONTAINS pyapi.com" } ] } )
-
-
Modified several methods so that unnecessary arguments are no longer needed.
The following methods were updated:
Administrator.get()
Person.get()
Subscriber.get()
As an example using, previously you would write:
subscriber = Subscriber(auth, 'listid', 'me@test.com').get('listid', 'me@test.com')
Now you can write:
subscriber = Subscriber(auth, 'listid', 'me@test.com').get()
- Added support for validating SSL certificates to avoid man-in-the-middle attacks.
-
Added Python version and platform details to default user agent string.
-
Added support for setting a custom user agent string.
You can set a custom user agent string to be used for API calls by doing the following:
CreateSend.user_agent = "custom user agent"
- Added support for single sign on which allows initiation of external login sessions to Campaign Monitor.
- Added support for authenticating using OAuth. See the README for full usage instructions.
- Refactored authentication so that it is always done at the instance level. This introduces some breaking changes, which are clearly explained below.
-
Authentication is now always done at the instance level.
So when you previously would have authenticated using an API key as follows:
CreateSend.api_key = 'your_api_key' cs = CreateSend() clients = cs.clients()
If you want to authenticate using an API key, you should now do this:
cs = CreateSend({'api_key': 'your_api_key'}) clients = cs.clients()
-
Instances of any subclasses of
CreateSendBase
are now always created by passing anauth
hash as the first argument.So for example, when you previously would have called
Client()
like so:CreateSend.api_key 'your api key' cl = Client('your client id')
You now call
CreateSend::Client.new
like so:auth = {'api_key': 'your api key'} cl = Client(auth, 'your client id')
-
-
Created objects (clients, campaigns, lists, segments, and templates) now retain identifiers they are given when created. This allows the following code to be written:
client = Client() client.create("Company Name", "(GMT+10:00) Canberra, Melbourne, Sydney", "Australia") details = client.details()
Previously, this code would have been written as follows:
client = Client() client_id = client.create("Company Name", "(GMT+10:00) Canberra, Melbourne, Sydney", "Australia") client.client_id = client_id details = client.details()
- Added support for including from name, from email, and reply to email in drafts, scheduled, and sent campaigns.
- Added support for campaign text version urls.
- Added support for transferring credits to/from a client.
- Added support for getting account billing details as well as client credits.
- Made all date fields optional when getting paged results.
- Added the ability to set api_key for a CreateSend instance, rather than only at the class level.
- Added Campaign.email_client_usage().
- Added support for ReadsEmailWith field on subscriber objects.
- Added support for retrieving unconfirmed subscribers for a list.
- Added support for suppressing email addresses.
- Added support for retrieving spam complaints for a campaign, as well as adding SpamComplaints field to campaign summary output.
- Added VisibleInPreferenceCenter field to custom field output.
- Added support for setting preference center visibility when creating custom fields.
- Added the ability to update a custom field name and preference visibility.
- Added documentation explaining that text_url may now be None or an empty string when creating a campaign.
- Added support for creating campaigns from templates.
- Added support for unsuppressing an email address.
- Improved documentation and tests for getting active subscribers. Clearly documented the data structure for multi option multi select fields.
- Added WorldviewURL field to campaign summary response.
- Added Latitude, Longitude, City, Region, CountryCode, and CountryName fields in campaign opens and clicks responses.
- Added support basic / unlimited pricing.
- Added support for UnsubscribeSetting field when creating, updating, and getting list details.
- Added support for including AddUnsubscribesToSuppList and ScrubActiveWithSuppList fields when updating a list.
- Added support for getting all client lists to which a subscriber with a specific email address belongs.
- Removed deprecated warnings and disallowed calls to be made in a deprecated manner.
- Improved documentation to indicate support for Python 2.5, 2.6, and 2.7
- Added support for specifying whether subscription-based autoresponders should be restarted when adding or updating subscribers.
- Added Travis CI support.
- Added support for newly released team management functionality.
- Added support for compatibility with Python 2.5 by using old "except" syntax.
- Added support for deleting a subscriber.
- Added support for specifying a 'clear' field when updating or importing subscribers.
- Added support for queuing subscription-based autoresponders when importing subscribers.
- Added support for retrieving deleted subscribers.
- Added support for including more social sharing stats in campaign summary.
- Added support for unscheduling a campaign.
- Initial release which support current Campaign Monitor API.