从Google假期日历中抽出几天

时间:2016-03-30 15:35:06

标签: jquery api google-calendar-api

如何使用开发者API从谷歌日历中获得国定假日? 我有代码来度假,这是有效的,但我需要跳过例如情人节,因为那不是休息日。

$.ajax({
        type: 'GET',
        url: 'https://www.googleapis.com/calendar/v3/calendars/' + calendarid + '/events?key=' + mykey,
        dataType: 'json',
        success: function (data) {
            self.NationalHolidays(data.items);
        },
        error: function (error) {
            //tell that an error has occurred
        }
    });

TNX!

0 个答案:

没有答案