<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Brain Matters &#187; instant messenger</title>
	<atom:link href="http://blog.agoragames.com/tag/instant-messenger/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.agoragames.com</link>
	<description></description>
	<lastBuildDate>Mon, 16 Aug 2010 19:36:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Integrating Lighthouse and Instant Messenger in Ruby</title>
		<link>http://blog.agoragames.com/2009/10/07/integrating-lighthouse-and-instant-messenger-in-ruby/</link>
		<comments>http://blog.agoragames.com/2009/10/07/integrating-lighthouse-and-instant-messenger-in-ruby/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 20:45:06 +0000</pubDate>
		<dc:creator>David Czarnecki</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[aim]]></category>
		<category><![CDATA[instant messenger]]></category>
		<category><![CDATA[lighthouse]]></category>
		<category><![CDATA[lighthouseapp]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.agoragames.com/?p=376</guid>
		<description><![CDATA[The Introduction to the Lighthouse API mentions something you might do with the Lighthouse API is &#8220;Accessing and creating tickets through your Instant Messenger client.&#8221;. How easy is it to do this? Surprisingly easy.
You will need to download and install the Lighthouse API gem and the Net::TOC gem.
Run this in an irb session.


require &#039;net/toc&#039;
require &#039;lighthouse&#039;
require [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://lighthouseapp.com/api/introduction">Introduction to the Lighthouse API</a> mentions something you might do with the Lighthouse API is &#8220;Accessing and creating tickets through your Instant Messenger client.&#8221;. How easy is it to do this? Surprisingly easy.</p>
<p>You will need to download and install the <a href="http://github.com/Caged/lighthouse-api">Lighthouse API</a> gem and the <a href="http://net-toc.rubyforge.org/doc/classes/Net/TOC.html">Net::TOC</a> gem.</p>
<p>Run this in an irb session.</p>
<pre class="brush: ruby">

require &#039;net/toc&#039;
require &#039;lighthouse&#039;
require &#039;sanitize&#039;
include Lighthouse

Lighthouse.account = &#039;shaft&#039;
Lighthouse.token = &#039;hesonebadmotherfushutyourmouth&#039;

Net::TOC.new(&quot;someaimaccount&quot;, &quot;someaimpassword&quot;) do |msg, buddy|
project = Project.find(Sanitize.clean(msg).to_i)
buddy.send_im(&quot;Here is some information about your project: #{project.name}&quot;)
end
</pre>
<p>You should then be able to add &#8217;someaimaccount&#8217; to your AIM buddy list and send a project ID and have it return the project name.</p>
<p>And boom goes the dynamite!</p>
<p>You&#8217;ll of course need to change the Lighthouse account and token as appropriate (or use username and password for logging in). msg is a little weird and although it&#8217;s a string, it&#8217;s HTML, so you need to strip out any tags before doing anything. And of course you&#8217;d want to add in some way of parsing the input from the user into some DSL (Domain Specific Language) for interacting with your fancy new Lighthouse AIM bot.</p>
<p>Happy hacking!</p>




	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.agoragames.com%2F2009%2F10%2F07%2Fintegrating-lighthouse-and-instant-messenger-in-ruby%2F&amp;title=Integrating%20Lighthouse%20and%20Instant%20Messenger%20in%20Ruby" title="Reddit"><img src="http://blog.agoragames.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.agoragames.com%2F2009%2F10%2F07%2Fintegrating-lighthouse-and-instant-messenger-in-ruby%2F&amp;title=Integrating%20Lighthouse%20and%20Instant%20Messenger%20in%20Ruby&amp;bodytext=The%20Introduction%20to%20the%20Lighthouse%20API%20mentions%20something%20you%20might%20do%20with%20the%20Lighthouse%20API%20is%20%22Accessing%20and%20creating%20tickets%20through%20your%20Instant%20Messenger%20client.%22.%20How%20easy%20is%20it%20to%20do%20this%3F%20Surprisingly%20easy.%0D%0A%0D%0AYou%20will%20need%20to%20download%20and%20" title="Digg"><img src="http://blog.agoragames.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fblog.agoragames.com%2F2009%2F10%2F07%2Fintegrating-lighthouse-and-instant-messenger-in-ruby%2F&amp;title=Integrating%20Lighthouse%20and%20Instant%20Messenger%20in%20Ruby&amp;notes=The%20Introduction%20to%20the%20Lighthouse%20API%20mentions%20something%20you%20might%20do%20with%20the%20Lighthouse%20API%20is%20%22Accessing%20and%20creating%20tickets%20through%20your%20Instant%20Messenger%20client.%22.%20How%20easy%20is%20it%20to%20do%20this%3F%20Surprisingly%20easy.%0D%0A%0D%0AYou%20will%20need%20to%20download%20and%20" title="del.icio.us"><img src="http://blog.agoragames.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.agoragames.com%2F2009%2F10%2F07%2Fintegrating-lighthouse-and-instant-messenger-in-ruby%2F&amp;t=Integrating%20Lighthouse%20and%20Instant%20Messenger%20in%20Ruby" title="Facebook"><img src="http://blog.agoragames.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fblog.agoragames.com%2F2009%2F10%2F07%2Fintegrating-lighthouse-and-instant-messenger-in-ruby%2F&amp;t=Integrating%20Lighthouse%20and%20Instant%20Messenger%20in%20Ruby&amp;s=The%20Introduction%20to%20the%20Lighthouse%20API%20mentions%20something%20you%20might%20do%20with%20the%20Lighthouse%20API%20is%20%22Accessing%20and%20creating%20tickets%20through%20your%20Instant%20Messenger%20client.%22.%20How%20easy%20is%20it%20to%20do%20this%3F%20Surprisingly%20easy.%0D%0A%0D%0AYou%20will%20need%20to%20download%20and%20" title="Tumblr"><img src="http://blog.agoragames.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Integrating%20Lighthouse%20and%20Instant%20Messenger%20in%20Ruby%20-%20http%3A%2F%2Fblog.agoragames.com%2F2009%2F10%2F07%2Fintegrating-lighthouse-and-instant-messenger-in-ruby%2F" title="Twitter"><img src="http://blog.agoragames.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.agoragames.com/2009/10/07/integrating-lighthouse-and-instant-messenger-in-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->