ganesansays / python-twitter

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

no "followers_count" when 0 #171

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

created test account, got keys, did this:

>>> api = twitter.Api(consumer_key=t['consumer_key'], 
consumer_secret=t['consumer_secret'],access_token_key=t['access_key'], 
access_token_secret=t['access_secret'] )

>>> print api.VerifyCredentials()

{"followers_count": 1, "id": 203869946, "name": "test", 
"profile_background_color": "C0DEED", "profile_background_tile": false, 
"profile_image_url": 
"http://s.twimg.com/a/1287010001/images/default_profile_0_normal.png", 
"profile_link_color": "0084B4", "profile_sidebar_fill_color": 
"http://s.twimg.com/a/1287010001/images/themes/theme1/bg.png", 
"profile_text_color": "333333", "protected": false, "screen_name": 
"veyepar_test"}

checked the follower, it was spam, reported it, did this again:

>>> print api.VerifyCredentials()
{"id": 203869946, "name": "test", "profile_background_color": "C0DEED", 
"profile_background_tile": false, "profile_image_url": 
"http://s.twimg.com/a/1287010001/images/default_profile_0_normal.png", 
"profile_link_color": "0084B4", "profile_sidebar_fill_color": 
"http://s.twimg.com/a/1287010001/images/themes/theme1/bg.png", 
"profile_text_color": "333333", "protected": false, "screen_name": 
"veyepar_test"}

There is no "followers_count":0

What version of the product are you using? On what operating system?

trunk, linux

Please provide any additional information below.

Original issue reported on code.google.com by cfkars...@gmail.com on 17 Oct 2010 at 11:56

GoogleCodeExporter commented 9 years ago
Not sure what the issue is here for python-twitter library.  Twitter routinely 
removes elements from it's data flow when the value is "none" or zero.

Original comment by bear42 on 17 Oct 2010 at 11:21

GoogleCodeExporter commented 9 years ago
I posted a message to the list asking if anyone would object to me making the 
default value for integers in NewFromJsonDict() to be 0 instead of None

Original comment by bear42 on 16 Apr 2011 at 11:18