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
+++ b/bitsytweet/__init__.py
@@ -1,16 +1,18 @@
 """
 BitsyTweet
 """
 
 import twitter
 
 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, )