Logo
Section 1 / 2

创建、更新和删除页面

了解博客页面以及如何创建、更新和删除它。

导入

创建、更新和删除页面

了解博客页面以及如何创建、更新和删除它。

参数类型描述
kindstring对象的类型。值为:"blogger#page"。注意:此值固定不变。
idstring页面的ID。
blogobject包含页面所属博客信息的对象。
blog.idstring页面所属博客的ID。
publisheddatetime页面的发布日期。格式:yyyy-mm-dd
updateddatetime页面最后一次更新的日期。格式:yyyy-mm-dd
urlstring页面的发布链接。
selfLinkstring页面的Blogger API URL。
titlestring页面的标题。
contentstring页面的内容。
authorobject包含页面作者信息的对象。
author.idstring作者的ID。
author.displayNamestring作者的名称。
author.urlstring作者个人资料的发布链接。
author.imageobject包含作者头像信息的对象。
author.image.urlstring作者头像的URL。
statusstring页面在管理资源中的状态。允许值:"LIVE", "DRAFT"

参数类型类别描述
blogIdstring必填要添加页面的博客ID。
1blogId = '' 2 3data = { 4 "title": "", 5 "content": "" 6} 7 8url = 'https://blogger.googleapis.com/v3/blogs/' + blogId + '/pages' 9 10response = requests.post(url, headers=headers, json=data) 11 12printResponse(response)

参数类型类别描述
blogIdstring必填要更新页面的博客ID。
pageIdstring必填要更新的页面ID。
1blogId = '' 2pageId = '' 3 4data = { 5 'title': '', 6} 7 8url = 'https://blogger.googleapis.com/v3/blogs/' + blogId + '/pages/' + pageId 9 10response = requests.put(url, headers=headers, json=data) 11 12printResponse(response)

参数类型类别描述
blogIdstring必填要删除页面的博客ID。
pageIdstring必填要删除的页面ID。
1blogId = '' 2pageId = '' 3 4url = 'https://blogger.googleapis.com/v3/blogs/' + blogId + '/pages/' + pageId 5 6response = requests.delete(url, headers=headers) 7 8printResponse(response)

用户和博客

浏览量、页面列表和获取页面