<?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>Stubbleblog &#187; api</title>
	<atom:link href="http://www.stubbleblog.com/index.php/tag/api/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stubbleblog.com</link>
	<description>Social Software Enthusiast</description>
	<lastBuildDate>Mon, 09 Aug 2010 21:03:44 +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>Using the Salesforce API</title>
		<link>http://www.stubbleblog.com/index.php/2006/12/using-the-sales/</link>
		<comments>http://www.stubbleblog.com/index.php/2006/12/using-the-sales/#comments</comments>
		<pubDate>Mon, 04 Dec 2006 23:28:18 +0000</pubDate>
		<dc:creator>Tony Stubblebine</dc:creator>
				<category><![CDATA[api]]></category>
		<category><![CDATA[blogvertising]]></category>
		<category><![CDATA[mashup]]></category>
		<category><![CDATA[salesforce]]></category>

		<guid isPermaLink="false">http://www.stubbleblog.com/wp/?p=146</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>Just posted my <a href="http://www.oreillynet.com/pub/a/network/2006/11/27/using-the-salesforcecom-api.html">Using the Saleforce API</a> article on the O&#8217;Reilly Network:</p>
<blockquote><p>
In this article I&#8217;m going to turn a blog into a Salesforce lead generator by integrating the blog comments with Salesforce Leads using the Salesforce API, SOQL (a Salesforce-specific, SQL-like query language), and some Salesforce object customization.</p>
<p>If you hear the phrase &#8220;lead generation&#8221; and picture a car salesman, then you should probably step back and think about what you do when someone posts a comment to your blog. Do you try to find their blog? Google them? Go as far as emailing them? If you comment on my blog, you can be assured that I&#8217;m going to email you back.</p>
<p>Lead generation and tracking is a big part of any sales process and a major concept inside the Salesforce CRM. Many businesses are adding blogs to their sales and marketing activities and will want to integrate these into their existing sales process.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.stubbleblog.com/index.php/2006/12/using-the-sales/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to Salesforce AppExchange</title>
		<link>http://www.stubbleblog.com/index.php/2006/11/introduction-to/</link>
		<comments>http://www.stubbleblog.com/index.php/2006/11/introduction-to/#comments</comments>
		<pubDate>Mon, 13 Nov 2006 20:46:04 +0000</pubDate>
		<dc:creator>Tony Stubblebine</dc:creator>
				<category><![CDATA[api]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[mashup]]></category>
		<category><![CDATA[oreilly]]></category>
		<category><![CDATA[salesforce]]></category>

		<guid isPermaLink="false">http://www.stubbleblog.com/wp/?p=138</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>I went to a Salesforce conference recently to investigate Salesforce as a platform for building applications for the business web. I liked what I saw. The tools they are building for developers fit very much with the <a href="http://www.stubbleblog.com/archives/2006/11/odeo_joins_an_o.html">trend toward smaller development companies</a> (i.e. one or two people) who can focus completely on the product because the infrastructure for running the rest of the company already exists.</p>
<p>Today O&#8217;Reilly posted part one of my three part series on building for Salesforce AppExchange, <a href="http://www.oreillynet.com/pub/a/network/2006/11/13/an-introduction-to-saleforcecoms-appexchange.html">An Introduction to Salesforce.com&#8217;s AppExchange.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stubbleblog.com/index.php/2006/11/introduction-to/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YouTube API How-To</title>
		<link>http://www.stubbleblog.com/index.php/2006/11/youtube-api-how/</link>
		<comments>http://www.stubbleblog.com/index.php/2006/11/youtube-api-how/#comments</comments>
		<pubDate>Wed, 08 Nov 2006 22:46:57 +0000</pubDate>
		<dc:creator>Tony Stubblebine</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[mashup]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.stubbleblog.com/wp/?p=134</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<h2>What is it</h2>
<p>The <a href="http://www.youtube.com/dev">YouTube API</a> lets you search for videos and display them on your site. For example, I use the API to pull videos tagged dance and display them on <a href="http://www.ratemydancemoves.com">Rate My Dance Moves</a>. The YouTube API is currently the 10th most popular API on ProgrammableWeb with <a href="http://www.programmableweb.com/api/YouTube/mashups">46 mashups</a>.</p>
<p>To get started you need to sign up for a <a href="http://www.youtube.com/signup?next=my_profile_dev">developer account</a>. That will give you the developer id required to use the API.</p>
<h2>Using the API</h2>
<p>The major API methods are for retrieving lists of videos, which you can do by <a href="http://www.youtube.com/dev_api_ref?m=youtube.videos.list_by_tag">tag</a>, <a href="http://www.youtube.com/dev_api_ref?m=youtube.videos.list_by_user">user</a>, <a href="http://www.youtube.com/dev_api_ref?m=youtube.users.list_favorite_videos">user favorites</a>, and <a href="http://www.youtube.com/dev_api_ref?m=youtube.videos.list_featured">featured</a>. The information returned from the list methods is usually enough to display a video on your site. All you have to do is plug the video id into the web snippit below.</p>
<pre>
<code>
&lt;object width="425" height="350">
&lt;param name="movie" value="http://www.youtube.com/v/<strong>ID</strong>&#038;autoplay=1">
&lt;/param>
&lt;embed src="http://www.youtube.com/v/<strong>ID</strong>&#038;autoplay=1"
type="application/x-shockwave-flash" width="425" height="350">&lt;/embed>
&lt;/object>
</code>
</pre>
<p>Most of the information you need is in the video list methods. However, if you want a list of comments or channels for the video you&#8217;ll need to call the <a href="http://www.youtube.com/dev_api_ref?m=youtube.videos.get_details">get_details</a> method.</p>
<p>One complaint I had with <code>list_by_tag</code> is that the results come back ordered by relevance rather than recency. That means if you want to build a self-updating site you need to either regularly crawl the entire result set (results are paged) or sit on one of the  <a href="http://www.youtube.com/dev_api_ref?m=youtube.videos.list_by_tag">RSS Feeds.</a></p>
<h2>API Wrappers</h2>
<p>There are good libraries  for using the YouTube API with Perl, Ruby, and .NET. If you&#8217;re using another language, say Java, PHP or Python, you&#8217;ll have to write some code yourself. I&#8217;ve included links to example PHP and Python code and listed an example Ruby program that you can use as a template for whatever language you&#8217;re writing in.</p>
<p>There&#8217;s two competing Perl modules, but Hironori Yoshida&#8217;s <a href="http://search.cpan.org/author/YOSHIDA/WebService-YouTube-0.04/lib/WebService/YouTube.pm">WebService::YouTube </a> and <a href="http://search.cpan.org/author/YOSHIDA/WebService-YouTube-0.04/lib/WebService/YouTube/Feeds.pm">WebService::Youtube::Feeds </a> seem best based on the recent development activity and strength of documentation. His is the only wrapper which includes support for the feeds, nice since the feeds have functionality thats not in the API (namely list by recency).</p>
<p>Shane Vitarana released a <a href="http://shanesbrain.net/articles/2006/09/28/a-ruby-interface-to-the-youtube-api">YouTube Ruby Gem</a> after I&#8217;d built RateMyDanceMoves. Too bad, since it seems like the most polished of all the wrappers.</p>
<p>Eamonn Flynn has a <a href="http://www.eamonnflynn.net/YouTubeDotNet/YouTubeApi.htm">.NET wrapper for the YouTube API.</a></p>
<p>There doesn&#8217;t seem to be a packaged PHP library but these two tutorials from waxjelly should be enough to get you started. <br />
<a href="http://www.waxjelly.com/2006/08/28/simple-php-script-using-the-youtube-api-with-pagination-part-1/">Simple PHP Script Using the YouTube API with Pagination</a><br />
<a href="http://www.waxjelly.com/2006/08/29/a-more-complex-php-script-using-the-youtube-api-with-video-details-part-2/">A More Complex PHP Script Using the YouTube API with Pagination.</a></p>
<p>ThinkHole labs has some <a href="http://thinkhole.org/wp/2006/01/09/the-youtube-api-and-python/">example YouTube API code for Python users</a>. Apparently using the API can be as simple as passing a dictionary to YouTube&#8217;s XML-RPC interface.</p>
<h2>Code Example</h2>
<p>I&#8217;d written my own code before the Ruby library came out. I want to show it here so you can see how simple writing your own code would be.</p>
<p><pre>
<code>
#!/usr/bin/env ruby
require 'open-uri'

tag = "dancing"
per_page = "100"
def_id = "YOUR_DEV_ID_HERE"
url = "http://www.youtube.com/api2_rest?" \
+ "method=youtube.videos.list_by_tag" \
+ "&#038;tag=#{tag}&#038;per_page=#{per_page}&#038;dev_id=#{dev_id}&#038;page=1"

open(url) do |f|
xml = f.read
end

doc = REXML::Document.new(xml)

elements = doc.root.get_elements("//video")
elements.each do |v|
puts v.get_elements("id").first.get_text.to_s
puts v.get_elements("title").first.get_text.to_s
puts v.get_elements("tags").first.get_text.to_s
puts v.get_elements("thumbnail_url").first.get_text.to_s
end
</code>
</pre>
</p>
<h2>More Info</h2>
<p><a href="http://www.quickonlinetips.com/archives/2006/10/the-amazing-youtube-tools-collection">The Amazing YouTube Tools Collection</a> has a long collection of YouTube tools, mashups, and plugins. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.stubbleblog.com/index.php/2006/11/youtube-api-how/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Quotes On Your Phone</title>
		<link>http://www.stubbleblog.com/index.php/2006/09/quotes-on-your/</link>
		<comments>http://www.stubbleblog.com/index.php/2006/09/quotes-on-your/#comments</comments>
		<pubDate>Fri, 29 Sep 2006 18:13:49 +0000</pubDate>
		<dc:creator>Tony Stubblebine</dc:creator>
				<category><![CDATA[api]]></category>
		<category><![CDATA[iheartquotes]]></category>
		<category><![CDATA[mashup]]></category>
		<category><![CDATA[quotes]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.stubbleblog.com/wp/?p=125</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>Make <a href="http://twitter.com/iheartquotes/">iheartquotes</a> your Twitter friend and get quotes messaged to your phone every day at 10am, 3pm, and 8pm.</p>
<p>If you&#8217;re not ready for daily updates but find yourself alone with your cell phone jonesing for a quote you can also text <strong>iheartquotes</strong> to MOZES (66937).</p>
<p>This latest I Heart Quotes integration is a mashup of the <a href="http://iheartquotes.com/api">I Heart Quotes API</a> and the <a href="http://twitter.com/help/api/">Twitter API</a>.  The Twitter API is new but there&#8217;s already been some cool uses, like <a href="http://www.tikirobot.net/wp/2006/09/24/updating-twitter-via-ichat-or-aim-status-message/"> update Twitter with your IChat status</a>. I&#8217;m sure there will be more, because 1. Twitter is awesome, 2. the API is dead simple.</p>
<p><em>BTW, I Heart the quote that Biz dug up  for <a href="http://twitter.com/blog/2006/09/on-other-hand-you-have-different.html">his post</a> about this on the Twitter blog.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stubbleblog.com/index.php/2006/09/quotes-on-your/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tribute to the Unix Fortune Program</title>
		<link>http://www.stubbleblog.com/index.php/2006/09/tribute-to-the/</link>
		<comments>http://www.stubbleblog.com/index.php/2006/09/tribute-to-the/#comments</comments>
		<pubDate>Sun, 10 Sep 2006 20:31:13 +0000</pubDate>
		<dc:creator>Tony Stubblebine</dc:creator>
				<category><![CDATA[api]]></category>
		<category><![CDATA[iheartquotes]]></category>
		<category><![CDATA[joke]]></category>
		<category><![CDATA[quote]]></category>
		<category><![CDATA[webservice]]></category>

		<guid isPermaLink="false">http://www.stubbleblog.com/wp/?p=117</guid>
		<description><![CDATA[
Introducing I Heart Quotes.
Unix used to have a lot of personality. RedHat would let you go through the entire installation in the language of &#8216;Redneck.&#8217;
And every server had a program called &#8216;fortune&#8217; that would greet you with some manner of quote, joke, epigram, or other pithy comment. Things like this gave personality to an otherwise [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://iheartquotes.com/"><img src="http://iheartquotes.com/images/iheartquotes.header.png" border="0" /></a></p>
<p>Introducing <a href="http://iheartquotes.com">I Heart Quotes</a>.</p>
<p>Unix used to have a lot of personality. RedHat would let you go through the entire installation in the language of &#8216;Redneck.&#8217;<br />
And every server had a program called &#8216;fortune&#8217; that would greet you with some manner of quote, joke, epigram, or other pithy comment. Things like this gave personality to an otherwise pretty nerdy hobby.</p>
<p>At some point the source of those quotes, the fortune program, stopped showing up on servers. A combination of Linux trying to compete in the corporate world and my leaving college to also compete in the corporate world led to working on servers with less personality. The fortune program still exists, but just isn&#8217;t as prevalent. I think that&#8217;s sad.</p>
<p>So what&#8217;s a man to do? Build a <a href="http://iheartquotes.com/api/">web service on top of every fortune file I could find on the internet</a> (if you know of any that I missed, please email me). Now I (you) can get your fortune regardless of what&#8217;s installed on the server.</p>
<p>(I also built a <a href="http://iheartquotes.com/fortune/list">digg-style website and ratings</a> for the data, but that&#8217;s really beside the point.)</p>
<p>Here&#8217;s what I put in my .bash_profile to get a fortune every time I login:</p>
<pre>
alias getfortune='wget --timeout=3 -O - -q'
alias fortune='getfortune http://www.iheartquotes.com/api/v1/random'
alias myfortune='getfortune http://www.iheartquotes.com/api/v1/random?source=joel_on_software+paul_graham+prog_style
myfortune</pre>
<p>If you&#8217;re on a Mac you probably have curl installed instead of wget. If so use this line:</p>
<pre>alias getfortune='curl -m 3'</pre>
<p>There&#8217;s more options on the <a href="http://iheartquotes.com/api">official API page</a>, the most important is that you can choose which sources the API pulls from (make sure you include Comic Book Guy from the Simpsons: <a href="http://iheartquotes.com/fortune/rand/simpsons_cbg">simpsons_cbg</a>). The available sources are below.</p>
<p>From geek:</p>
<p><a href="http://iheartquotes.com/fortune/rand/esr">esr</a><br />
<a href="http://iheartquotes.com/fortune/rand/humorix_misc">humorix_misc</a><br />
<a href="http://iheartquotes.com/fortune/rand/humorix_stories">humorix_stories</a><br />
<a href="http://iheartquotes.com/fortune/rand/joel_on_software">joel_on_software</a><br />
<a href="http://iheartquotes.com/fortune/rand/macintosh">macintosh</a><br />
<a href="http://iheartquotes.com/fortune/rand/math">math</a><br />
<a href="http://iheartquotes.com/fortune/rand/mav_flame">mav_flame</a><br />
<a href="http://iheartquotes.com/fortune/rand/osp_rules">osp_rules</a><br />
<a href="http://iheartquotes.com/fortune/rand/paul_graham">paul_graham</a><br />
<a href="http://iheartquotes.com/fortune/rand/subversion">prog_style</a><br />
<a href="http://iheartquotes.com/fortune/rand/subversion">subversion</a></p>
<p>From general:</p>
<p><a href="http://iheartquotes.com/fortune/rand/codehappy">codehappy</a><br />
<a href="http://iheartquotes.com/fortune/rand/fortune">fortune</a><br />
<a href="http://iheartquotes.com/fortune/rand/liberty">liberty</a><br />
<a href="http://iheartquotes.com/fortune/rand/literature">literature</a><br />
<a href="http://iheartquotes.com/fortune/rand/misc">misc</a><br />
<a href="http://iheartquotes.com/fortune/rand/murphy">murphy</a><br />
<a href="http://iheartquotes.com/fortune/rand/oneliners">oneliners</a><br />
<a href="http://iheartquotes.com/fortune/rand/riddles">riddles</a><br />
<a href="http://iheartquotes.com/fortune/rand/rkba">rkba</a><br />
<a href="http://iheartquotes.com/fortune/rand/shlomif">shlomif</a><br />
<a href="http://iheartquotes.com/fortune/rand/shlomif_fav">shlomif_fav</a><br />
<a href="http://iheartquotes.com/fortune/rand/stephen_wright">stephen_wright</a></p>
<p>From pop:</p>
<p><a href="http://iheartquotes.com/fortune/rand/calvin">calvin</a><br />
<a href="http://iheartquotes.com/fortune/rand/forrestgump">forrestgump</a><br />
<a href="http://iheartquotes.com/fortune/rand/friends">friends</a><br />
<a href="http://iheartquotes.com/fortune/rand/futurama">futurama</a><br />
<a href="http://iheartquotes.com/fortune/rand/holygrail">holygrail</a><br />
<a href="http://iheartquotes.com/fortune/rand/powerpuff">powerpuff</a><br />
<a href="http://iheartquotes.com/fortune/rand/simon_garfunkel">simon_garfunkel</a><br />
<a href="http://iheartquotes.com/fortune/rand/simpsons_cbg">simpsons_cbg</a><br />
<a href="http://iheartquotes.com/fortune/rand/simpsons_chalkboard">simpsons_chalkboard</a><br />
<a href="http://iheartquotes.com/fortune/rand/simpsons_homer">simpsons_homer</a><br />
<a href="http://iheartquotes.com/fortune/rand/simpsons_ralph">simpsons_ralph</a><br />
<a href="http://iheartquotes.com/fortune/rand/south_park">south_park</a><br />
<a href="http://iheartquotes.com/fortune/rand/starwars">starwars</a><br />
<a href="http://iheartquotes.com/fortune/rand/xfiles">xfiles</a></p>
<p>From religious:</p>
<p><a href="http://iheartquotes.com/fortune/rand/bible">bible</a><br />
<a href="http://iheartquotes.com/fortune/rand/contentions">contentions</a><br />
<a href="http://iheartquotes.com/fortune/rand/osho">osho</a></p>
<p>From scifi:</p>
<p><a href="http://iheartquotes.com/fortune/rand/cryptonomicon">cryptonomicon</a><br />
<a href="http://iheartquotes.com/fortune/rand/discworld">discworld</a><br />
<a href="http://iheartquotes.com/fortune/rand/dune">dune</a><br />
<a href="http://iheartquotes.com/fortune/rand/hitchhiker">hitchhiker</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stubbleblog.com/index.php/2006/09/tribute-to-the/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
