Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
require 'rubygems' gem 'soap4r' require 'soap/soap' require 'defaultDriver' require 'client_auth_header_handler' d = Soap.new d.wiredump_dev = STDOUT h = ClientAuthHeaderHandler.new # Create a new handler l = d.login(:username => your_username, :password => your_password + security_token) d.endpoint_url = l.result.serverUrl # Change the endpoint to what login tells us it should be h.sessionid = l.result.sessionId # Tell the header handler what the session id is d.headerhandler << h # Add the header handler to the Array of headerhandlers d.getUserInfo("") # Make an API call; the empty String appears to be necessary
This paste will be private.
From the Design Piracy series on my blog: