Post
index
tweetworks/Post.py

Read Tweetworks API posts from XML responses.
 
Nicolas Ward
@ultranurd
ultranurd@yahoo.com
http://www.ultranurd.net/code/tweetworks/
2009.06.19

 
Modules
       
iso8601
lxml
tweetworks

 
Classes
       
Post

 
class Post
    Represents the data fields of a single Tweetworks post.
 
  Methods defined here:
__init__(self, xml=None)
Reads post fields from the XML, or create an empty post.
 
id - int - Tweetworks numeric post ID
user_id - int - Tweetworks numeric user ID of poster
group_id - int - Tweetworks numeric ID of containing group, if any
parent_id - int - Tweetworks numeric ID of parent post, if any
twitter_id - int - Twitter numeric ID of post, if cross-posted
bingo - boolean - Whether this post has been marked as a bingo
body - string - The contents of this post
created - datetime - When this post was created on Tweetworks
group - tweetworks.Group - Object representing containing group, if any
user - tweetworks.User - Object representing poster
replies - int - The number of replies to this post, if any
posts - tweetworks.Post[] - The Post object replies to this post, if any
__repr__(self)
Returns an eval-ready string for this Post's constructor.
__str__(self)
Returns this Post as an XML string.
xml(self)
Generates an XML element tree for this Post.