이벤트를 만듭니다. 지금 사용해 보거나 예를 참조하세요.
요청
HTTP 요청
POST https://www.googleapis.com/calendar/v3/calendars/calendarId/events
매개변수
매개변수 이름 | 값 | 설명 |
---|---|---|
경로 매개변수 | ||
calendarId |
string |
캘린더 식별자입니다. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출합니다. 현재 로그인한 사용자의 기본 캘린더에 액세스하려면 'primary ' 키워드를 사용하세요.
|
선택적 쿼리 매개변수 | ||
conferenceDataVersion |
integer |
API 클라이언트에서 지원하는 회의 데이터의 버전 번호입니다. 버전 0은 회의 데이터 지원이 없다고 가정하고 일정 본문에 회의 데이터를 무시합니다. 버전 1을 사용하면 ConferenceData의 복사를 지원하고 conferenceData의 createRequest 필드를 사용하여 새로운 회의를 생성할 수 있습니다. 기본값은 0입니다.
사용 가능한 값: 0 ~1 .
|
maxAttendees |
integer |
응답에 포함할 최대 참석자 수입니다. 참석자가 지정된 수보다 많은 경우 참석자만 반환됩니다. 선택사항입니다. |
sendNotifications |
boolean |
지원이 중단되었습니다. 대신 sendUpdates를 사용하세요. 새 이벤트 생성에 관한 알림을 전송할지 여부입니다. 값을 false 로 설정해도 일부 이메일은 계속 전송될 수 있습니다. 기본값은 false 입니다.
|
sendUpdates |
string |
새 이벤트 생성에 관한 알림을 보낼지 여부입니다. 일부 이메일은 계속 전송될 수 있습니다. 기본값은 false 입니다.
허용되는 값은 다음과 같습니다.
|
supportsAttachments |
boolean |
작업을 수행하는 API 클라이언트가 이벤트 첨부파일을 지원하는지 여부입니다. 선택사항입니다. 기본값은 False입니다. |
승인
이 요청을 처리하려면 다음 범위 중 하나 이상의 승인을 받아야 합니다.
범위 |
---|
https://www.googleapis.com/auth/calendar |
https://www.googleapis.com/auth/calendar.events |
자세한 내용은 인증 및 승인 페이지를 참고하세요.
요청 본문
요청 본문에서는 다음과 같은 속성을 사용하여 이벤트 리소스를 제공합니다.
속성 이름 | 값 | 설명 | Notes |
---|---|---|---|
필수 속성 | |||
end |
nested object |
이벤트의 (제외) 종료 시간입니다. 반복 일정의 경우 첫 번째 인스턴스의 종료 시간입니다. | |
start |
nested object |
이벤트의 시작 시간입니다 (해당 시간 포함). 반복 일정의 경우 첫 번째 인스턴스의 시작 시간입니다. | |
선택 속성 | |||
anyoneCanAddSelf |
boolean |
누구나 일정에 자신을 초대할 수 있는지 여부입니다 (지원 중단됨). 선택사항입니다. 기본값은 False입니다. | 쓰기 가능 |
attachments[].fileUrl |
string |
첨부파일에 대한 URL 링크입니다. Google Drive 첨부파일을 추가하려면 Drive API에서 첨부파일을 추가할 때 필요합니다. |
쓰기 가능 |
attendees[] |
list |
이벤트의 참석자입니다. 다른 캘린더 사용자와 일정을 예약하는 방법에 대한 자세한 내용은 참석자가 있는 일정 가이드를 참조하세요. 참석자 목록을 채우려면 서비스 계정에서 도메인 전체 권한 위임을 사용해야 합니다. | 쓰기 가능 |
attendees[].additionalGuests |
integer |
추가 투숙객 수 선택사항입니다. 기본값은 0입니다. | 쓰기 가능 |
attendees[].comment |
string |
참석자의 응답 댓글입니다. 선택사항입니다. | 쓰기 가능 |
attendees[].displayName |
string |
참석자의 이름입니다(해당하는 경우). 선택사항입니다. | 쓰기 가능 |
attendees[].email |
string |
참석자의 이메일 주소(사용 가능한 경우) 참석자를 추가할 때 이 필드가 있어야 합니다. RFC5322에 따라 유효한 이메일 주소여야 합니다. 참석자를 추가할 때 필요합니다. |
쓰기 가능 |
attendees[].optional |
boolean |
선택적 참석자인지 여부입니다. 선택사항입니다. 기본값은 False입니다. | 쓰기 가능 |
attendees[].resource |
boolean |
참석자가 리소스인지 여부입니다. 참석자가 일정에 처음 추가될 때만 설정할 수 있습니다. 이후의 수정은 무시됩니다. 선택사항입니다. 기본값은 False입니다. | 쓰기 가능 |
attendees[].responseStatus |
string |
참석자의 응답 상태입니다. 가능한 값은 다음과 같습니다.
|
쓰기 가능 |
colorId |
string |
이벤트의 색상입니다. 색상 정의의 event 섹션에 있는 항목을 참조하는 ID입니다 ( 색상 엔드포인트 참고). 선택사항입니다. |
쓰기 가능 |
conferenceData |
nested object |
Google Meet 회의 세부정보와 같은 회의 관련 정보입니다. 새 회의 세부정보를 만들려면 createRequest 필드를 사용하세요. 변경사항을 유지하려면 모든 이벤트 수정 요청의 conferenceDataVersion 요청 매개변수를 1 로 설정해야 합니다. |
쓰기 가능 |
description |
string |
이벤트에 관한 설명입니다. HTML을 포함할 수 있습니다. 선택사항입니다. | 쓰기 가능 |
end.date |
date |
종일 일정인 경우 'yyyy-mm-dd' 형식의 날짜입니다. | 쓰기 가능 |
end.dateTime |
datetime |
결합된 날짜-시간 값 (RFC3339에 따라 형식 지정)으로 표시된 시간입니다. timeZone 에 시간대가 명시적으로 지정되지 않은 경우 시간대 오프셋이 필요합니다. |
쓰기 가능 |
end.timeZone |
string |
시간이 지정된 시간대입니다. (IANA 시간대 데이터베이스 이름 형식(예: '유럽/취리히')이 지정됩니다.) 반복 이벤트의 경우 이 필드는 필수이며 반복이 확장되는 시간대를 지정합니다. 단일 이벤트의 경우 이 필드는 선택사항이며 이벤트 시작/종료의 맞춤 시간대를 나타냅니다. | 쓰기 가능 |
eventType |
string |
이벤트의 특정 유형입니다. 일정을 만든 후에는 수정할 수 없습니다. 가능한 값은 다음과 같습니다.
|
쓰기 가능 |
extendedProperties.private |
object |
이 캘린더에 표시되는 일정 사본의 비공개 속성입니다. | 쓰기 가능 |
extendedProperties.shared |
object |
다른 참석자의 캘린더에 있는 일정 사본 간에 공유되는 속성입니다. | 쓰기 가능 |
focusTimeProperties |
nested object |
방해 금지 시간 이벤트 데이터 eventType 이 focusTime 인 경우 사용됩니다. |
쓰기 가능 |
gadget.display |
string |
가젯의 표시 모드 지원이 중단되었습니다. 가능한 값은 다음과 같습니다.
|
쓰기 가능 |
gadget.height |
integer |
가젯의 높이(픽셀)입니다. 높이는 0보다 큰 정수여야 합니다. 선택사항입니다. 지원이 중단되었습니다. | 쓰기 가능 |
gadget.iconLink |
string |
가젯의 아이콘 URL입니다. URL 스키마는 HTTPS여야 합니다. 지원이 중단되었습니다. | 쓰기 가능 |
gadget.link |
string |
가젯의 URL입니다. URL 스키마는 HTTPS여야 합니다. 지원이 중단되었습니다. | 쓰기 가능 |
gadget.preferences |
object |
환경설정을 탭합니다. | 쓰기 가능 |
gadget.title |
string |
가젯의 제목입니다. 지원이 중단되었습니다. | 쓰기 가능 |
gadget.type |
string |
가젯 유형. 지원이 중단되었습니다. | 쓰기 가능 |
gadget.width |
integer |
가젯의 너비(픽셀)입니다. 너비는 0보다 큰 정수여야 합니다. 선택사항입니다. 지원이 중단되었습니다. | 쓰기 가능 |
guestsCanInviteOthers |
boolean |
주최자 이외의 참석자가 일정에 다른 사람을 초대할 수 있는지 여부입니다. 선택사항입니다. 기본값은 True입니다. | 쓰기 가능 |
guestsCanModify |
boolean |
주최자 이외의 참석자가 일정을 수정할 수 있는지를 나타냅니다. 선택사항입니다. 기본값은 False입니다. | 쓰기 가능 |
guestsCanSeeOtherGuests |
boolean |
주최자 이외의 참석자가 일정의 참석자를 볼 수 있는지 여부입니다. 선택사항입니다. 기본값은 True입니다. | 쓰기 가능 |
id |
string |
이벤트의 불투명 식별자입니다. 새로운 단일 일정 또는 반복 일정을 만들 때 일정의 ID를 지정할 수 있습니다. 제공된 ID는 다음 규칙을 따라야 합니다.
ID를 지정하지 않으면 서버에서 자동으로 ID를 생성합니다.
|
쓰기 가능 |
location |
string |
자유 형식 텍스트로 된 이벤트의 지리적 위치입니다. 선택사항입니다. | 쓰기 가능 |
originalStartTime.date |
date |
종일 일정인 경우 'yyyy-mm-dd' 형식의 날짜입니다. | 쓰기 가능 |
originalStartTime.dateTime |
datetime |
결합된 날짜-시간 값 (RFC3339에 따라 형식 지정)으로 표시된 시간입니다. timeZone 에 시간대가 명시적으로 지정되지 않은 경우 시간대 오프셋이 필요합니다. |
쓰기 가능 |
originalStartTime.timeZone |
string |
시간이 지정된 시간대입니다. (IANA 시간대 데이터베이스 이름 형식(예: '유럽/취리히')이 지정됩니다.) 반복 이벤트의 경우 이 필드는 필수이며 반복이 확장되는 시간대를 지정합니다. 단일 이벤트의 경우 이 필드는 선택사항이며 이벤트 시작/종료의 맞춤 시간대를 나타냅니다. | 쓰기 가능 |
outOfOfficeProperties |
nested object |
부재중 일정 데이터입니다. eventType 이 outOfOffice 인 경우 사용됩니다. |
쓰기 가능 |
recurrence[] |
list |
RFC5545에 명시된 대로 반복 일정의 RRULE, EXRULE, RDATE, EXDATE 행 목록입니다. 이 필드에는 DTSTART 및 DTEND 행이 허용되지 않습니다. 이벤트 시작 및 종료 시간은 start 및 end 필드에 지정됩니다. 단일 이벤트 또는 반복 이벤트의 경우 이 필드가 생략됩니다. |
쓰기 가능 |
reminders.overrides[] |
list |
이벤트가 기본 알림을 사용하지 않는 경우 일정과 관련된 알림이 나열됩니다. 설정되지 않은 경우 이 일정에 설정된 알림이 없음을 나타냅니다. 재정의 알림의 최대 개수는 5개입니다. | 쓰기 가능 |
reminders.overrides[].method |
string |
이 알림에서 사용하는 방법입니다. 가능한 값은 다음과 같습니다.
알림을 추가할 때 필요합니다. |
쓰기 가능 |
reminders.overrides[].minutes |
integer |
이벤트가 시작되기 전까지 알림이 트리거되어야 하는 시간(분)입니다. 유효한 값은 0~40,320 (분 단위로 4주) 사이입니다. 알림을 추가할 때 필요합니다. |
쓰기 가능 |
reminders.useDefault |
boolean |
캘린더의 기본 알림을 일정에 적용할지 여부입니다. | 쓰기 가능 |
sequence |
integer |
iCalendar에 따른 순서 번호 | 쓰기 가능 |
source.title |
string |
소스의 제목입니다(예: 웹페이지 제목 또는 이메일 제목). | 쓰기 가능 |
source.url |
string |
리소스를 가리키는 소스의 URL입니다. URL 스키마는 HTTP 또는 HTTPS여야 합니다. | 쓰기 가능 |
start.date |
date |
종일 일정인 경우 'yyyy-mm-dd' 형식의 날짜입니다. | 쓰기 가능 |
start.dateTime |
datetime |
결합된 날짜-시간 값 (RFC3339에 따라 형식 지정)으로 표시된 시간입니다. timeZone 에 시간대가 명시적으로 지정되지 않은 경우 시간대 오프셋이 필요합니다. |
쓰기 가능 |
start.timeZone |
string |
시간이 지정된 시간대입니다. (IANA 시간대 데이터베이스 이름 형식(예: '유럽/취리히')이 지정됩니다.) 반복 이벤트의 경우 이 필드는 필수이며 반복이 확장되는 시간대를 지정합니다. 단일 이벤트의 경우 이 필드는 선택사항이며 이벤트 시작/종료의 맞춤 시간대를 나타냅니다. | 쓰기 가능 |
status |
string |
이벤트의 상태입니다. 선택사항입니다. 가능한 값은 다음과 같습니다.
|
쓰기 가능 |
summary |
string |
이벤트의 제목입니다. | 쓰기 가능 |
transparency |
string |
일정이 캘린더의 시간을 차단하는지 여부입니다. 선택사항입니다. 가능한 값은 다음과 같습니다.
|
쓰기 가능 |
visibility |
string |
이벤트의 공개 상태입니다. 선택사항입니다. 가능한 값은 다음과 같습니다.
|
쓰기 가능 |
workingLocationProperties |
nested object |
근무 위치 이벤트 데이터입니다. | 쓰기 가능 |
workingLocationProperties.customLocation |
object |
있는 경우 사용자가 맞춤 위치에서 근무 중임을 지정합니다. | 쓰기 가능 |
workingLocationProperties.customLocation.label |
string |
추가 정보를 위한 추가 라벨입니다(선택사항). | 쓰기 가능 |
workingLocationProperties.homeOffice |
any value |
있는 경우 사용자가 재택근무 중임을 지정합니다. | 쓰기 가능 |
workingLocationProperties.officeLocation |
object |
있는 경우 사용자가 사무실에서 근무 중임을 지정합니다. | 쓰기 가능 |
workingLocationProperties.officeLocation.buildingId |
string |
건물 식별자입니다(선택사항). 조직의 리소스 데이터베이스에 있는 건물 ID를 참조해야 합니다. | 쓰기 가능 |
workingLocationProperties.officeLocation.deskId |
string |
데스크 식별자(선택사항)입니다. | 쓰기 가능 |
workingLocationProperties.officeLocation.floorId |
string |
층 식별자(선택사항)입니다. | 쓰기 가능 |
workingLocationProperties.officeLocation.floorSectionId |
string |
층 섹션 식별자(선택사항)입니다. | 쓰기 가능 |
workingLocationProperties.officeLocation.label |
string |
캘린더 웹 및 모바일 클라이언트에 표시되는 사무실 이름입니다. 조직의 리소스 데이터베이스에서 건물 이름을 참조하는 것이 좋습니다. | 쓰기 가능 |
workingLocationProperties.type |
string |
근무 위치의 유형입니다. 가능한 값은 다음과 같습니다.
근무 위치 속성을 추가할 때 필요합니다. |
쓰기 가능 |
응답
요청에 성공할 경우 이 메서드는 응답 본문에 이벤트 리소스를 반환합니다.
예
참고: 이 메서드에 제공되는 코드 예시가 지원되는 모든 프로그래밍 언어를 나타내는 것은 아닙니다. 지원되는 언어 목록은 클라이언트 라이브러리 페이지를 참조하세요.
Java
자바 클라이언트 라이브러리를 사용합니다.
// Refer to the Java quickstart on how to setup the environment: // https://developers.google.com/calendar/quickstart/java // Change the scope to CalendarScopes.CALENDAR and delete any stored // credentials. Event event = new Event() .setSummary("Google I/O 2015") .setLocation("800 Howard St., San Francisco, CA 94103") .setDescription("A chance to hear more about Google's developer products."); DateTime startDateTime = new DateTime("2015-05-28T09:00:00-07:00"); EventDateTime start = new EventDateTime() .setDateTime(startDateTime) .setTimeZone("America/Los_Angeles"); event.setStart(start); DateTime endDateTime = new DateTime("2015-05-28T17:00:00-07:00"); EventDateTime end = new EventDateTime() .setDateTime(endDateTime) .setTimeZone("America/Los_Angeles"); event.setEnd(end); String[] recurrence = new String[] {"RRULE:FREQ=DAILY;COUNT=2"}; event.setRecurrence(Arrays.asList(recurrence)); EventAttendee[] attendees = new EventAttendee[] { new EventAttendee().setEmail("lpage@example.com"), new EventAttendee().setEmail("sbrin@example.com"), }; event.setAttendees(Arrays.asList(attendees)); EventReminder[] reminderOverrides = new EventReminder[] { new EventReminder().setMethod("email").setMinutes(24 * 60), new EventReminder().setMethod("popup").setMinutes(10), }; Event.Reminders reminders = new Event.Reminders() .setUseDefault(false) .setOverrides(Arrays.asList(reminderOverrides)); event.setReminders(reminders); String calendarId = "primary"; event = service.events().insert(calendarId, event).execute(); System.out.printf("Event created: %s\n", event.getHtmlLink());
Python
Python 클라이언트 라이브러리를 사용합니다.
# Refer to the Python quickstart on how to setup the environment: # https://developers.google.com/calendar/quickstart/python # Change the scope to 'https://www.googleapis.com/auth/calendar' and delete any # stored credentials. 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}, ], }, } event = service.events().insert(calendarId='primary', body=event).execute() print 'Event created: %s' % (event.get('htmlLink'))
2,399필리핀
PHP 클라이언트 라이브러리를 사용합니다.
// Refer to the PHP quickstart on how to setup the environment: // https://developers.google.com/calendar/quickstart/php // Change the scope to Google_Service_Calendar::CALENDAR and delete any stored // credentials. $event = new Google_Service_Calendar_Event(array( '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' => array( 'dateTime' => '2015-05-28T09:00:00-07:00', 'timeZone' => 'America/Los_Angeles', ), 'end' => array( 'dateTime' => '2015-05-28T17:00:00-07:00', 'timeZone' => 'America/Los_Angeles', ), 'recurrence' => array( 'RRULE:FREQ=DAILY;COUNT=2' ), 'attendees' => array( array('email' => 'lpage@example.com'), array('email' => 'sbrin@example.com'), ), 'reminders' => array( 'useDefault' => FALSE, 'overrides' => array( array('method' => 'email', 'minutes' => 24 * 60), array('method' => 'popup', 'minutes' => 10), ), ), )); $calendarId = 'primary'; $event = $service->events->insert($calendarId, $event); printf('Event created: %s\n', $event->htmlLink);
Ruby
Ruby 클라이언트 라이브러리를 사용합니다.
event = Google::Apis::CalendarV3::Event.new( 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: Google::Apis::CalendarV3::EventDateTime.new( date_time: '2015-05-28T09:00:00-07:00', time_zone: 'America/Los_Angeles' ), end: Google::Apis::CalendarV3::EventDateTime.new( date_time: '2015-05-28T17:00:00-07:00', time_zone: 'America/Los_Angeles' ), recurrence: [ 'RRULE:FREQ=DAILY;COUNT=2' ], attendees: [ Google::Apis::CalendarV3::EventAttendee.new( email: 'lpage@example.com' ), Google::Apis::CalendarV3::EventAttendee.new( email: 'sbrin@example.com' ) ], reminders: Google::Apis::CalendarV3::Event::Reminders.new( use_default: false, overrides: [ Google::Apis::CalendarV3::EventReminder.new( reminder_method: 'email', minutes: 24 * 60 ), Google::Apis::CalendarV3::EventReminder.new( reminder_method: 'popup', minutes: 10 ) ] ) ) result = client.insert_event('primary', event) puts "Event created: #{result.html_link}"
.NET
.NET 클라이언트 라이브러리를 사용합니다.
// Refer to the .NET quickstart on how to setup the environment: // https://developers.google.com/calendar/quickstart/dotnet // Change the scope to CalendarService.Scope.Calendar and delete any stored // credentials. Event newEvent = new 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 = new EventDateTime() { DateTime = DateTime.Parse("2015-05-28T09:00:00-07:00"), TimeZone = "America/Los_Angeles", }, End = new EventDateTime() { DateTime = DateTime.Parse("2015-05-28T17:00:00-07:00"), TimeZone = "America/Los_Angeles", }, Recurrence = new String[] { "RRULE:FREQ=DAILY;COUNT=2" }, Attendees = new EventAttendee[] { new EventAttendee() { Email = "lpage@example.com" }, new EventAttendee() { Email = "sbrin@example.com" }, }, Reminders = new Event.RemindersData() { UseDefault = false, Overrides = new EventReminder[] { new EventReminder() { Method = "email", Minutes = 24 * 60 }, new EventReminder() { Method = "sms", Minutes = 10 }, } } }; String calendarId = "primary"; EventsResource.InsertRequest request = service.Events.Insert(newEvent, calendarId); Event createdEvent = request.Execute(); Console.WriteLine("Event created: {0}", createdEvent.HtmlLink);
Go
Go 클라이언트 라이브러리를 사용합니다.
// Refer to the Go quickstart on how to setup the environment: // https://developers.google.com/calendar/quickstart/go // Change the scope to calendar.CalendarScope and delete any stored credentials. event := &calendar.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: &calendar.EventDateTime{ DateTime: "2015-05-28T09:00:00-07:00", TimeZone: "America/Los_Angeles", }, End: &calendar.EventDateTime{ DateTime: "2015-05-28T17:00:00-07:00", TimeZone: "America/Los_Angeles", }, Recurrence: []string{"RRULE:FREQ=DAILY;COUNT=2"}, Attendees: []*calendar.EventAttendee{ &calendar.EventAttendee{Email:"lpage@example.com"}, &calendar.EventAttendee{Email:"sbrin@example.com"}, }, } calendarId := "primary" event, err = srv.Events.Insert(calendarId, event).Do() if err != nil { log.Fatalf("Unable to create event. %v\n", err) } fmt.Printf("Event created: %s\n", event.HtmlLink)
JavaScript
// Refer to the JavaScript quickstart on how to setup the environment: // https://developers.google.com/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); });
Node.js
Node.js 클라이언트 라이브러리를 사용합니다.
// Refer to the Node.js quickstart on how to setup the environment: // https://developers.google.com/calendar/quickstart/node // 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}, ], }, }; calendar.events.insert({ auth: auth, calendarId: 'primary', resource: event, }, function(err, event) { if (err) { console.log('There was an error contacting the Calendar service: ' + err); return; } console.log('Event created: %s', event.htmlLink); });
사용해 보기
아래의 API 탐색기를 사용하여 실시간 데이터를 대상으로 이 메소드를 호출하고 응답을 확인해 보세요.