Ruby Gem for iContact
icontact is a Ruby wrapper for the iContact API. For more details, read http://www.icontact.com/developerportal/.
Installation
TODO
Examples
Test connection to the API
client = IContact::Api.new(username, api_password, app_id)
client.pingGet all accounts
client.get_accountsGet all lists
client.get_listsGet a contact
client.get_contact(contact_id)Create a contact
data = { email: 'user@example.com', firstName: 'John', lastName: 'Doe' }
client.create_contact(data)Update a contact
data = { firstName: 'Charlie', lastName: 'Brown', contactId: '8955' }
client.update_contact(contact_id, data)Delete a contact
client.delete_contact(contact_id)Search for contacts
client.find_contacts(firstName: 'John')Create a subscription
data = { listId: list_id, contactId: contact_id, status: 'normal' }
client.create_subscription(data)Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request