Skip to content

Commit

Permalink
Updating broken recipe due to Twitter API change earlier this year. S…
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew A. Russell committed Jan 11, 2012
1 parent 1be3fbb commit e2baf86
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion recipe__get_trending_topics.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@

t = twitter.Twitter(domain='api.twitter.com', api_version='1')

print json.dumps(t.trends(), indent=1)
WORLD_WOE_ID = 1 # The Yahoo! Where On Earth ID for the entire world

world_trends = t.trends._(WORLD_WOE_ID) # get back a callable

# call the callable and iterate through the trends returned
print json.dumps([ trend for trend in world_trends()[0]['trends'] ], indent=1)

0 comments on commit e2baf86

Please sign in to comment.