README for EmailLabs Automation Library
Untar and decompress the emaillabslib-<version_number>.tar.gz file. It includes several source and copyright/readme files.
In your Rails application
lib/
- Place the EmailLabs Automation Library program's 'emaillabslib' subfolder here.
emaillabs_helpers.rb
- Map the constants to the field codes you've set up in your organization's EmailLabs account.
- Flesh out error handling functions as desired.
emaillabs_xml_post.rb
- Generally, these functions are only called by the functions in class Emaillabs::EmaillabsEmailRecord.
emaillabs_email_record.rb
- Location of the main functions for developer use.
- assign values as generated by your Rails application for the various EmailLabs fields or demographics information via array in application.rb eg, {'First Name'=>some_customer_info_obj.first_name, 'Last Name'=>some_customer_info_obj.last_name}
- Instantiate an EmaillabsEmailRecord object with an e-mail address in a desired controller. eg, @current_record = Emaillabs::EmaillabsEmailRecord.new(some_customer_info_obj.email)
- Call functions as needed from emaillabs_email_record eg, @current_record.subscribe