Ive just read the manual(source:http://www-10.lotus.com/ldd/lcwiki.nsf/dx/Updating_a_status_message_ic301) of Lotus Connection API on updating a status message however I did not find a sample script on how to update user status message?
I have made a basic Ruby scripts. See below:
url = "https://w3-connections.ibm.com/profiles/atom/mv/theboard/entry/status.do?userid=#{username}"
auth = 'Basic ' + Base64.encode64( "#{username}:#{password}" ).chomp
message = '<entry xmlns="http://www.w3.org/2005/Atom">
<title type="text">Hi!</title>
<category term="entry" scheme="http://www.ibm.com/xmlns/prod/sn/type" />
<category term="status" scheme="http://www.ibm.com/xmlns/prod/sn/message-type" />
<content type="text">Morning! Have a nice day ahead!</content>
</entry>'
resource = RestClient::Resource.new(url, { :headers => { 'Authorization' => auth } } )
response = resource.put message, :content_type => 'application/atom+xml'
puts response.inspect
I'm using RestClient(rest-client (1.6.7)) in Ruby for HTTP Authentication. However, it didnt work as I expected. The error says "...400 Bad Request (RestClient::BadRequest)"
Is there something I'm missing? Any help/ideas from you guys would greatly be appreciated. Thanks!