diff --git a/examples/current_trends.py b/examples/current_trends.py index dd2d50d..6fcfdd7 100644 --- a/examples/current_trends.py +++ b/examples/current_trends.py @@ -1,7 +1,7 @@ -import tango +import twitter -""" Instantiate Tango with no Authentication """ -twitter = tango.setup() +""" Instantiate Twython with no Authentication """ +twitter = twitter.setup() trends = twitter.getCurrentTrends() print trends diff --git a/examples/daily_trends.py b/examples/daily_trends.py index 28bdde1..6e3a539 100644 --- a/examples/daily_trends.py +++ b/examples/daily_trends.py @@ -1,7 +1,7 @@ -import tango +import twitter -""" Instantiate Tango with no Authentication """ -twitter = tango.setup() +""" Instantiate Twython with no Authentication """ +twitter = twitter.setup() trends = twitter.getDailyTrends() print trends diff --git a/examples/get_friends_timeline.py b/examples/get_friends_timeline.py index e3c3ddd..9f3fa06 100644 --- a/examples/get_friends_timeline.py +++ b/examples/get_friends_timeline.py @@ -1,7 +1,7 @@ -import tango, pprint +import twython, pprint # Authenticate using Basic (HTTP) Authentication -twitter = tango.setup(authtype="Basic", username="example", password="example") +twitter = twython.setup(authtype="Basic", username="example", password="example") friends_timeline = twitter.getFriendsTimeline(count="150", page="3") for tweet in friends_timeline: diff --git a/examples/get_user_mention.py b/examples/get_user_mention.py index 6b94371..d150aa1 100644 --- a/examples/get_user_mention.py +++ b/examples/get_user_mention.py @@ -1,6 +1,6 @@ -import tango +import twitter -twitter = tango.setup(authtype="Basic", username="example", password="example") +twitter = twitter.setup(authtype="Basic", username="example", password="example") mentions = twitter.getUserMentions(count="150") print mentions diff --git a/examples/get_user_timeline.py b/examples/get_user_timeline.py index aa7bf97..b4191b0 100644 --- a/examples/get_user_timeline.py +++ b/examples/get_user_timeline.py @@ -1,7 +1,7 @@ -import tango +import twython # We won't authenticate for this, but sometimes it's necessary -twitter = tango.setup() +twitter = twython.setup() user_timeline = twitter.getUserTimeline(screen_name="ryanmcgrath") print user_timeline diff --git a/examples/public_timeline.py b/examples/public_timeline.py index 4a6c161..b6be0f7 100644 --- a/examples/public_timeline.py +++ b/examples/public_timeline.py @@ -1,7 +1,7 @@ -import tango +import twython # Getting the public timeline requires no authentication, huzzah -twitter = tango.setup() +twitter = twython.setup() public_timeline = twitter.getPublicTimeline() for tweet in public_timeline: diff --git a/examples/rate_limit.py b/examples/rate_limit.py index ae85973..aca5095 100644 --- a/examples/rate_limit.py +++ b/examples/rate_limit.py @@ -1,7 +1,7 @@ -import tango +import twython # Instantiate with Basic (HTTP) Authentication -twitter = tango.setup(authtype="Basic", username="example", password="example") +twitter = twython.setup(authtype="Basic", username="example", password="example") # This returns the rate limit for the requesting IP rateLimit = twitter.getRateLimitStatus() diff --git a/examples/search_results.py b/examples/search_results.py index 6cec48f..b046b22 100644 --- a/examples/search_results.py +++ b/examples/search_results.py @@ -1,7 +1,7 @@ -import tango +import twython """ Instantiate Tango with no Authentication """ -twitter = tango.setup() +twitter = twython.setup() search_results = twitter.searchTwitter("WebsDotCom", rpp="50") for tweet in search_results["results"]: diff --git a/examples/twython_setup.py b/examples/twython_setup.py new file mode 100644 index 0000000..362cb43 --- /dev/null +++ b/examples/twython_setup.py @@ -0,0 +1,11 @@ +import twython + +# Using no authentication and specifying Debug +twitter = twython.setup(debug=True) + +# Using Basic Authentication +twitter = twython.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 = twython.setup(username="example", password="example", oauth_keys=auth_keys) diff --git a/examples/update_profile_image.py b/examples/update_profile_image.py index a6f52b2..ad6f9ad 100644 --- a/examples/update_profile_image.py +++ b/examples/update_profile_image.py @@ -1,5 +1,5 @@ -import tango +import twython -# Instantiate Tango with Basic (HTTP) Authentication -twitter = tango.setup(authtype="Basic", username="example", password="example") +# Instantiate Twython with Basic (HTTP) Authentication +twitter = twython.setup(authtype="Basic", username="example", password="example") twitter.updateProfileImage("myImage.png") diff --git a/examples/update_status.py b/examples/update_status.py index 1466752..52d2e87 100644 --- a/examples/update_status.py +++ b/examples/update_status.py @@ -1,5 +1,5 @@ -import tango +import twython -# Create a Tango instance using Basic (HTTP) Authentication and update our Status -twitter = tango.setup(authtype="Basic", username="example", password="example") +# Create a Twython instance using Basic (HTTP) Authentication and update our Status +twitter = twython.setup(authtype="Basic", username="example", password="example") twitter.updateStatus("See how easy this was?") diff --git a/examples/weekly_trends.py b/examples/weekly_trends.py index fd9b564..5871fbd 100644 --- a/examples/weekly_trends.py +++ b/examples/weekly_trends.py @@ -1,7 +1,7 @@ -import tango +import twython -""" Instantiate Tango with no Authentication """ -twitter = tango.setup() +""" Instantiate Twython with no Authentication """ +twitter = twython.setup() trends = twitter.getWeeklyTrends() print trends