File: update_recipient_list.py

package info (click to toggle)
python-sparkpost 1.3.10-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 516 kB
  • sloc: python: 2,528; makefile: 31; sh: 10
file content (25 lines) | stat: -rw-r--r-- 490 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from sparkpost import SparkPost

sp = SparkPost()
response = sp.recipient_lists.update(
    'EXISTING_TEST_ID',
    name='Test Recipient list',
    recipients=[
        {
            'address': {
                'email': 'test1@test.com'
            }
        },
        {
            'address': {
                'email': 'test2@test.com'
            }
        },
        {
            'address': {
                'email': 'test3@test.com'
            }
        }
    ]
)
print(response)