Logo Search packages:      
Sourcecode: pythoncard version File versions  Download package

def blogger::editPost (   postID,
  username,
  password,
  text,
  publish = 0,
  serverURL = None 
)

Edit an existing message in your blog

Returns: 1

Arguments:
- postID: ID of post to edit
- username: your weblog username
- password: your weblog password
- text: the actual text you'd like to post
- publish (optional): 0 = post but do not publish (default)
                      1 = post and publish
- serverURL: URL of remote server (optional, defaults to constants.xmlrpcServer)

Example:
>>> postID = blogger.newPost(my_blog_ID, "my_blogger_username", "my_blogger_password, "First post!", 1)
>>> blogger.editPost(postID, "my_blogger_username", "my_blogger_password, "This text overwrites the old text completely.", 1)

Blogger notes:
- Posts are limited to 65536 characters by the Blogger server.
- If you want to publish, you must set up your blog to remember your
  FTP username and password.  You must do this through the web interface
  at blogger.com; there is currently no way to do it through this API.

Manila notes:
- Manila does not have the concept of "post but don't publish"; all
  posts are published immediately.  So the "publish" flag is used as
  an approval flag for multi-member weblogs.  See
  http://frontier.userland.com/emulatingBloggerInManila
  for details.

LiveJournal notes:
- Post IDs (item IDs) are not guaranteed to be unique across all of a
  user's journals, so the default journal is always used.  There is
  currently no way of editing entries on a secondary journal.  See
  http://www.tswoam.co.uk/index.php?n_go=14
  for details.

Definition at line 241 of file blogger.py.

00241                                                                          :
    """Edit an existing message in your blog
    
    Returns: 1
    
    Arguments:
    - postID: ID of post to edit
    - username: your weblog username
    - password: your weblog password
    - text: the actual text you'd like to post
    - publish (optional): 0 = post but do not publish (default)
                          1 = post and publish
    - serverURL: URL of remote server (optional, defaults to constants.xmlrpcServer)
    
    Example:
    >>> postID = blogger.newPost(my_blog_ID, "my_blogger_username", "my_blogger_password, "First post!", 1)
    >>> blogger.editPost(postID, "my_blogger_username", "my_blogger_password, "This text overwrites the old text completely.", 1)
    
    Blogger notes:
    - Posts are limited to 65536 characters by the Blogger server.
    - If you want to publish, you must set up your blog to remember your
      FTP username and password.  You must do this through the web interface
      at blogger.com; there is currently no way to do it through this API.
    
    Manila notes:
    - Manila does not have the concept of "post but don't publish"; all
      posts are published immediately.  So the "publish" flag is used as
      an approval flag for multi-member weblogs.  See
      http://frontier.userland.com/emulatingBloggerInManila
      for details.
    
    LiveJournal notes:
    - Post IDs (item IDs) are not guaranteed to be unique across all of a
      user's journals, so the default journal is always used.  There is
      currently no way of editing entries on a secondary journal.  See
      http://www.tswoam.co.uk/index.php?n_go=14
      for details.
    """
    server = xmlrpclib.Server(serverURL or constants.xmlrpcServer, constants.transport)
    response = server.blogger.editPost(constants.applicationKey,
        str(postID),
        str(username),
        str(password),
        str(text),
        publish and xmlrpclib.True or xmlrpclib.False)
    return response == xmlrpclib.True

def deletePost(postID, username, password, publish=0, serverURL=None):


Generated by  Doxygen 1.6.0   Back to index