File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1+ 2015-10-05
2+ Added who to api.GetSearch
3+
142014-12-29
25 removed reference to simplejson
36
Original file line number Diff line number Diff line change @@ -265,6 +265,7 @@ def ClearCredentials(self):
265265
266266 def GetSearch (self ,
267267 term = None ,
268+ who = None ,
268269 geocode = None ,
269270 since_id = None ,
270271 max_id = None ,
@@ -280,6 +281,8 @@ def GetSearch(self,
280281 Args:
281282 term:
282283 Term to search by. Optional if you include geocode.
284+ who:
285+ Handle of user's tweets you want. Optional.
283286 since_id:
284287 Returns results with an ID greater than (that is, more recent
285288 than) the specified ID. There are limits to the number of
@@ -348,12 +351,15 @@ def GetSearch(self,
348351 if locale :
349352 parameters ['locale' ] = locale
350353
351- if term is None and geocode is None :
354+ if term is None and geocode is None and who is None :
352355 return []
353356
354357 if term is not None :
355358 parameters ['q' ] = term
356359
360+ if who is not None :
361+ parameters ['q' ] = "from:%s" % (who )
362+
357363 if geocode is not None :
358364 parameters ['geocode' ] = ',' .join (map (str , geocode ))
359365
You can’t perform that action at this time.
0 commit comments