# HG changeset patch # User Jeff Hammel # Date 1278544294 25200 # Node ID f0ee545bba37fcb34cf36e13c370e4f93ce35040 # Parent b003ae6978fe29365d89cb7fc7aa43af92a9c4b2 more stubbing of API diff -r b003ae6978fe -r f0ee545bba37 bitsytweet/__init__.py --- a/bitsytweet/__init__.py Wed Jul 07 13:57:47 2010 -0700 +++ b/bitsytweet/__init__.py Wed Jul 07 16:11:34 2010 -0700 @@ -6,11 +6,13 @@ class BitsyTweet(object): - def __init__(self, username, password): + def __init__(self, bitysblog, username, password): + self.bitsyblog = bitsyblog self.username = username self.password = password self.api = twitter.Api(username=self.username, password=self.password) - def __call__(self, blog): - if blog.privacy == 'public': # only tweet public blogs - self.api.PostUpdate(self.username, self.password, '') + def __call__(self, blog_entry): + if blog_entry.privacy == 'public': # only tweet public blogs + tweet = '%s : %s' % (blog_entry.snippet(), 'foo') + self.api.PostUpdate(self.username, self.password, )