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

def bloggeraccount::BloggerAccount::bloggerBlogText (   self,
  text 
)

Blogs the text to the chosen blog within the current Blogger account.

Definition at line 91 of file bloggeraccount.py.

00091                                    :
        """Blogs the text to the chosen blog within the current Blogger account."""
        boolTrue = xmlrpclib.Boolean(1)

        if (not self.checkSetupOK()):
            return

        if text == "":
            self.setErrorMessage("Text to blog can't be blank. (You may want to check the output mode.)")
            return 0
        
        try:
            postid = self.bloggerSite.blogger.newPost(self.settings["appkey"], \
                                                      self.blogs[self.prefs["activeBlog"]-1]["blogid"], \
                                                      self.prefs["username"], \
                                                      self.getPassword(), \
                                                      text,
                                                      boolTrue) 
            self.setErrorMessage("")
        except xmlrpclib.Fault, e:
            self.setErrorMessage("Error adding text to homepage: %s" % e.faultString)
            return 0

        if self.prefs["weblogsPing"] == "Yes":
            #print "pinging weblogs.com"
            try:
                #print self.blogs[self.prefs["activeBlog"]-1]["blogName"]
                #print self.blogs[self.prefs["activeBlog"]-1]["url"]
                
                weblogsCom = xmlrpclib.Server("http://rpc.weblogs.com/RPC2", \
                                              transport=trURLlibTransport(self.proxy))

                weblogsCom.weblogUpdates.ping(self.blogs[self.prefs["activeBlog"]-1]["blogName"], \
                                              self.blogs[self.prefs["activeBlog"]-1]["url"])
                self.setErrorMessage("")
            except xmlrpclib.Fault, e:
                self.setErrorMessage("Blog successfully updated.  But error while 'pinging' weblogs.com:" % e.faultString)
                return 0
        #else:
            #print "NOT pinging weblogs.com"
            
                

        self.currentPostId = -1
        return postid


    def bloggerFetchPreviousPosts(self, number = 10):


Generated by  Doxygen 1.6.0   Back to index