]> jfr.im git - z_archive/twitter.git/blobdiff - twitter/__init__.py
Improve documentation wrt OAuth.
[z_archive/twitter.git] / twitter / __init__.py
index d48fd9bfc394c1c71da03d7d592153217144a5a3..ec19917bd8e2fd754bfa580b5a8d58b3ce5091ce 100644 (file)
@@ -6,11 +6,14 @@ Twitter-enabled applications.
 
 """
 
+from textwrap import dedent
+
 from .api import Twitter, TwitterError, TwitterHTTPError, TwitterResponse
 from .auth import NoAuth, UserPassAuth
-from .oauth import OAuth, read_token_file, write_token_file
+from .oauth import (OAuth, read_token_file, write_token_file,
+                    __doc__ as oauth_doc)
 from .stream import TwitterStream
-
+from .oauth_dance import oauth_dance
 
 # Who needs Sphinx? Not me!
 
@@ -18,38 +21,38 @@ __doc__ += """
 The Twitter class
 =================
 """
-__doc__ += Twitter.__doc__
+__doc__ += dedent(Twitter.__doc__)
 
 __doc__ += """
 The TwitterStream class
 =======================
 """
-__doc__ += TwitterStream.__doc__
+__doc__ += dedent(TwitterStream.__doc__)
 
 
 __doc__ += """
 Twitter Response Objects
 ========================
 """
-__doc__ += TwitterResponse.__doc__
+__doc__ += dedent(TwitterResponse.__doc__)
 
 
 __doc__ += """
-Authentication Objects
-======================
+Authentication
+==============
 
 You can authenticate with Twitter in three ways: NoAuth, OAuth, or
 UserPassAuth. Get help() on these classes to learn how to use them.
 
+OAuth is probably the most useful.
 
-Other things
-============
 
-read_token_file and write_token_file are utility methods to read and
-write OAuth token and secret key values. The values are stored as
-strings in the file. Not terribly exciting.
+Working with OAuth
+==================
 """
 
+__doc__ += dedent(oauth_doc)
+
 __all__ = ["Twitter", "TwitterStream", "TwitterResponse", "TwitterError",
            "TwitterHTTPError", "NoAuth", "OAuth", "UserPassAuth",
-           "read_token_file", "write_token_file"]
+           "read_token_file", "write_token_file", "oauth_dance"]