]> jfr.im git - z_archive/twitter.git/blobdiff - twitter/__init__.py
Update twitter/twitter_globals.py
[z_archive/twitter.git] / twitter / __init__.py
index fdc8e3ab148bf1364adadbf013020d800b1197a2..151f34666b3b43b0b20ccf80e606d2378f60d3a6 100644 (file)
@@ -1,14 +1,58 @@
 """
 The minimalist yet fully featured Twitter API and Python toolset.
 
-The Twitter class is the key to building your own Twitter-enabled
-applications. Get help on it like this::
+The Twitter and TwitterStream classes are the key to building your own
+Twitter-enabled applications.
 
-    help(twitter.Twitter)
+"""
+
+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,
+                    __doc__ as oauth_doc)
+from .stream import TwitterStream
+from .oauth_dance import oauth_dance
 
+# Who needs Sphinx? Not me!
+
+__doc__ += """
+The Twitter class
+-----------------
 """
+__doc__ += dedent(Twitter.__doc__)
 
-from .api import Twitter, TwitterError, TwitterHTTPError, TwitterResponse
-from .auth import NoAuth
-from .oauth import OAuth, read_token_file, write_token_file
+__doc__ += """
+The TwitterStream class
+-----------------------
+"""
+__doc__ += dedent(TwitterStream.__doc__)
+
+
+__doc__ += """
+Twitter Response Objects
+------------------------
+"""
+__doc__ += dedent(TwitterResponse.__doc__)
+
+
+__doc__ += """
+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.
+
+
+Working with OAuth
+------------------
+"""
+
+__doc__ += dedent(oauth_doc)
+
+__all__ = ["Twitter", "TwitterStream", "TwitterResponse", "TwitterError",
+           "TwitterHTTPError", "NoAuth", "OAuth", "UserPassAuth",
+           "read_token_file", "write_token_file", "oauth_dance"]