]> jfr.im git - z_archive/twitter.git/blame_incremental - twitter/__init__.py
Add oauth_callback=oob to force PIN to appear
[z_archive/twitter.git] / twitter / __init__.py
... / ...
CommitLineData
1"""
2The minimalist yet fully featured Twitter API and Python toolset.
3
4The Twitter and TwitterStream classes are the key to building your own
5Twitter-enabled applications.
6
7"""
8
9from textwrap import dedent
10
11from .api import Twitter, TwitterError, TwitterHTTPError, TwitterResponse
12from .auth import NoAuth, UserPassAuth
13from .oauth import (
14 OAuth, read_token_file, write_token_file,
15 __doc__ as oauth_doc)
16from .oauth2 import (
17 OAuth2, read_bearer_token_file, write_bearer_token_file,
18 __doc__ as oauth2_doc)
19from .stream import TwitterStream
20from .oauth_dance import oauth_dance, oauth2_dance
21
22__doc__ = __doc__ or ""
23
24__doc__ += """
25The Twitter class
26-----------------
27"""
28__doc__ += dedent(Twitter.__doc__ or "")
29
30__doc__ += """
31The TwitterStream class
32-----------------------
33"""
34__doc__ += dedent(TwitterStream.__doc__ or "")
35
36
37__doc__ += """
38Twitter Response Objects
39------------------------
40"""
41__doc__ += dedent(TwitterResponse.__doc__ or "")
42
43
44__doc__ += """
45Authentication
46--------------
47
48You can authenticate with Twitter in three ways: NoAuth, OAuth, or
49OAuth2 (app-only). Get help() on these classes to learn how to use them.
50
51OAuth and OAuth2 are probably the most useful.
52
53
54Working with OAuth
55------------------
56"""
57
58__doc__ += dedent(oauth_doc or "")
59
60__doc__ += """
61Working with OAuth2
62-------------------
63"""
64
65__doc__ += dedent(oauth2_doc or "")
66
67__all__ = [
68 "NoAuth",
69 "OAuth",
70 "OAuth2",
71 "oauth2_dance",
72 "oauth_dance",
73 "read_bearer_token_file",
74 "read_token_file",
75 "Twitter",
76 "TwitterError",
77 "TwitterHTTPError",
78 "TwitterResponse",
79 "TwitterStream",
80 "UserPassAuth",
81 "write_bearer_token_file",
82 "write_token_file",
83 ]