Mercurial > hg > bitsytweet
annotate bitsytweet/__init__.py @ 0:56a9fb9ad9b4
initial commit of bitsytweet (not yet functional)
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Wed, 07 Jul 2010 13:31:37 -0700 |
parents | |
children | b003ae6978fe |
rev | line source |
---|---|
0
56a9fb9ad9b4
initial commit of bitsytweet (not yet functional)
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
1 """ |
56a9fb9ad9b4
initial commit of bitsytweet (not yet functional)
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
2 BitsyTweet |
56a9fb9ad9b4
initial commit of bitsytweet (not yet functional)
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
3 """ |
56a9fb9ad9b4
initial commit of bitsytweet (not yet functional)
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
4 |
56a9fb9ad9b4
initial commit of bitsytweet (not yet functional)
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
5 import twitter |
56a9fb9ad9b4
initial commit of bitsytweet (not yet functional)
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
6 |
56a9fb9ad9b4
initial commit of bitsytweet (not yet functional)
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
7 class BitsyTweet(object): |
56a9fb9ad9b4
initial commit of bitsytweet (not yet functional)
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
8 |
56a9fb9ad9b4
initial commit of bitsytweet (not yet functional)
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
9 def __init__(self, username, password): |
56a9fb9ad9b4
initial commit of bitsytweet (not yet functional)
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
10 self.username = username |
56a9fb9ad9b4
initial commit of bitsytweet (not yet functional)
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
11 self.password = password |
56a9fb9ad9b4
initial commit of bitsytweet (not yet functional)
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
12 self.api = twitter.Api(username=self.username, password=self.password) |
56a9fb9ad9b4
initial commit of bitsytweet (not yet functional)
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
13 |
56a9fb9ad9b4
initial commit of bitsytweet (not yet functional)
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
14 def __call__(self, post): |
56a9fb9ad9b4
initial commit of bitsytweet (not yet functional)
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
15 self.api.PostUpdate(self.username, self.password, '') |