Fix a bug with setting max_id / since_id on a ResultSet.
authorJoshua Roesslein <jroesslein@gmail.com>
Tue, 11 Jun 2013 03:33:31 +0000 (20:33 -0700)
committerJoshua Roesslein <jroesslein@gmail.com>
Tue, 11 Jun 2013 03:33:31 +0000 (20:33 -0700)
tweepy/models.py

index d536f1b9951903819147fd75dc1ce3ba499989c7..34427900ee3667fb55f1af24183aa774af80e689 100644 (file)
@@ -233,10 +233,8 @@ class SearchResults(ResultSet):
 
     @classmethod
     def parse(cls, api, json):
-        results = SearchResults()
         metadata = json['search_metadata']
-        results.max_id = metadata.get('max_id')
-        results.since_id = metadata.get('since_id')
+        results = SearchResults(metadata.get('max_id'), metadata.get('since_id'))
         results.refresh_url = metadata.get('refresh_url')
         results.completed_in = metadata.get('completed_in')
         results.query = metadata.get('query')