Logo Search packages:      
Sourcecode: zope-coreblog version File versions

def zope-coreblog-1.0::COREBlog::COREBlog::getRecentPosts (   self,
  appkey,
  blogid,
  username,
  password,
  numberOfPosts,
  REQUEST = None 
)

return recent posts 

Definition at line 1750 of file COREBlog.py.

                                            :
        """ return recent posts """
        import xmlrpclib
        c = convert_charcode
        bc = self.get_blogclient_charcode()
        rl = []
        for ent in self.rev_entry_items(count=numberOfPosts):
            body = """<title>%s</title>%s""" % \
                    (c(ent.title,bc,self.get_charcode()),
                     c(ent.body,bc,self.get_charcode()))
            cl = ent.entry_category_list()
            for cat in cl:
                body = body + "<category>" + c(cat.name,bc,self.get_charcode()) + "</category>"
            d = {'dateCreated':xmlrpclib.DateTime(ent.date_created()),
                'userid':c(ent.author,bc,self.get_charcode()),
                'postid':str(ent.id),
                'content':body}

            rl.append(d)
        return rl


    security.declareProtected(ManageCOREBlog, 'getUsersBlogs')
    def getUsersBlogs(self,apkey,username,password,REQUEST=None):


Generated by  Doxygen 1.6.0   Back to index