def createPost(self, title, content, author_name, label, is_draft=False): # Create the entry to insert. entry = GDataEntry() entry.author.append(atom.Author(atom.Name(text=author_name))) entry.title = atom.Title(title_type='html', text=title) entry.content = atom.Content(content_type='html', text=content) if label: entry.category.append(atom.Category(term=label, scheme="http://www.blogger.com/atom/ns#")) if is_draft: control = atom.Control() control.draft = atom.Draft(text='yes') entry.control = control # Ask the service to insert the new entry. return self.service.Post(entry, '/feeds/' + self.blog_id + '/posts/default')
def CreatePost(self, title, content): entry = GDataEntry() entry.title = atom.Title("xhtml", title) entry.content = atom.Content(content_type="html", text=content) return self.blogger_service.Post(entry, "/feeds/%s/posts/default" % self.blog_id)
def CreatePost(self, title, content): entry = GDataEntry() entry.title = atom.Title('xhtml', title) entry.content = atom.Content(content_type='html', text=content) return self.blogger_service.Post( entry, '/feeds/%s/posts/default' % self.blog_id)