Skip to content

Commit 2b19544

Browse files
author
j.s@google.com
committed
Removing the title argument from Blogger's add_comment method.
1 parent cf496c0 commit 2b19544

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

samples/blogger/BloggerExample.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def PrintAllPosts(self):
9595
if not entry.title.text:
9696
print "\tNo Title"
9797
else:
98-
print "\t" + entry.title.text
98+
print "\t" + entry.title.text.encode('utf-8')
9999
print
100100

101101
def PrintPostsInDateRange(self, start_time, end_time):
@@ -156,7 +156,7 @@ def CreateComment(self, post_id, comment_text):
156156
157157
NOTE: This functionality is not officially supported yet.
158158
"""
159-
return self.client.add_comment(self.blog_id, post_id, None, comment_text)
159+
return self.client.add_comment(self.blog_id, post_id, comment_text)
160160

161161
def PrintAllComments(self, post_id):
162162
"""This method displays all the comments for the given post. First the
@@ -178,7 +178,6 @@ def DeleteComment(self, comment_entry):
178178
"""This method removes the comment specified by the given edit_link_href, the
179179
URI for editing the comment.
180180
"""
181-
182181
self.client.delete(comment_entry)
183182

184183
def DeletePost(self, post_entry):

src/atom/http_core.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
__author__ = 'j.s@google.com (Jeff Scudder)'
2323

2424

25+
import os
2526
import StringIO
2627
import urlparse
2728
import urllib

src/gdata/blogger/client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,9 @@ def add_post(self, blog_id, title, body, labels=None, draft=False,
101101

102102
AddPost = add_post
103103

104-
def add_comment(self, blog_id, post_id, title, body, auth_token=None,
104+
def add_comment(self, blog_id, post_id, body, auth_token=None,
105105
title_type='text', body_type='html', **kwargs):
106106
new_entry = gdata.blogger.data.Comment(
107-
title=atom.data.Title(text=title, type=title_type),
108107
content=atom.data.Content(text=body, type=body_type))
109108
return self.post(new_entry, BLOG_POST_COMMENTS_URL % (blog_id, post_id),
110109
auth_token=auth_token, **kwargs)

0 commit comments

Comments
 (0)