Finish adding Storage to the OAuth 1.0 client and updated all examples to use file.Storage. No more three_legged_dance.py files anywhere.
diff --git a/docs/apiclient.oauth.html b/docs/apiclient.oauth.html
index c99f722..90be756 100644
--- a/docs/apiclient.oauth.html
+++ b/docs/apiclient.oauth.html
@@ -8,7 +8,7 @@
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="apiclient.html"><font color="#ffffff">apiclient</font></a>.oauth</strong></big></big></font></td
><td align=right valign=bottom
-><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/google/home/jcgregorio/projects/apiclient/apiclient/oauth.py">/usr/local/google/home/jcgregorio/projects/apiclient/apiclient/oauth.py</a></font></td></tr></table>
+><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/jcgregorio/projects/apiary/apiclient/oauth.py">/home/jcgregorio/projects/apiary/apiclient/oauth.py</a></font></td></tr></table>
<p><tt>Utilities for OAuth.<br>
<br>
Utilities for making it easier to work with OAuth.</tt></p>
@@ -49,7 +49,8 @@
<dt><font face="helvetica, arial"><a href="apiclient.oauth.html#FlowThreeLegged">FlowThreeLegged</a>
</font></dt></dl>
</dd>
-</dl>
+<dt><font face="helvetica, arial"><a href="apiclient.oauth.html#Storage">Storage</a>
+</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException</a>)
</font></dt><dd>
@@ -57,7 +58,8 @@
<dt><font face="helvetica, arial"><a href="apiclient.oauth.html#Error">Error</a>
</font></dt><dd>
<dl>
-<dt><font face="helvetica, arial"><a href="apiclient.oauth.html#MissingParameter">MissingParameter</a>
+<dt><font face="helvetica, arial"><a href="apiclient.oauth.html#CredentialsInvalidError">CredentialsInvalidError</a>
+</font></dt><dt><font face="helvetica, arial"><a href="apiclient.oauth.html#MissingParameter">MissingParameter</a>
</font></dt><dt><font face="helvetica, arial"><a href="apiclient.oauth.html#RequestError">RequestError</a>
</font></dt></dl>
</dd>
@@ -95,6 +97,65 @@
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
+<font color="#000000" face="helvetica, arial"><a name="CredentialsInvalidError">class <strong>CredentialsInvalidError</strong></a>(<a href="apiclient.oauth.html#Error">Error</a>)</font></td></tr>
+
+<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
+<td width="100%"><dl><dt>Method resolution order:</dt>
+<dd><a href="apiclient.oauth.html#CredentialsInvalidError">CredentialsInvalidError</a></dd>
+<dd><a href="apiclient.oauth.html#Error">Error</a></dd>
+<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
+<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
+<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
+</dl>
+<hr>
+Data descriptors inherited from <a href="apiclient.oauth.html#Error">Error</a>:<br>
+<dl><dt><strong>__weakref__</strong></dt>
+<dd><tt>list of weak references to the object (if defined)</tt></dd>
+</dl>
+<hr>
+Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
+<dl><dt><a name="CredentialsInvalidError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</tt></dd></dl>
+
+<hr>
+Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
+<dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#CredentialsInvalidError-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl>
+
+<hr>
+Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
+<dl><dt><a name="CredentialsInvalidError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl>
+
+<dl><dt><a name="CredentialsInvalidError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl>
+
+<dl><dt><a name="CredentialsInvalidError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl>
+
+<dl><dt><a name="CredentialsInvalidError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br>
+ <br>
+Use of negative indices is not supported.</tt></dd></dl>
+
+<dl><dt><a name="CredentialsInvalidError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
+
+<dl><dt><a name="CredentialsInvalidError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl>
+
+<dl><dt><a name="CredentialsInvalidError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl>
+
+<dl><dt><a name="CredentialsInvalidError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
+
+<dl><dt><a name="CredentialsInvalidError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__str__">__str__</a>() <==> str(x)</tt></dd></dl>
+
+<dl><dt><a name="CredentialsInvalidError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
+
+<hr>
+Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
+<dl><dt><strong>__dict__</strong></dt>
+</dl>
+<dl><dt><strong>args</strong></dt>
+</dl>
+<dl><dt><strong>message</strong></dt>
+</dl>
+</td></tr></table> <p>
+<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
+<tr bgcolor="#ffc8d8">
+<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Error">class <strong>Error</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
@@ -292,11 +353,15 @@
</dl>
<hr>
Methods defined here:<br>
+<dl><dt><a name="OAuthCredentials-__getstate__"><strong>__getstate__</strong></a>(self)</dt><dd><tt>Trim the state down to something that can be pickled.</tt></dd></dl>
+
<dl><dt><a name="OAuthCredentials-__init__"><strong>__init__</strong></a>(self, consumer, token, user_agent)</dt><dd><tt>consumer - An instance of oauth.Consumer.<br>
token - An instance of oauth.Token constructed with<br>
the access token and secret.<br>
user_agent - The HTTP User-Agent to provide for this application.</tt></dd></dl>
+<dl><dt><a name="OAuthCredentials-__setstate__"><strong>__setstate__</strong></a>(self, state)</dt><dd><tt>Reconstitute the state of the <a href="__builtin__.html#object">object</a> from being pickled.</tt></dd></dl>
+
<dl><dt><a name="OAuthCredentials-authorize"><strong>authorize</strong></a>(self, http)</dt><dd><tt>Args:<br>
http - An instance of httplib2.Http<br>
or something that acts like it.<br>
@@ -317,6 +382,19 @@
Authorization header and then calls the original version<br>
of 'request()'.</tt></dd></dl>
+<dl><dt><a name="OAuthCredentials-set_store"><strong>set_store</strong></a>(self, store)</dt><dd><tt>Set the storage for the credential.<br>
+ <br>
+Args:<br>
+ store: callable, a callable that when passed a Credential<br>
+ will store the credential back to where it came from.<br>
+ This is needed to store the latest access_token if it<br>
+ has been revoked.</tt></dd></dl>
+
+<hr>
+Data descriptors defined here:<br>
+<dl><dt><strong>invalid</strong></dt>
+<dd><tt>True if the credentials are invalid, such as being revoked.</tt></dd>
+</dl>
<hr>
Data descriptors inherited from <a href="apiclient.oauth.html#Credentials">Credentials</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
@@ -386,6 +464,36 @@
</dl>
<dl><dt><strong>message</strong></dt>
</dl>
+</td></tr></table> <p>
+<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
+<tr bgcolor="#ffc8d8">
+<td colspan=3 valign=bottom> <br>
+<font color="#000000" face="helvetica, arial"><a name="Storage">class <strong>Storage</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
+
+<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
+<td colspan=2><tt>Base class for all <a href="#Storage">Storage</a> objects.<br>
+ <br>
+Store and retrieve a single credential.<br> </tt></td></tr>
+<tr><td> </td>
+<td width="100%">Methods defined here:<br>
+<dl><dt><a name="Storage-get"><strong>get</strong></a>(self)</dt><dd><tt>Retrieve credential.<br>
+ <br>
+Returns:<br>
+ apiclient.oauth.<a href="#Credentials">Credentials</a></tt></dd></dl>
+
+<dl><dt><a name="Storage-put"><strong>put</strong></a>(self, credentials)</dt><dd><tt>Write a credential.<br>
+ <br>
+Args:<br>
+ credentials: <a href="#Credentials">Credentials</a>, the credentials to store.</tt></dd></dl>
+
+<hr>
+Data descriptors defined here:<br>
+<dl><dt><strong>__dict__</strong></dt>
+<dd><tt>dictionary for instance variables (if defined)</tt></dd>
+</dl>
+<dl><dt><strong>__weakref__</strong></dt>
+<dd><tt>list of weak references to the object (if defined)</tt></dd>
+</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">