An example showing the various ways to instantiate tango.
This commit is contained in:
parent
b49cc2458d
commit
e697d7206d
1 changed files with 11 additions and 0 deletions
11
tango_examples/tango_setup.py
Normal file
11
tango_examples/tango_setup.py
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
import tango
|
||||||
|
|
||||||
|
# Using no authentication and specifying Debug
|
||||||
|
twitter = tango.setup(debug=True)
|
||||||
|
|
||||||
|
# Using Basic Authentication
|
||||||
|
twitter = tango.setup(authtype="Basic", username="example", password="example")
|
||||||
|
|
||||||
|
# Using OAuth Authentication (Note: OAuth is the default, specify Basic if needed)
|
||||||
|
auth_keys = {"consumer_key": "yourconsumerkey", "consumer_secret": "yourconsumersecret"}
|
||||||
|
twitter = tango.setup(username="example", password="example", oauth_keys=auth_keys)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue