Mercurial > hg > bitsytweet
changeset 2:f0ee545bba37
more stubbing of API
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Wed, 07 Jul 2010 16:11:34 -0700 |
parents | b003ae6978fe |
children | 50f77774a20a |
files | bitsytweet/__init__.py |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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, )