Posted By

felipec on 05/02/07


Tagged

web20 twitter


Versions (?)

Who likes this?

10 people have marked this snippet as a favorite

jarjar2k7
gedittest
fukami
lukaszkorecki
jasonseney
taboularasa
pipitu
relima
alifaziz
ringo380


Python Twitter


 / Published in: Python
 

  1. import rest
  2.  
  3. class Connection:
  4. url = "https://twitter.com"
  5.  
  6. def __init__(self, username, password):
  7. self.conn = rest.Connection(self.url, username, password)
  8. self.status = Status(self.conn)
  9.  
  10. class Status:
  11. def __init__(self, conn):
  12. self.conn = conn
  13.  
  14. def update(self, message):
  15. res = self.conn.request_post("statuses/update.xml", {"status": message})

Report this snippet  

You need to login to post a comment.