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

def blogger::newPost (   blogID,
  username,
  password,
  text,
  publish = 0,
  serverURL = None 
)

Post a new message to your blog

Returns: string
    post ID: append this to your base blog URL to link to your new post

Arguments:
- blogID: your blog's ID number (see module docs for details)
- 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)
>>> print postID

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.

Definition at line 200 of file blogger.py.

00200                                                                         :
    """Post a new message to your blog
    
    Returns: string
        post ID: append this to your base blog URL to link to your new post
    
    Arguments:
    - blogID: your blog's ID number (see module docs for details)
    - 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)
    >>> print postID
    
    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.
    """
    server = xmlrpclib.Server(serverURL or constants.xmlrpcServer, constants.transport)
    postID = server.blogger.newPost(constants.applicationKey,
        str(blogID),
        str(username),
        str(password),
        str(text),
        publish and xmlrpclib.True or xmlrpclib.False)
    return postID

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


Generated by  Doxygen 1.6.0   Back to index