README.md in emaildirect-1.0.1 vs README.md in emaildirect-1.1.0

- old
+ new

@@ -5,20 +5,20 @@ ## Installation ### Plain ruby gem install emaildirect require 'emaildirect' - EmailDirect.api_key 'your_api_key' + EmailDirect.api_key = 'your_api_key' ### Rails integration In your gemfile: gem 'emaildirect' In an initializer: - EmailDirect.api_key 'your_api_key' + EmailDirect.api_key = 'your_api_key' ## Examples ### Retrieve a list of all your publications. @@ -34,9 +34,23 @@ ### Create, then remove a Publication response = EmailDirect::Publication.create('Test', :Description => 'Test Publication') sub = EmailDirect::Publication.new(response.publicationID) sub.delete + +### Updating a subscriber's custom fields + +A single attribute: + + EmailDirect::Subscriber.new(email).update_custom_field :FirstName, 'Pat' + +Multiple attributes: + + EmailDirect::Subscriber.new(email).update_custom_fields :FirstName => 'Pam', :LastName => 'Sinivas' + +When creating a subscriber + + EmailDirect::Subscriber.create(email, :Publications => [1], :CustomFields => { :FirstName => 'Pam', :LastName => 'Sinivas' } ### ActionMailer integration You can use send your ActionMailer email through Email Direct using their Relay Send functionality by setting up a new delivery method in an initalizer: ActionMailer::Base.add_delivery_method :emaildirect, EmailDirect::Mailer,