view bitsytweet/__init__.py @ 1:b003ae6978fe

make api look like it should
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 07 Jul 2010 13:57:47 -0700
parents 56a9fb9ad9b4
children f0ee545bba37
line wrap: on
line source

"""
BitsyTweet
"""

import twitter

class BitsyTweet(object):

  def __init__(self, username, password):
    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, '')