Skip to content

Version 4.0.0

Compare
Choose a tag to compare
@ivanjh ivanjh released this 19 Feb 11:58
· 87 commits to master since this release
  • 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 a Rules 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 a subject & 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" } ] } )