I'm getting a bizarre error attempting to retrieve my campaigns from the ET Marketing Cloud using the fuel sdk in ruby.
Following the default example used for List retrieval, it's working correctly:
client = FuelSDK::Client.new({'client'=> { 'id' => EXACTTARGET_CLIENT_ID, 'secret' => EXACTTARGET_CLIENT_SECRET }})
list = FuelSDK::List.new
list.client = client
response = list.get
gives me a response like so:
[{:client=>{:id=>"XXXXXXX"}, :partner_key=>nil, :created_date=>Mon, 12 Jan 2015 17:01:13 +0000, :modified_date=>Mon, 12 Jan 2015 17:01:13 +0000, :id=>"4402", :object_id=>"bea2b746-7a03-4a50-9c94-ff89f387d443", :customer_key=>"All Subscribers - 52047", :list_name=>"All Subscribers", :category=>"52047", :type=>"Private", :description=>"Contains all subscribers", :list_classification=>"ExactTargetList", :"@xsi:type"=>"List"}]
However, if I try to use the given example for Campaigns:
campaign = FuelSDK::Campaign.new
campaign.authStub = client #(NB: authStub or client? same error either way)
response = campaign.get
I'm immediately greeted with the following:
undefined method 'keys' for [{"id"=>""}]:Array
I'm pulling my hair out over this one, can anyone help me understand why this is happening for campaigns (and only campaigns?!)
Thanks.