본문 바로가기
자바스크립트(js)

Google Calendar API

by 리틀홍콩 2018. 1. 23.
728x90

javascript


[ insert ]


https://developers.google.com/google-apps/calendar/v3/reference/events/insert#examples


// Refer to the JavaScript quickstart on how to setup the environment:
// https://developers.google.com/google-apps/calendar/quickstart/js
// Change the scope to 'https://www.googleapis.com/auth/calendar' and delete any
// stored credentials.

var event = {
 
'summary': 'Google I/O 2015',
 
'location': '800 Howard St., San Francisco, CA 94103',
 
'description': 'A chance to hear more about Google\'s developer products.',
 
'start': {
   
'dateTime': '2015-05-28T09:00:00-07:00',
   
'timeZone': 'America/Los_Angeles'
 
},
 
'end': {
   
'dateTime': '2015-05-28T17:00:00-07:00',
   
'timeZone': 'America/Los_Angeles'
 
},
 
'recurrence': [
   
'RRULE:FREQ=DAILY;COUNT=2'
 
],
 
'attendees': [
   
{'email': 'lpage@example.com'},
   
{'email': 'sbrin@example.com'}
 
],
 
'reminders': {
   
'useDefault': false,
   
'overrides': [
     
{'method': 'email', 'minutes': 24 * 60},
     
{'method': 'popup', 'minutes': 10}
   
]
 
}
};

var request = gapi.client.calendar.events.insert({
 
'calendarId': 'primary',
 
'resource': event
});

request
.execute(function(event) {
  appendPre
('Event created: ' + event.htmlLink);
});


'자바스크립트(js)' 카테고리의 다른 글

HTML에서 자바스크립트를 이용한 파라메터 주고받기  (0) 2015.12.03
MAC주소 얻기  (0) 2015.08.11
숫자키만 입력하기.  (0) 2015.05.18
테이블 헤더 고정  (0) 2015.02.11
화면 구성 사이즈  (0) 2015.01.27

댓글