<?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>Baroquebobcat &#187; javascript</title>
	<atom:link href="http://blog.baroquebobcat.com/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.baroquebobcat.com</link>
	<description>Ruby, Computer Science, Japan and Stuff</description>
	<lastBuildDate>Thu, 19 Jan 2012 02:05:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Updated Twitter Javascript Search Stuff</title>
		<link>http://blog.baroquebobcat.com/2009/05/13/updated-twitter-javascript-search-stuff/</link>
		<comments>http://blog.baroquebobcat.com/2009/05/13/updated-twitter-javascript-search-stuff/#comments</comments>
		<pubDate>Wed, 13 May 2009 05:04:50 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blog.baroquebobcat.com/?p=289</guid>
		<description><![CDATA[Gist of it]]></description>
			<content:encoded><![CDATA[<p><script src="http://gist.github.com/110884.js"></script><br />
<noscript><a href=http://gist.github.com/110884>Gist of it</a></noscript></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.baroquebobcat.com/2009/05/13/updated-twitter-javascript-search-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Search from Javascript</title>
		<link>http://blog.baroquebobcat.com/2009/05/05/twitter-search-from-javascript/</link>
		<comments>http://blog.baroquebobcat.com/2009/05/05/twitter-search-from-javascript/#comments</comments>
		<pubDate>Tue, 05 May 2009 07:45:07 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.baroquebobcat.com/?p=251</guid>
		<description><![CDATA[I was working on building a js twitter search app for jazzfest, which I didn&#8217;t finish in time really, but I liked the interface I came up with. Twitter = { _callbacks:[] }; Twitter.search = function(opts){ //opts.q //opts.callback var callback = function(data){ opts.callback(data); Twitter._callbacks = Twitter._callbacks.without(callback) } var len = Twitter._callbacks.push(callback) document.body.insert("") } You call [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on building a js<a href="http://www.baroquebobcat.com/jazzfest/"> twitter search app for jazzfest</a>, which I didn&#8217;t finish in time really, but I liked the interface I came up with.</p>
<pre lang="javascript">Twitter = {
  _callbacks:[]
};
Twitter.search = function(opts){
//opts.q
//opts.callback
var callback = function(data){
    opts.callback(data);
    Twitter._callbacks = Twitter._callbacks.without(callback)
  }
var len = Twitter._callbacks.push(callback)
document.body.insert("<script src='http://search.twitter.com/search.json?q="+escape(opts.q)+"&#038;callback=Twitter._callbacks["+(len-1).toString()+"]'>")
}
</pre>
<p>You call it by doing:</p>
<pre lang="javascript">
Twitter.search({q:'happy birthday',callback: function(data){
  something_awesome(data.results)
}})
</pre>
<p>The next thing to do would be to add support for more of the <a href="http://apiwiki.twitter.com/Twitter-Search-API-Method%3A-search">search API's parameters.</a><br />
Or to remove the dependency on Prototype introduced by using <code>insert</code> on the body rather than something more verbose.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.baroquebobcat.com/2009/05/05/twitter-search-from-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

