danielpronych / python-twitter

Automatically exported from code.google.com/p/python-twitter
Apache License 2.0
0 stars 0 forks source link

Add support for GET trends/:woeid [patch] #217

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
As described at https://dev.twitter.com/docs/api/1/get/trends, GET trends 
(corresponding to Api.GetTrendsCurrent) is now deprecated in favor of GET 
trends/:woeid. GET trends also now requires authentication, while trends/:woeid 
doesn't.

Attached is a patch against trunk that adds support for this request, as 
GetTrendsWoeid. Here is a sample usage, for the Boston Yahoo! Where on Earth ID 
(WOEID) of 2367105:

>>> from twitter import Api
>>> api = Api()
>>> for trend in api.GetTrendsWoeid(2367105):
...     print trend.name
... 
#AnnoyingThings
#DontYouHateItWhen
#ThingsThatUse2BeCool
Forrest Gump
Christmas
You Got Served
Xmas
Knicks
Ohio State
How High

Original issue reported on code.google.com by jessica....@gmail.com on 27 Nov 2011 at 1:14

Attachments:

GoogleCodeExporter commented 8 years ago
committed changeset 237:0dd0556b9365

thanks for the patch!

Original comment by bear42 on 3 Dec 2011 at 9:58