arturoqu / python-twitter

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

enable since_id in timeline functions #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The since_id field is a much handier way of retrieving new updates than the 
since field, since it 
doesnt require fiddling around with randomly formatted date fields quite as 
much.  This patch 
enables them in Api.GetFriendsTimeline and GetUserTimeline

Original issue reported on code.google.com by amadhava...@googlemail.com on 15 Jul 2008 at 12:07

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the patch.  Agreed, we should definitely add support for 'since_id'. 
However, it seems to break the tests when I applied it.  Can you verify by 
running
twitter_test.py, please?

Original comment by dclinton on 15 Jul 2008 at 6:18

GoogleCodeExporter commented 9 years ago
Nothing new breaks for me... the only tests which dont work are the sample user 
tests, as it appears that the 
information in Twitter has changed.

===================================================================
===
FAIL: Test the twitter.Status AsJsonString method
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./twitter_test.py", line 122, in testAsJsonString
    self._GetSampleStatus().AsJsonString())
AssertionError: '{"created_at": "Fri Jan 26 23:17:14 +0000 2007", "id": 
4391023, "text": "A 
l\\u00e9gp\\u00e1rn\\u00e1s haj\\u00f3m tele van angoln\\u00e1kkal.", "user": 
{"description": "Canvas. JC 
Penny. Three ninety-eight.", "id": 718443, "location": "Okinawa, Japan", 
"name": "Kesuke Miyagi", 
"profile_image_url": 
"http:\\/\\/twitter.com\\/system\\/user\\/profile_image\\/718443\\/normal\\/kesu
ke.png", 
"screen_name": "kesuke", "url": "http:\\/\\/twitter.com\\/kesuke"}}' != 
'{"created_at": "Fri Jan 26 23:17:14 
+0000 2007", "id": 4391023, "text": "A l\\u00e9gp\\u00e1rn\\u00e1s haj\\u00f3m 
tele van 
angoln\\u00e1kkal.", "user": {"description": "Canvas. JC Penny. Three 
ninety-eight.", "id": 718443, "location": 
"Okinawa, Japan", "name": "Kesuke Miyagi", "profile_image_url": 
"http://twitter.com/system/user/profile_image/718443/normal/kesuke.png", 
"screen_name": "kesuke", "url": 
"http://twitter.com/kesuke"}}'

===================================================================
===
FAIL: Test the twitter.User AsJsonString method
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./twitter_test.py", line 225, in testAsJsonString
    self._GetSampleUser().AsJsonString())
AssertionError: '{"description": "Indeterminate things", "id": 673483, 
"location": "San Francisco, CA", "name": 
"DeWitt", "profile_image_url": 
"http:\\/\\/twitter.com\\/system\\/user\\/profile_image\\/673483\\/normal\\/me.j
pg", "screen_name": 
"dewitt", "status": {"created_at": "Fri Jan 26 17:28:19 +0000 2007", "id": 
4212713, "text": "\\"Select all\\" and 
archive your Gmail inbox.  The page loads so much faster!"}, "url": 
"http:\\/\\/unto.net\\/"}' != '{"description": 
"Indeterminate things", "id": 673483, "location": "San Francisco, CA", "name": 
"DeWitt", "profile_image_url": 
"http://twitter.com/system/user/profile_image/673483/normal/me.jpg", 
"screen_name": "dewitt", "status": 
{"created_at": "Fri Jan 26 17:28:19 +0000 2007", "id": 4212713, "text": 
"\\"Select all\\" and archive your Gmail 
inbox.  The page loads so much faster!"}, "url": "http://unto.net/"}'

Original comment by amadhava...@googlemail.com on 19 Jul 2008 at 2:20

GoogleCodeExporter commented 9 years ago
I have applied the patch and the api is working fine.  All tests also pass for 
me,
with the exception of the two above.

Original comment by sam%odio...@gtempaccount.com on 27 Sep 2008 at 6:49

GoogleCodeExporter commented 9 years ago
Fixed in trunk at r130 
(http://code.google.com/p/python-twitter/source/detail?r=130).
Please verify.

Original comment by dclinton on 21 Feb 2009 at 5:15