Redid some examples, moved examples to core_examples to differentiate from oauth_django_example, version bump to 1.3.2 to fix distribution errors with Pip/etc (dumb binaries were being created earlier, just throwing out the source now and letting pip handle it)

This commit is contained in:
Ryan McGrath 2010-10-19 16:31:09 -04:00
parent 25eda807ab
commit 3cef1a463f
22 changed files with 138 additions and 72 deletions

View file

@ -1,7 +0,0 @@
import twython.core as twython
""" Instantiate Twython with no Authentication """
twitter = twython.setup()
trends = twitter.getCurrentTrends()
print trends

View file

@ -1,7 +0,0 @@
import twython.core as twython
""" Instantiate Twython with no Authentication """
twitter = twython.setup()
trends = twitter.getDailyTrends()
print trends

View file

@ -1,8 +0,0 @@
import twython.core as twython, pprint
# Authenticate using Basic (HTTP) Authentication
twitter = twython.setup(username="example", password="example")
friends_timeline = twitter.getFriendsTimeline(count="150", page="3")
for tweet in friends_timeline:
print tweet["text"]

View file

@ -1,6 +0,0 @@
import twython.core as twython
twitter = twython.setup(username="example", password="example")
mentions = twitter.getUserMentions(count="150")
print mentions

View file

@ -1,7 +0,0 @@
import twython.core as twython
# We won't authenticate for this, but sometimes it's necessary
twitter = twython.setup()
user_timeline = twitter.getUserTimeline(screen_name="ryanmcgrath")
print user_timeline

View file

@ -1,8 +0,0 @@
import twython.core as twython
# Getting the public timeline requires no authentication, huzzah
twitter = twython.setup()
public_timeline = twitter.getPublicTimeline()
for tweet in public_timeline:
print tweet["text"]

View file

@ -1,10 +0,0 @@
import twython.core as twython
# Instantiate with Basic (HTTP) Authentication
twitter = twython.setup(username="example", password="example")
# This returns the rate limit for the requesting IP
rateLimit = twitter.getRateLimitStatus()
# This returns the rate limit for the requesting authenticated user
rateLimit = twitter.getRateLimitStatus(rate_for="user")

View file

@ -1,8 +0,0 @@
import twython.core as twython
""" Instantiate Tango with no Authentication """
twitter = twython.setup()
search_results = twitter.searchTwitter("WebsDotCom", rpp="50")
for tweet in search_results["results"]:
print tweet["text"]

View file

@ -1,7 +0,0 @@
import twython as twython
# Shortening URLs requires no authentication, huzzah
twitter = twython.setup()
shortURL = twitter.shortenURL("http://www.webs.com/")
print shortURL

View file

@ -1,7 +0,0 @@
import twython.core as twython
# Using no authentication
twitter = twython.setup()
# Using Basic Authentication (core is all about basic auth, look to twython.oauth in the future for oauth)
twitter = twython.setup(username="example", password="example")

View file

@ -1,5 +0,0 @@
import twython.core as twython
# Instantiate Twython with Basic (HTTP) Authentication
twitter = twython.setup(username="example", password="example")
twitter.updateProfileImage("myImage.png")

View file

@ -1,5 +0,0 @@
import twython.core as twython
# Create a Twython instance using Basic (HTTP) Authentication and update our Status
twitter = twython.setup(username="example", password="example")
twitter.updateStatus("See how easy this was?")

View file

@ -1,7 +0,0 @@
import twython.core as twython
""" Instantiate Twython with no Authentication """
twitter = twython.setup()
trends = twitter.getWeeklyTrends()
print trends