campaignmonitor/createsend-ruby — Issue #10: Subscriber custom fields api sucks!
Author: benschwarz
Created: 2011-10-27 05:36:30+00:00
State: open

Ok, ok, OKAY!

Sucks is a strong word… but I spent some time checking out your api docs, source code and tests before I realised the object format for sending custom fields to your subscriber API.

I ended up implementing using something like this:

custom_fields = user_data.inject([]) do |fields, data|
fields << { :Key => data.first, :Value => data.last }
end

So I thought I'd share the snippet and strongly suggest that you either document it or make it so I can just throw a hash to the `Subscriber.add` method.

Cheers,

Ben