dikoufu / python-twitter

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

More refactoring, add "social graph" methods and "GetMentions" #63

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Attached is a patch against SVN HEAD (r141).  It continues some of the 
refactoring I did in the 
patch for issue #60 to reduce completely repeated code, by encapsulating the 
process of 
fetching from a URL, decoding the JSON, and checking for errors into a single 
method call 
instead of three lines repeated over and over again.  Hopefully this will 
improve code clarity and 
make it easier to support new  methods as Twitter extends the API.

I also added the two "social graph" API methods listed at 
http://apiwiki.twitter.com/REST-API-
Documentation#SocialGraphMethods

Finally, I began reorganizing the Api class so that the methods were defined in 
the order that 
they are documented at the above URL, so that it would be easier to see which 
calls were 
implemented and which were not. (It was already mostly that way.)  I got bored 
after doing the 
first section, but may come back and do some more at another time.

This patch supercedes the patch attached to #60, since HEAD is still r141.

Original issue reported on code.google.com by joegermu...@gmail.com on 11 Apr 2009 at 4:43

GoogleCodeExporter commented 8 years ago
My bad. The previous patch had a bug for handling API requests that require 
POST.  The attached fixes that by 
ensuring that _jsonFromUrl passes post_data sent as a kwarg to the _FetchUrl 
method.  I'm deleting the previous 
patch.

Original comment by joegermu...@gmail.com on 13 Apr 2009 at 5:05

GoogleCodeExporter commented 8 years ago
sigh. Realized I had a bad URL in GetMentions. the attached URL supercedes the 
others.

Original comment by joegermu...@gmail.com on 20 Apr 2009 at 2:16

GoogleCodeExporter commented 8 years ago
ay ay ay. Found some more things.  Does anyone have a suggestion for a good way 
to do unit testing for this? 
Seems like you'd get throttled if you really tested against the API, not to 
mention the likelihood of data changing 
out from under the tests.

Original comment by joegermu...@gmail.com on 21 Apr 2009 at 4:08

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by dclinton on 26 Apr 2009 at 5:55

GoogleCodeExporter commented 8 years ago
This bug is kind of obsolete.  The changes are partially accounted for in a new 
patch
for #60 but to be honest, I haven't tested this round as thoroughly as last 
time I
submitted this patch.  I'm sure this patch was too hard to get applied with as 
much
diffing as it had and its interdependency with changes in #60. I can try to do 
some
more testing if that patch is applied but I don't want to get as far ahead of 
what is
actually getting merged into the code as I did this time.

Original comment by joegermu...@gmail.com on 7 Jul 2009 at 2:12

GoogleCodeExporter commented 8 years ago
Don't mean to waste the great work you've been doing Joe, but I think we should 
flag this Issue as invalid 
because of the bitrot that I've been causing from landing the other patches - 
sorry!

Original comment by bear42 on 17 May 2010 at 5:43

GoogleCodeExporter commented 8 years ago
No worries. A year is too long for a patch to sit and still be useful. 

Original comment by joegermu...@gmail.com on 17 May 2010 at 12:14

GoogleCodeExporter commented 8 years ago
*sigh* 

has it been that long!?! I guess I have picked up the "skill" of not looking at 
last activity dates :(

thanks for your work to help the project

Original comment by bear42 on 17 May 2010 at 3:52