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:
parent
25eda807ab
commit
3cef1a463f
22 changed files with 138 additions and 72 deletions
|
|
@ -1,7 +0,0 @@
|
|||
import twython.core as twython
|
||||
|
||||
""" Instantiate Twython with no Authentication """
|
||||
twitter = twython.setup()
|
||||
trends = twitter.getCurrentTrends()
|
||||
|
||||
print trends
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
import twython.core as twython
|
||||
|
||||
""" Instantiate Twython with no Authentication """
|
||||
twitter = twython.setup()
|
||||
trends = twitter.getDailyTrends()
|
||||
|
||||
print trends
|
||||
|
|
@ -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"]
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
import twython.core as twython
|
||||
|
||||
twitter = twython.setup(username="example", password="example")
|
||||
mentions = twitter.getUserMentions(count="150")
|
||||
|
||||
print mentions
|
||||
|
|
@ -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
|
||||
|
|
@ -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"]
|
||||
|
|
@ -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")
|
||||
|
|
@ -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"]
|
||||
|
|
@ -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
|
||||
|
|
@ -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")
|
||||
|
|
@ -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")
|
||||
|
|
@ -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?")
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
import twython.core as twython
|
||||
|
||||
""" Instantiate Twython with no Authentication """
|
||||
twitter = twython.setup()
|
||||
trends = twitter.getWeeklyTrends()
|
||||
|
||||
print trends
|
||||
Loading…
Add table
Add a link
Reference in a new issue