I'm shocked by the fall out today in the twitterverse about Loic now
only following 22 people right now. The @loic traffic is amazing.
Scoble is battling with him. Pretty interesting.

My patch stinks :-) don't have gnu diff around to give you a proper patch.

I just added these two functions to twyt\twitter.py's Twitter class:

        def user_friends_graph(self, id=None):
                """
                Returns social graph of friends as json array
                """
                if id is not None and id < 0:
                        raise TwitterException("User ID out of range")

                handler = u'friends/ids.json'
                
                data = []
                if id:
                        data.append(("id", id))
                        
                return self.get(data, handler, doauth=True)


        def user_followers_graph(self, id=None):
                """
                Returns social graph of followers as json array
                """
                if id is not None and id < 0:
                        raise TwitterException("User ID out of range")

                handler = u'followers/ids.json'
                
                data = []
                if id:
                        data.append(("id", id))
                        
                return self.get(data, handler, doauth=True)



Zac Bowling
http://twitter.com/zbowling
http://zbowling.com/



On Mon, Feb 23, 2009 at 10:44 PM, Andrew Price <[email protected]> wrote:
>
> On Feb 23, 11:07 pm, Zac Bowling <[email protected]> wrote:
>> That's all. Was hoping the new one had the social graph api but it
>> didn't but it was easy enough to add it.
>
> I'll add this to twyt tomorrow. Or even sooner if you send me your
> patch :-)
>
> Cheers,
>
> --
> Andy Price

Reply via email to