]> jfr.im git - z_archive/twitter.git/blobdiff - twitter/__init__.py
Improve documentation.
[z_archive/twitter.git] / twitter / __init__.py
index 5ceb15257adc610089b73287e0a7f5d61d21247f..d48fd9bfc394c1c71da03d7d592153217144a5a3 100644 (file)
@@ -1,9 +1,55 @@
 """
 The minimalist yet fully featured Twitter API and Python toolset.
 
-For building your own applications, look at the `Twitter` class.
+The Twitter and TwitterStream classes are the key to building your own
+Twitter-enabled applications.
+
+"""
+
+from .api import Twitter, TwitterError, TwitterHTTPError, TwitterResponse
+from .auth import NoAuth, UserPassAuth
+from .oauth import OAuth, read_token_file, write_token_file
+from .stream import TwitterStream
+
+
+# Who needs Sphinx? Not me!
+
+__doc__ += """
+The Twitter class
+=================
+"""
+__doc__ += Twitter.__doc__
+
+__doc__ += """
+The TwitterStream class
+=======================
+"""
+__doc__ += TwitterStream.__doc__
+
+
+__doc__ += """
+Twitter Response Objects
+========================
+"""
+__doc__ += TwitterResponse.__doc__
+
+
+__doc__ += """
+Authentication Objects
+======================
+
+You can authenticate with Twitter in three ways: NoAuth, OAuth, or
+UserPassAuth. Get help() on these classes to learn how to use them.
+
+
+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.
 """
 
-from api import *
-from auth import NoAuth, UserPassAuth
-from oauth import OAuth
+__all__ = ["Twitter", "TwitterStream", "TwitterResponse", "TwitterError",
+           "TwitterHTTPError", "NoAuth", "OAuth", "UserPassAuth",
+           "read_token_file", "write_token_file"]