Topic: Does anyone have any Ruby (esp Rails) experience with ET?

I found the following Ruby Library for ET.

http://github.com/mguterl/rbet/tree/master

I've never worked with integrating a third-party email solution.  ET has a couple of APIs.  One for batching and one for "web services."  If anyone can relate some design/implementation experience, it would be greatly appreciated.

Re: Does anyone have any Ruby (esp Rails) experience with ET?

We are developing a ExactTarget Ruby gem that we plan to release at some point. I don't know of any Ruby specific design decisions we have made.

Re: Does anyone have any Ruby (esp Rails) experience with ET?

Hi Dan. I'd be very interested in anything you might come up with. Didn't see it on your github account - is there anything we could collaborate on in the meantime?

Cheers,

Graham

Re: Does anyone have any Ruby (esp Rails) experience with ET?

Hey all, I've just posted a Ruby on Rails call library that integrates into the ExactTarget WSDL / SOAP API. Here is the URL, hope this helps out:

http://bit.ly/a6uOZy

Last edited by tkauble (2010-05-21 15:50:54)

Re: Does anyone have any Ruby (esp Rails) experience with ET?

Library is working and it's great. Can anyone help me with some kind of "Hello, World" application?
This application should just create and send a email to some recipient. I.e., send a email with subject = "Hello, World", body = "<p><b>Hello!</b></p>"

From Name = 'some name'
From Address = 'some_addr@gmail.com'
To: 'Jonh.Doe@someorg.com, Jane.Doe@someorg.com'
CC: 'manager@otherorg.com'

I just need to know the steps which I have to perform so send a email.

Currently I'm on a following stage of implmentation:
###################
def sendmail
    require 'rubygems'
    gem 'soap4r'
    require 'soap/wsdlDriver'
    require 'soap/header/simplehandler'
    require 'exacttarget/defaultDriver.rb'
    require 'exacttarget/authStub.rb'

    options = nil

    mailparams = {
      :Name => "TestEmail",
      :ID => nil,
      :Subject => "Hello, World!",
      :HTMLBody => "<p><b>Hello!</b></p>"
    }

    emailObj = Email.new(nil, nil, nil, nil, nil,
                         mailparams[:ID],
                         nil,
                         mailparams[:CustomerKey],
                         nil, nil,
                         mailparams[:Name],
                         nil,  nil,
                         mailparams[:HTMLBody],
                         mailparams[:HTMLBody].gsub(/<\/?[^>]*>/,""),
                         nil,
                         mailparams[:Subject],
                         nil, #isActive
                         1) #isHTMLPaste
    apiObj = emailObj

    resp = $driver.create(CreateRequest.new(options,[*apiObj]))
    emailId = resp.results.first.newID #[:newID]
    render :text=> resp.inspect
  end
###################

This successfully creates a email in ExactTarget and I can see it on Exact target page in "Recent Emails" section. Also I have an ID of recently created email. What should be my next steps to send this email? Should I create EmailSendDef? Perform EmailSendDef? Perform Send?

Thanks for any help.

Last edited by RostVY (2010-06-20 10:25:44)