FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
elasticemail-python/examples/functions/deleteList.py at master · ElasticEmail/elasticemail-python · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
ElasticEmail
/
elasticemail-python
Public
Notifications
You must be signed in to change notification settings
Fork
4
Star
9
Code
Issues
0
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
elasticemail-python
/
examples
/
functions
/
deleteList.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
24 lines (19 loc) · 782 Bytes
Breadcrumbs
elasticemail-python
/
examples
/
functions
/
deleteList.py
Copy path
File metadata and controls
24 lines (19 loc) · 782 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import
ElasticEmail
from
ElasticEmail
.
apis
.
tags
import
lists_api
# Defining the host is optional and defaults to https://api.elasticemail.com/v4
configuration
=
ElasticEmail
.
Configuration
()
# Configure API key authorization: apikey
configuration
.
api_key
[
'apikey'
]
=
'YOUR_API_KEY'
"""
Delete list
Example api call that loads given contacts list.
"""
with
ElasticEmail
.
ApiClient
(
configuration
)
as
api_client
:
# Create an instance of the API class
api_instance
=
lists_api
.
ListsApi
(
api_client
)
name
=
"Best contacts"
# str | Name of your list.
try
:
api_instance
.
lists_by_name_delete
({
'name'
:
name
})
print
(
"List deleted."
)
except
ElasticEmail
.
ApiException
as
e
:
print
(
"Exception when calling ListsApi->lists_by_name_delete: %s
\n
"
%
e
)
Back
|
FazBrowse Home
|
New Git URL