Yu-Jie Lin committed 6d19aeb

add Blogger page support. close #1

Comments (0)

Files changed (3)

   * add ``doc`` for documentation generation
   * add ``upload_doc`` for uploading to PyPI
   * add ``clean`` for cleaning up built files
+* add Blogger page support (#1)
 Version 0.6.2 (2013-08-18T11:51:37Z)


     if kind == 'post':
       posts = self.service.posts()
+    elif kind == 'page':
+      posts = self.service.pages()
       raise ValueError('Unsupported kind: %s' % kind)
     if 'id' in post:
       print('Updating a %s: %s' % (kind, title))
-      req = posts.update(blogId=post['blog']['id'], postId=post['id'],
-                         body=post)
+      data = {
+        'blogId': post['blog']['id'],
+        'body': post,
+        '%sId' % kind: post['id'],
+      }
+      req = posts.update(**data)
       print('Posting a new %s: %s' % (kind, title))
       req = posts.insert(blogId=post['blog']['id'], body=post)
   type of the posting, ``post`` or ``page``, default is ``post``.
-  Blogger service currently only supports ``post``.
   It could be added automatically after successfully posting.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.