Midwife Client
A wrapper for the Midwife API
Usage
client = Midwife::Client.new('API_KEY')
list = client.create_list(:name => 'April 2011 eVetTen')
client.create_recipient(:list_id => list['id'],
:first_name => 'Michael',
:last_name => 'Jordan',
:email => '[email protected]')
campaign = client.create_campaign(:name => 'April 2011 eVetTen',
:from_name => 'Robert Eversole',
:from_email => '[email protected]',
:subject => '[RecruitMilitary] April eVetTen',
:html_body => html_body,
:plain_body => plain_body)
client.deliver_campaign(:campaign_id => campaign['id'])
TODO
- Better specs (currently connects to a local instance of midwife)
- Error handling