2015-06-14 540 views
1

我想使用JavaScript从Google日历API中提取某个国家/地区的假期列表。从Google Calendar API获取国家/地区的假期列表

可能吗?我怎样才能做到这一点?

+0

可能[进入假期压延复制](http://stackoverflow.com/questions/18996577/how-to-get-national-holidays-of-selected-country) –

+0

我不相信谷歌会在任何API中为不同国家的节假日列表。你可以找到国家特定假期的公共日历。 –

回答

1

是的,使用谷歌API你可以做到这一点。

  • 在谷歌开发者帐号 中创建一个API应用程序。 https://console.developers.google.com
  • 从您可以创建一个API密钥的“证书”选项卡,你会得到 这样的事情“AIzaSyBcOT_DpEQysiwFmmmZXupKpnrOdJYAhhM”
  • 然后你就可以使用这个网址

https://www.googleapis.com/calendar/v3/calendars/en.uk%40holiday.calendar.google.com/events?key=yourAPIKey

+0

如何获得另一个国家的日历列表? – BarmanInfo

+0

替换网址上的日历名称。 如果你想要一个印度假日日历,你可以看到所有可用的假日日历在以下网址:[link](https://calendar.google.com/calendar/render#settings-dir_10%7Choliday) ,订阅印度日历(你可以选择你想要的),那么你可以从日历设置中找到日历名称(例如:https://drive.google.com/file/d/1z6S6GtWL9sfzeVu4CzH7dMCLd0IFNVzi/view)。 ,将其替换为网址(如下所示:https://drive.google.com/file/d/1VbsAhQaPiU0OUGnGRs19EaRANOwaltDh/view) – Midhun1993

相关问题