<?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>Web 2.1 &#187; rest</title>
	<atom:link href="http://web.2point1.com/tag/rest/feed/" rel="self" type="application/rss+xml" />
	<link>http://web.2point1.com</link>
	<description>Tim Whitlock&#039;s home in the Blogohedron</description>
	<lastBuildDate>Thu, 13 May 2010 21:26:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Bit.ly API command line tool</title>
		<link>http://web.2point1.com/2009/06/06/bitly-api-command-line-interface/</link>
		<comments>http://web.2point1.com/2009/06/06/bitly-api-command-line-interface/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 13:54:18 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[bitly]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[url shortnener]]></category>

		<guid isPermaLink="false">http://web.2point1.com/2009/06/06/bitly-api-command-line-interface/</guid>
		<description><![CDATA[I&#8217;ve knocked up a really simple command line tool for interacting with the bit.ly API.
It&#8217;s simple because:

The output is currently pretty raw
The bit.ly API doesn&#8217;t actually do very much

» Download version 0.1.1
Requires PHP &#62;= 5.2.x + json extension
INSTALL
Ensure you have a PHP binary at /usr/bin/php and check the version is suitable
$ which php
/usr/bin/php
$ /usr/bin/php --version
PHP [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve knocked up a really simple command line tool for interacting with the <a href="http://bit.ly">bit.ly</a> API.</p>
<p>It&#8217;s simple because:</p>
<ol>
<li>The output is currently pretty raw</li>
<li>The bit.ly API doesn&#8217;t actually do very much</li>
</ol>
<p><strong>» <a href="http://web.2point1.com/wp-content/uploads/2009/06/bitly-0-1-1.tgz" title="Bitly 0.1.1">Download version 0.1.1</a></strong></p>
<p>Requires PHP &gt;= 5.2.x + json extension</p>
<h3><span id="more-118"></span>INSTALL</h3>
<p>Ensure you have a PHP binary at /usr/bin/php and check the version is suitable</p>
<pre class="code"><strong>$ which php</strong>
<font color="#999999">/usr/bin/php</font>
<strong>$ /usr/bin/php --version</strong>
<font color="#999999">PHP 5.2.x (cli) (built: ..........)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies</font></pre>
<p>Unzip the download, and ensure it&#8217;s executable:</p>
<pre class="code"><strong>$ tar -xvzf bitly-0-1-1.tar.gz</strong><strong>
</strong><font color="#999999">bitly-0-1-1/
bitly-0-1-1/bitly
bitly-0-1-1/README</font>
<strong>$ cd bitly-0-1-1
$ chmod u+x bitly</strong></pre>
<p>Configure it for your bit.ly account, by redefining two constants at the top of the file. They look like this:</p>
<pre class="code">define( 'BITLY_USER', '' );
define( 'BITLY_PASSWORD', '' );</pre>
<p>Optionally move the executable somewhere useful:</p>
<pre class="code"><strong>$ mkdir -p ~/bin
$ mv -v bitly ~/bin</strong>
<font color="#999999">bitly -&gt;/home/xxxx/bin/bitly</font></pre>
<h3>USAGE</h3>
<p>Run the help command to see available commands</p>
<pre class="code"><strong>$ bitly -h</strong></pre>
<p>Example, to shorten a URL:</p>
<pre class="code"><strong>$ bitly shorten http://web.2point1.com</strong></pre>
<h3>CHANGELOG</h3>
<p><strong>Version 0.1</strong><br />
First release</p>
<p><strong>Version 0.1.1</strong><br />
Added &#8211;version switch<br />
Added history=1 into shorten method (ensures it actually goes into your bit.ly history)<br />
Added optional keyword for custom URLs to shorten method</p>
<h3>See also</h3>
<p><a href="http://code.google.com/p/bitly-api/wiki/ApiDocumentation">bit.ly API documentation</a></p>
]]></content:encoded>
			<wfw:commentRss>http://web.2point1.com/2009/06/06/bitly-api-command-line-interface/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
