본문 바로가기
Programming/Javascript

Google Calendar API 휴일데이터 받아오기.

by 생각하는달팽이 2019. 4. 9.

1. API 키 발급. ( 다른 인증을 사용해도 좋다. )
https://console.developers.google.com/apis/dashboard?project=quickstart-1552639953833&folder=&organizationId=

 

2. 구글 아이디로 로그인 후, 구글 캘린더에 원하는 국가의 휴일을 추가한다. ( 필수 )

3. calendarList list api 를 통해서, 현재 나의 캘린더 리스트를 받아온다.

 https://developers.google.com/calendar/v3/reference/calendarList/list?apix_params=%7B%7D

 

CalendarList: list  |  Calendar API  |  Google Developers

Requires authorization Returns the calendars on the user's calendar list. Try it now or see an example. Request HTTP request GET https://www.googleapis.com/calendar/v3/users/me/calendarList Parameters Parameter name Value Description Optional query paramet

developers.google.com

4. 받아온 캘린더 리스트의 id 들을 이용하여 휴일 캘린더의 캘린더 데이터를 받아온다.

5. https://developers.google.com/calendar/v3/reference/events/list

 

Events: list  |  Calendar API  |  Google Developers

Returns events on the specified calendar. Try it now or see an example. Request HTTP request GET https://www.googleapis.com/calendar/v3/calendars/calendarId/events Parameters Parameter name Value Description Path parameters calendarId string Calendar ident

developers.google.com

_ 샘플

 

한국 휴일 > calendarId :  ko.south_korea#holiday@group.v.calendar.google.com

일본 휴일 > calendarId : ja.japanese#holiday@group.v.calendar.google.com

반응형

'Programming > Javascript' 카테고리의 다른 글

Javascript Tip  (0) 2019.04.27
Tip for React javascript  (0) 2019.04.03
자바스크립트의 비동기  (0) 2019.04.03
[jQuery Mobile] jquery mobile page link 스크립트 오류  (0) 2015.09.02