Blogger API - 如何在插入新 post 时添加标签?

Blogger API - How to add labels while inserting a new post?

我正在尝试使用 Blogger API 插入新博客 post 下面的 v3.0 是我的示例负载

var payload = {
  "title"   : "This is the post title2",
  "content" : "This is <b>HTML</b> post2"
};

这是按预期工作的,但我需要在 post 使用这些新的 post 时插入标签,我检查了文档和 Google 但没有帮助。我试过类似下面的东西

var payload = {
  "title"   : "This is the post title2",
  "content" : "This is <b>HTML</b> post2",
  "labels"  : "test_post,test,post"
};

基于 v1.0 php 示例,我仍然没有成功。

Post Resource documentation 表示 labels 属性是一个列表。您的有效负载可能应该如下所示:

var payload = {
  "title"   : "This is the post title2",
  "content" : "This is <b>HTML</b> post2",
  "labels"  : [
                "test_post",
                "test",
                "post"
              ]
};