Skip to content
Provides an easy-to-use ruby interface into the ExactTarget SOAP API, using the Savon client.
Ruby
Find file
Pull request Compare This branch is 58 commits ahead, 4 commits behind daws:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
samples
spec
.gitignore
CHANGELOG.rdoc
Gemfile
Gemfile.lock
LICENSE.txt
README.rdoc
Rakefile
exact_target_sdk.gemspec

README.rdoc

ExactTarget SDK

An object-oriented wrapper for the ExactTarget SOAP API.

The ExactTarget web service guide can be viewed here: docs.code.exacttarget.com/020_Web_Service_Guide

With few exceptions, ruby conventions for capitalization are ignored and those outlined in the guide linked above are used. This is done in an attempt to be as transparent as possible, so that the API may be used by referring only to the guide linked above.

Note this SDK is currently quite incomplete, supporting only a subset of the possible objects and methods. The framework is in place, however, to very easily implement new objects by simply declaring their properties.

Synopsis:

ExactTargetSDK.config(:username => 'foo', :password => 'mypass')

client = ExactTargetSDK::Client.new
definition = ExactTargetSDK::TriggeredSendDefinition.new('CustomerKey' => 'my_triggered_send')
subscriber = ExactTargetSDK::Subscriber.new('EmailAddress' => 'me@example.com')
triggered_send = ExactTargetSDK::TriggeredSend.new('TriggeredSendDefinition' => definition)
triggered_send.Subscribers << subscriber

# Creates subscriber record, then executes the "my_triggered_send" trigger to
# that subscriber.
response = client.Create(subscriber, triggered_send)

puts "response status: #{response.OverallStatus}"
response.Results.each do |result|
  puts "result..."
  puts "  result code: #{result.StatusCode}"
  puts "  result message: #{result.StatusMessage}"
end
Something went wrong with that request. Please try again.