Createsend

Latest version: v7.0.0

Safety actively analyzes 682532 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 6

4.0.0

* 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:

python
segment.create(list.ListID, 'Python API Segment', [ { "Subject": "EmailAddress", "Clauses": ["CONTAINS pyapi.com"] } ])


You would _now_ do this:

python
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.

python
Segment.add_rulegroup(self, rulegroup):


So for example, when you _previously_ would have added a rule like so:

python
segment.add_rule( "EmailAddress", ["CONTAINS pyapi.com"] )


You would _now_ do this:

python
segment.add_rulegroup( { "Rules": [ { "RuleType": "EmailAddress", "Clause": "CONTAINS pyapi.com" } ] } )

3.4.0

* 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:

python
subscriber = Subscriber(auth, 'listid', 'metest.com').get('listid', 'metest.com')


Now you can write:

python
subscriber = Subscriber(auth, 'listid', 'metest.com').get()

3.3.0

* Added support for validating SSL certificates to avoid man-in-the-middle attacks.

3.2.0

* 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:

python
CreateSend.user_agent = "custom user agent"

3.1.0

* Added support for [single sign on](http://www.campaignmonitor.com/api/account/#single_sign_on) which allows initiation of external login sessions to Campaign Monitor.

3.0.0

* Added support for authenticating using OAuth. See the [README](README.mdauthenticating) 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:

python
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:

python
cs = CreateSend({'api_key': 'your_api_key'})
clients = cs.clients()


* Instances of any subclasses of `CreateSendBase` are now _always_ created by passing an `auth` hash as the first argument.

So for example, when you _previously_ would have called `Client()` like so:

python
CreateSend.api_key 'your api key'
cl = Client('your client id')


You _now_ call `CreateSend::Client.new` like so:

python
auth = {'api_key': 'your api key'}
cl = Client(auth, 'your client id')

Page 3 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.