require 'cleverlements'
client = CleverElements::Client.new('API_ID', 'API_KEY', 'live') # Use test if you do not want to write to the API
client.lists.all
client.lists.find(LIST_ID)
client.lists.get_subscribers(LIST_ID)
subscribers = [
{
list_id: LIST_ID,
email: '[email protected]'
custom_fields: [{field_id: 818718, field_value: 'Sir'}]
},
{
list_id: LIST_ID,
email: '[email protected]'
custom_fields: [{field_id: 818718, field_value: 'Madam'}]
}
]
client.subscribers.create(subscribers)
client.subscribers.find_by_email('[email protected]')