Project

icontact

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Ruby wrapper for the iContact API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
~> 10.3
~> 3.0

Runtime

~> 0.8
~> 2.11
 Project Readme

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