Skip to content
This repository has been archived by the owner on Mar 27, 2021. It is now read-only.

l1h3r/icontact

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gem Version Code Climate

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.ping

Get all accounts

  client.get_accounts

Get all lists

  client.get_lists

Get 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

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

Ruby Library for the iContact API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages