Python-ymlp is a YMLP.COM api wrapper for python, it's written in the way to copy original api strucure. For more information about YMLP api, visit api page.
Implemented methods:
- Contacts
- Add
- Delete
- Unsubscribe
- GetContact
- Groups
- GetList
- Fields
- GetList
- GetID
- Filters
Example:
from ymlp import YMLPManager
ymlp = YMLPManager(YMLP_USERNAME, YMLP_API_KEY)
ymlp.Contacts.Add("[email protected]", 1) # add email in group with id 1
try:
ymlp.Contacts.Add("[email protected]", 1)
except YMLPException as (code, info):
if code == "3": #All error codes you can find in ymlp docs of Contancs.Add method
print "contact already exist"
#format of returned data is exactly the same as described in the ymlp api docs
groups = ymlp.Groups.GetList()
fields_list = ymlp.Fields.GetList()