Google Calendar与Squarespace集成使用Google API

问题描述 投票:1回答:1

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

我们已经做到这一点,但现在在颜色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"
    },
    
    }
  }
}

感谢您提供的任何帮助或见解!

google-calendar-api squarespace
1个回答
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"
        }
    }
}
© www.soinside.com 2019 - 2024. All rights reserved.