使用Google API将Google Calendar与Squarespace集成

时间:2019-02-12 20:27:36

标签: google-calendar-api squarespace

我们正在按照Google API编码步骤将Google日历嵌入Squarespace。

到目前为止,我们已经做到了,但是现在在color id部分出现了错误。目前我们处于停滞状态。对我们缺少的东西有什么想法吗?

{
  "end": {
    "date": "01-01-19"
  },
  "start": {
    "date": "01-01-19"
  },
  "colorId": "{
  "kind": "calendar#colors",
  "updated": "2012-02-14T00:00:00.000Z",
  "calendar": {
    "1": {
      "background": "#ac725e",
      "foreground": "#1d1d1d"
    },
    "2": {
      "background": "#d06b64",
      "foreground": "#1d1d1d"
    },
    "3": {
      "background": "#f83a22",
      "foreground": "#1d1d1d"
    },
    "4": {
      "background": "#fa573c",
      "foreground": "#1d1d1d"
    },
    "5": {
      "background": "#ff7537",
      "foreground": "#1d1d1d"
    },
    
    }
  }
}

感谢您可能提供的帮助或见解!

1 个答案:

答案 0 :(得分:1)

要专门关注“ colorID”(您说这是您的特定问题),您有一些无效的语法。 colorId的类型应为string,而您将其作为一个对象(似乎由不希望的引号引起来)。因此,对于初学者来说,该怎么做:

{
    "end": {
        "date": "01-01-19"
    },
    "start": {
        "date": "01-01-19"
    },
    "kind": "calendar#colors",
    "updated": "2012-02-14T00:00:00.000Z",
    "calendar": {
        "1": {
            "background": "#ac725e",
            "foreground": "#1d1d1d"
        },
        "2": {
            "background": "#d06b64",
            "foreground": "#1d1d1d"
        },
        "3": {
            "background": "#f83a22",
            "foreground": "#1d1d1d"
        },
        "4": {
            "background": "#fa573c",
            "foreground": "#1d1d1d"
        },
        "5": {
            "background": "#ff7537",
            "foreground": "#1d1d1d"
        }
    }
}