본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

Google Calendar

원문 보기 위키 갱신

Google Calendar 컴포넌트는 Google Calendar를 Google Calendar Web APIs로 다룰 수 있게 해 주는 컴포넌트예요. Google 계정 인증은 OAuth 2.0 프로토콜로 이뤄지고, Camel 2.15부터 제공됐으며 producer와 consumer를 모두 지원합니다. 7개 API(acl, calendars, channels, events, freebusy, list, settings)의 메서드를 엔드포인트 URI로 호출할 수 있어요.

출처: 문서

본문

Camel 2.15부터 지원

producer와 consumer 모두 지원해요

Google Calendar 컴포넌트는 Google Calendar를 Google Calendar Web APIs를 통해 접근할 수 있게 해 줘요.

Google Calendar는 Google 계정 인증과 사용자 데이터 접근 권한 부여에 OAuth 2.0 프로토콜을 사용해요. 이 컴포넌트를 쓰기 전에 계정을 만들고 OAuth 자격 증명을 생성해야 해요. 자격 증명은 clientId, clientSecret, refreshToken으로 구성돼요. 수명이 긴 refreshToken을 생성할 때 유용한 도구로 OAuth playground가 있어요.

서비스 계정의 경우 자격 증명은 JSON 파일(serviceAccountKey)로 구성돼요. 도메인 전체 권한 위임(delegate)과 하나 또는 여러 개, 혹은 모든 Calendar API 인증 범위(Auth Scopes)를 사용할 수도 있어요.

Maven 사용자는 이 컴포넌트를 쓰려면 pom.xml에 다음 의존성을 추가해야 해요:

<dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-google-calendar</artifactId>
        <!-- use the same version as your Camel core version -->
        <version>x.x.x</version>
</dependency>

옵션 설정 방법 (Configuring Options)

Camel 컴포넌트는 두 단계로 나눠 설정합니다:

  • 컴포넌트(component) 레벨

  • 엔드포인트(endpoint) 레벨

컴포넌트 옵션 설정 (Configuring Component Options)

컴포넌트 레벨에서는 엔드포인트들이 이어서 물려받는 일반적이고 공유되는 설정을 해요. 가장 상위의 설정 레벨이죠.

예를 들어 컴포넌트에는 보안 설정, 인증용 자격 증명, 네트워크 연결 URL 같은 것들이 있을 수 있어요.

컴포넌트에 따라 옵션이 몇 개뿐인 것도 있고 아주 많은 것도 있어요. 컴포넌트는 보통 널리 쓰이는 기본값이 미리 설정되어 있어서, 몇 가지 옵션만 설정하거나 아예 하나도 건드리지 않아도 되는 경우가 많아요.

컴포넌트는 다음 방법으로 설정할 수 있어요:

  • the Component DSL.

  • 설정 파일(application.properties, *.yaml 파일 등).

  • Java 코드에서 직접.

엔드포인트 옵션 설정 (Configuring Endpoint Options)

엔드포인트는 옵션이 많아서 설정에 시간을 더 쓰게 될 거예요. 이 옵션들이 엔드포인트가 원하는 일을 하도록 커스터마이즈해 줘요. 옵션은 엔드포인트가 consumer(from)로 쓰이는지, producer(to)로 쓰이는지, 둘 다인지에 따라 분류되기도 해요.

엔드포인트 설정은 대부분 엔드포인트 URI에 _path_와 query 파라미터로 바로 하는 경우가 많아요. Java에서 엔드포인트와 데이터 포맷을 _타입 세이프_하게 설정하려면 Endpoint DSL과 DataFormat DSL을 쓸 수도 있어요.

옵션을 설정할 때 좋은 습관은 Property Placeholders를 사용하는 거예요.

프로퍼티 플레이스홀더는 이런 장점이 있어요:

  • URL, 포트 번호, 민감한 정보 같은 설정을 하드코딩하는 걸 막아 줘요.

  • 설정을 코드 밖으로 분리할 수 있어요.

  • 코드가 더 유연해지고 재사용하기 좋아져요.

다음 두 섹션에서 모든 옵션을 나열해요. 먼저 컴포넌트 옵션, 그다음 엔드포인트 옵션 순서예요.

컴포넌트 옵션 (Component Options)

Google Calendar 컴포넌트가 지원하는 옵션은 아래와 같아요.

Name Description Default Type
applicationName (common) Google calendar application name. Example would be camel-google-calendar/1.0. String
clientId (common) 캘린더 애플리케이션의 Client ID예요. String
configuration (common) 공유 설정을 사용해요. GoogleCalendarConfiguration
delegate (common) 와이드 도메인(wide-domain) 서비스 계정의 delegate예요. String
scopes (common) 캘린더 애플리케이션이 사용자 계정에 갖는 권한 수준을 지정해요. 자세한 내용은 https://developers.google.com/identity/protocols/googlescopes를 보세요. 여러 스코프는 쉼표로 구분할 수 있어요. https://www.googleapis.com/auth/calendar String
bridgeErrorHandler (consumer) consumer를 Camel 라우팅 에러 핸들러에 브리지할 수 있게 해 줘요. 그러면 Camel consumer가 들어오는 메시지를 가져오는 동안 발생한 예외 등을 (가능한 경우) 메시지로 처리해 라우팅 에러 핸들러가 다루게 돼요. 중요: 서드파티 컴포넌트가 예외 발생을 Camel에 알릴 수 있어야만 가능해요. 일부 컴포넌트는 이를 내부에서만 처리하기 때문에 bridgeErrorHandler를 쓸 수 없어요. 다른 상황에서는 Camel 컴포넌트가 서드파티 컴포넌트에 후킹해 이를 가능하게끔 개선될 수 있습니다. 기본으로 consumer는 org.apache.camel.spi.ExceptionHandler로 예외를 다뤄 WARN 또는 ERROR 레벨로 기록하고 무시해요. false boolean
lazyStartProducer (producer) producer를 lazy(첫 메시지 시점)로 시작할지 여부예요. lazy 시작을 쓰면 producer가 시작 중 실패해서 라우트 시작이 실패하는 상황에서도 CamelContext와 라우트를 시작할 수 있고, 시작 실패 처리를 Camel의 라우팅 에러 핸들러로 넘길 수 있어요. 다만 첫 메시지를 처리하는 시점에 producer를 만들고 시작하는 데 시간이 조금 걸려 전체 처리 시간이 길어질 수 있다는 점은 유의하세요. false boolean
autowiredEnabled (advanced) 오토와이어링 사용 여부예요. 레지스트리에서 일치하는 타입의 인스턴스가 하나만 있는지 찾아 컴포넌트에 자동으로 설정하는(옵션이 autowired로 표시돼 있어야 함) 자동 오토와이어링에 쓰입니다. JDBC 데이터 소스, JMS 커넥션 팩토리, AWS 클라이언트 등을 자동 설정할 때 유용해요. true boolean
clientFactory (advanced) 클라이언트를 만들 때 GoogleCalendarClientFactory를 팩토리로 사용해요. 기본값은 BatchGoogleCalendarClientFactory예요. GoogleCalendarClientFactory
accessToken (security) OAuth 2 액세스 토큰이에요. 보통 1시간 후 만료되므로 장기 사용에는 refreshToken이 좋아요. String
clientSecret (security) 캘린더 애플리케이션의 Client secret이에요. String
emailAddress (security) Google 서비스 계정의 emailAddress예요. String
p12FileName (security) Google 서비스 계정과 함께 쓸 프라이빗 키가 담긴 p12 파일의 이름이에요. String
refreshToken (security) OAuth 2 리프레시 토큰이에요. 이걸 쓰면 Google Calendar 컴포넌트가 현재 토큰이 만료될 때마다 새 accessToken을 얻을 수 있어요 — 애플리케이션이 오래 동작한다면 필수예요. String
serviceAccountKey (security) 애플리케이션을 서비스 계정으로 인증할 때 쓰는 JSON 형식의 서비스 계정 키예요. base64: 접두사를 붙여 base64를 받아들여요. String
user (security) 서비스 계정 플로우에서 애플리케이션이 사칭(impersonate)하려는 사용자의 이메일 주소예요. String

엔드포인트 옵션 (Endpoint Options)

Google Calendar 엔드포인트는 다음 URI 문법으로 설정해요:

google-calendar:apiName/methodName

다음 _path_와 query 파라미터를 씁니다:

경로 파라미터 (Path Parameters)

Name Description Default Type
apiName (common)
필수 수행할 연산 종류예요.

Enum values:

  • ACL

  • LIST

  • CALENDARS

  • CHANNELS

  • COLORS

  • FREEBUSY

  • EVENTS

  • SETTINGS

| | GoogleCalendarApiName | | methodName (common) |

필수 선택한 연산에 사용할 하위 연산이에요.

Enum values:

  • calendarImport

  • clear

  • delete

  • get

  • insert

  • instances

  • list

  • move

  • patch

  • query

  • quickAdd

  • stop

  • update

  • watch

| | String |

쿼리 파라미터 (Query Parameters)

Name Description Default Type
applicationName (common) Google calendar application name. Example would be camel-google-calendar/1.0. String
clientId (common) 캘린더 애플리케이션의 Client ID예요. String
delegate (common) 와이드 도메인(wide-domain) 서비스 계정의 delegate예요. String
inBody (common) exchange In Body로 넘길 파라미터의 이름을 설정해요. String
scopes (common) 캘린더 애플리케이션이 사용자 계정에 갖는 권한 수준을 지정해요. 자세한 내용은 https://developers.google.com/identity/protocols/googlescopes를 보세요. 여러 스코프는 쉼표로 구분할 수 있어요. https://www.googleapis.com/auth/calendar String
sendEmptyMessageWhenIdle (consumer) 폴링 consumer가 아무 파일도 폴링하지 못했을 때, 대신 빈 메시지(본문 없음)를 보내도록 이 옵션을 켤 수 있어요. false boolean
bridgeErrorHandler (consumer (advanced)) consumer를 Camel 라우팅 에러 핸들러에 브리지할 수 있게 해 줘요. 그러면 Camel consumer가 들어오는 메시지를 가져오는 동안 발생한 예외 등을 (가능한 경우) 메시지로 처리해 라우팅 에러 핸들러가 다루게 돼요. 중요: 서드파티 컴포넌트가 예외 발생을 Camel에 알릴 수 있어야만 가능해요. 일부 컴포넌트는 이를 내부에서만 처리하기 때문에 bridgeErrorHandler를 쓸 수 없어요. 다른 상황에서는 Camel 컴포넌트가 서드파티 컴포넌트에 후킹해 이를 가능하게끔 개선될 수 있습니다. 기본으로 consumer는 org.apache.camel.spi.ExceptionHandler로 예외를 다뤄 WARN 또는 ERROR 레벨로 기록하고 무시해요. false boolean
exceptionHandler (consumer (advanced)) consumer가 커스텀 ExceptionHandler를 쓰도록 해요. bridgeErrorHandler 옵션이 켜져 있으면 이 옵션은 사용되지 않는다는 점에 유의하세요. 기본으로 consumer는 예외를 직접 다뤄 WARN 또는 ERROR 레벨로 기록하고 무시해요. ExceptionHandler
exchangePattern (consumer (advanced))
consumer가 exchange를 만들 때 설정할 exchange 패턴이에요.

Enum values:

  • InOnly

  • InOut

| | ExchangePattern | | pollStrategy (consumer (advanced)) | Exchange가 만들어져 Camel에서 라우팅되기 전 폴링 작업 중에 보통 발생하는 에러 처리를 제어할 수 있도록 커스텀 구현을 제공하게 해 주는 플러그 가능한 org.apache.camel.PollingConsumerPollingStrategy예요. | | PollingConsumerPollStrategy | | lazyStartProducer (producer (advanced)) | producer를 lazy(첫 메시지 시점)로 시작할지 여부예요. lazy 시작을 쓰면 producer가 시작 중 실패해서 라우트 시작이 실패하는 상황에서도 CamelContext와 라우트를 시작할 수 있고, 시작 실패 처리를 Camel의 라우팅 에러 핸들러로 넘길 수 있어요. 다만 첫 메시지를 처리하는 시점에 producer를 만들고 시작하는 데 시간이 조금 걸려 전체 처리 시간이 길어질 수 있다는 점은 유의하세요. | false | boolean | | backoffErrorThreshold (scheduler) | backoffMultipler가 작동하기 전에 연속으로 발생해야 하는 에러 폴링(오류로 실패한 폴링) 횟수예요. | | int | | backoffIdleThreshold (scheduler) | backoffMultipler가 작동하기 전에 연속으로 발생해야 하는 유휴(idle) 폴링 횟수예요. | | int | | backoffMultiplier (scheduler) | 연속으로 유휴/에러가 여러 번 이어졌을 때 예약 폴링 consumer가 백오프하도록 해요. multiplier는 다음 실제 시도가 일어나기 전에 건너뛸 폴링 횟수예요. 이 옵션을 쓸 때는 backoffIdleThreshold와/또는 backoffErrorThreshold도 함께 설정해야 해요. | | int | | delay (scheduler) | 다음 폴링 전까지의 밀리초예요. | 500 | long | | greedy (scheduler) | greedy가 켜져 있으면, 이전 실행에서 1개 이상의 메시지를 폴링했을 때 ScheduledPollConsumer가 다시 즉시 실행돼요. | false | boolean | | initialDelay (scheduler) | 첫 폴링이 시작되기 전의 밀리초예요. | 1000 | long | | repeatCount (scheduler) | 실행(fire) 횟수의 최대 한도를 지정해요. 1로 설정하면 스케줄러는 한 번만 실행되고, 5로 설정하면 다섯 번만 실행돼요. 0이나 음수는 계속 실행한다는 뜻이에요. | 0 | long | | runLoggingLevel (scheduler) |

consumer가 폴링할 때 시작/완료 로그 한 줄을 기록해요. 이 옵션으로 그 로깅 레벨을 설정할 수 있어요.

Enum values:

  • TRACE

  • DEBUG

  • INFO

  • WARN

  • ERROR

  • OFF

| TRACE | LoggingLevel | | scheduledExecutorService (scheduler) | consumer에 쓸 커스텀/공유 스레드 풀을 설정할 수 있게 해 줘요. 기본으로 각 consumer는 자체 단일 스레드 풀을 가져요. | | ScheduledExecutorService | | scheduler (scheduler) | camel-spring이나 camel-quartz 컴포넌트의 cron 스케줄러를 사용해요. 내장 스케줄러에는 spring 또는 quartz 값을 쓰세요. | none | Object | | schedulerProperties (scheduler) | 커스텀 스케줄러나 Quartz, Spring 기반 스케줄러를 쓸 때 추가 프로퍼티를 설정해요. 접두사가 scheduler인 다중 값 옵션이에요. | | Map | | startScheduler (scheduler) | 스케줄러를 자동으로 시작할지 여부예요. | true | boolean | | timeUnit (scheduler) |

initialDelay와 delay 옵션의 시간 단위예요.

Enum values:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

| MILLISECONDS | TimeUnit | | useFixedDelay (scheduler) | 고정 지연(fixed delay)을 쓸지 고정 주기(fixed rate)를 쓸지 제어해요. 자세한 내용은 JDK의 ScheduledExecutorService를 보세요. | true | boolean | | accessToken (security) | OAuth 2 액세스 토큰이에요. 보통 1시간 후 만료되므로 장기 사용에는 refreshToken이 좋아요. | | String | | clientSecret (security) | 캘린더 애플리케이션의 Client secret이에요. | | String | | emailAddress (security) | Google 서비스 계정의 emailAddress예요. | | String | | p12FileName (security) | Google 서비스 계정과 함께 쓸 프라이빗 키가 담긴 p12 파일의 이름이에요. | | String | | refreshToken (security) | OAuth 2 리프레시 토큰이에요. 이걸 쓰면 Google Calendar 컴포넌트가 현재 토큰이 만료될 때마다 새 accessToken을 얻을 수 있어요 — 애플리케이션이 오래 동작한다면 필수예요. | | String | | serviceAccountKey (security) | 애플리케이션을 서비스 계정으로 인증할 때 쓰는 JSON 형식의 서비스 계정 키예요. base64: 접두사를 붙여 base64를 받아들여요. | | String | | user (security) | 서비스 계정 플로우에서 애플리케이션이 사칭(impersonate)하려는 사용자의 이메일 주소예요. | | String |

API 파라미터 (API Parameters, 7개 API)

Google Calendar 엔드포인트는 API 기반 컴포넌트라서 어떤 API 이름과 API 메서드를 쓰느냐에 따라 추가 파라미터가 붙어요. API 이름과 API 메서드는 엔드포인트 URI에서 apiName/methodName path 파라미터로 지정해요:

google-calendar:apiName/methodName

API 이름은 아래 표에 나온 것처럼 7개가 있어요:

API Name Type Description
acl Both acl 메서드 컬렉션이에요
calendars Both calendars 메서드 컬렉션이에요
channels Both channels 메서드 컬렉션이에요
events Both events 메서드 컬렉션이에요
freebusy Both freebusy 메서드 컬렉션이에요
list Both calendarList 메서드 컬렉션이에요
settings Both settings 메서드 컬렉션이에요

각 API는 아래 이어지는 섹션에서 하나씩 자세히 설명해요.

API: acl

producer와 consumer 모두 지원해요

acl API의 문법은 다음과 같이 정의돼 있어요:

google-calendar:acl/methodName?[parameters]

7개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)

Method Alias Description
delete 접근 제어 규칙(access control rule)을 삭제해요
get 접근 제어 규칙을 반환해요
insert 접근 제어 규칙을 만들어요
list 캘린더의 접근 제어 목록에 있는 규칙들을 반환해요
patch 접근 제어 규칙을 업데이트해요
update 접근 제어 규칙을 업데이트해요
watch ACL 리소스의 변경을 감시(watch)해요

delete 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Acl.Delete delete(String calendarId, String ruleId);

google-calendar/delete API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
ruleId ACL 규칙 식별자예요 String

get 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Acl.Get get(String calendarId, String ruleId);

google-calendar/get API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
ruleId ACL 규칙 식별자예요 String

insert 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Acl.Insert insert(String calendarId, com.google.api.services.calendar.model.AclRule content);

google-calendar/insert API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
content The com.google.api.services.calendar.model.AclRule AclRule
sendNotifications 캘린더 공유 변경에 대한 알림을 보낼지 여부예요 Boolean

list 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Acl.List list(String calendarId);

google-calendar/list API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
maxResults 한 결과 페이지에서 반환되는 최대 항목 수예요 Integer
pageToken 반환할 결과 페이지를 지정하는 토큰이에요 String
showDeleted 결과에 삭제된 ACL을 포함할지 여부예요 Boolean
syncToken 이전 list 요청의 마지막 결과 페이지에서 반환된 nextSyncToken 필드에서 얻은 토큰이에요 String

patch 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Acl.Patch patch(String calendarId, String ruleId, com.google.api.services.calendar.model.AclRule content);

google-calendar/patch API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
content The com.google.api.services.calendar.model.AclRule AclRule
ruleId ACL 규칙 식별자예요 String
sendNotifications 캘린더 공유 변경에 대한 알림을 보낼지 여부예요 Boolean

update 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Acl.Update update(String calendarId, String ruleId, com.google.api.services.calendar.model.AclRule content);

google-calendar/update API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
content The com.google.api.services.calendar.model.AclRule AclRule
ruleId ACL 규칙 식별자예요 String
sendNotifications 캘린더 공유 변경에 대한 알림을 보낼지 여부예요 Boolean

watch 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Acl.Watch watch(String calendarId, com.google.api.services.calendar.model.Channel content);

google-calendar/watch API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
contentChannel The com.google.api.services.calendar.model.Channel Channel
maxResults 한 결과 페이지에서 반환되는 최대 항목 수예요 Integer
pageToken 반환할 결과 페이지를 지정하는 토큰이에요 String
showDeleted 결과에 삭제된 ACL을 포함할지 여부예요 Boolean
syncToken 이전 list 요청의 마지막 결과 페이지에서 반환된 nextSyncToken 필드에서 얻은 토큰이에요 String

위 파라미터 외에도 google-calendar API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.

파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelGoogleCalendar.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelGoogleCalendar.myParameterNameHere 헤더를 덮어써요.

API: calendars

producer와 consumer 모두 지원해요

calendars API의 문법은 다음과 같이 정의돼 있어요:

google-calendar:calendars/methodName?[parameters]

6개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)

Method Alias Description
clear 기본 캘린더를 비워요(clear)
delete 보조 캘린더(secondary calendar)를 삭제해요
get 캘린더의 메타데이터를 반환해요
insert 보조 캘린더를 만들어요
patch 캘린더의 메타데이터를 업데이트해요
update 캘린더의 메타데이터를 업데이트해요

clear 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Calendars.Clear clear(String calendarId);

google-calendar/clear API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String

delete 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Calendars.Delete delete(String calendarId);

google-calendar/delete API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String

get 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Calendars.Get get(String calendarId);

google-calendar/get API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String

insert 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Calendars.Insert insert(com.google.api.services.calendar.model.Calendar content);

google-calendar/insert API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
content The com.google.api.services.calendar.model.Calendar Calendar

patch 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Calendars.Patch patch(String calendarId, com.google.api.services.calendar.model.Calendar content);

google-calendar/patch API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
content The com.google.api.services.calendar.model.Calendar Calendar

update 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Calendars.Update update(String calendarId, com.google.api.services.calendar.model.Calendar content);

google-calendar/update API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
content The com.google.api.services.calendar.model.Calendar Calendar

위 파라미터 외에도 google-calendar API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.

파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelGoogleCalendar.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelGoogleCalendar.myParameterNameHere 헤더를 덮어써요.

API: channels

producer와 consumer 모두 지원해요

channels API의 문법은 다음과 같이 정의돼 있어요:

google-calendar:channels/methodName?[parameters]

1개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)

Method Alias Description
stop 이 채널을 통한 리소스 감시를 중단해요

stop 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Channels.Stop stop(com.google.api.services.calendar.model.Channel content);

google-calendar/stop API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
contentChannel The com.google.api.services.calendar.model.Channel Channel

위 파라미터 외에도 google-calendar API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.

파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelGoogleCalendar.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelGoogleCalendar.myParameterNameHere 헤더를 덮어써요.

API: events

producer와 consumer 모두 지원해요

events API의 문법은 다음과 같이 정의돼 있어요:

google-calendar:events/methodName?[parameters]

11개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)

Method Alias Description
calendarImport 이벤트를 가져와요(import)
delete 이벤트를 삭제해요
get Google Calendar ID를 기준으로 이벤트를 반환해요
insert 이벤트를 만들어요
instances 지정한 반복 이벤트의 인스턴스들을 반환해요
list 지정한 캘린더의 이벤트들을 반환해요
move 이벤트를 다른 캘린더로 옮겨요
patch 이벤트를 업데이트해요
quickAdd 간단한 문자열을 기반으로 이벤트를 만들어요
update 이벤트를 업데이트해요
watch Events 리소스의 변경을 감시(watch)해요

calendarImport 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Events.CalendarImport calendarImport(String calendarId, com.google.api.services.calendar.model.Event content);

google-calendar/calendarImport API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
conferenceDataVersion API 클라이언트가 지원하는 컨퍼런스 데이터의 버전 번호예요 Integer
content The com.google.api.services.calendar.model.Event Event
supportsAttachments 연산을 수행하는 API 클라이언트가 이벤트 첨부 파일을 지원하는지 여부예요 Boolean

delete 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Events.Delete delete(String calendarId, String eventId);

google-calendar/delete API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
eventId 이벤트 식별자예요 String
sendNotifications 지원 중단(deprecated)됐어요 Boolean
sendUpdates 이벤트 삭제에 대한 알림을 받아야 할 게스트예요 String

get 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Events.Get get(String calendarId, String eventId);

google-calendar/get API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
alwaysIncludeEmail 지원 중단(deprecated)됐고 무시돼요 Boolean
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
eventId 이벤트 식별자예요 String
maxAttendees 응답에 포함할 참석자의 최대 수예요 Integer
timeZone 응답에 사용된 시간대예요 String

insert 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Events.Insert insert(String calendarId, com.google.api.services.calendar.model.Event content);

google-calendar/insert API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
conferenceDataVersion API 클라이언트가 지원하는 컨퍼런스 데이터의 버전 번호예요 Integer
content The com.google.api.services.calendar.model.Event Event
maxAttendees 응답에 포함할 참석자의 최대 수예요 Integer
sendNotifications 지원 중단(deprecated)됐어요 Boolean
sendUpdates 새 이벤트 생성에 대한 알림을 보낼지 여부예요 String
supportsAttachments 연산을 수행하는 API 클라이언트가 이벤트 첨부 파일을 지원하는지 여부예요 Boolean

instances 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Events.Instances instances(String calendarId, String eventId);

google-calendar/instances API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
alwaysIncludeEmail 지원 중단(deprecated)됐고 무시돼요 Boolean
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
eventId 반복 이벤트 식별자예요 String
maxAttendees 응답에 포함할 참석자의 최대 수예요 Integer
maxResults 한 결과 페이지에서 반환되는 최대 이벤트 수예요 Integer
originalStart 결과에 있는 인스턴스의 원래 시작 시간이에요 String
pageToken 반환할 결과 페이지를 지정하는 토큰이에요 String
showDeleted 결과에 삭제된 이벤트(상태가 cancelled인)를 포함할지 여부예요 Boolean
timeMax 필터링할 이벤트 시작 시간의 상한(초과)이에요 DateTime
timeMin 필터링할 이벤트 종료 시간의 하한(이상)이에요 DateTime
timeZone 응답에 사용된 시간대예요 String

list 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Events.List list(String calendarId);

google-calendar/list API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
alwaysIncludeEmail 지원 중단(deprecated)됐고 무시돼요 Boolean
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
eventTypes 반환할 이벤트 타입이에요 List
iCalUID 응답에 제공할 iCalendar 형식의 이벤트 ID를 지정해요 String
maxAttendees 응답에 포함할 참석자의 최대 수예요 Integer
maxResults 한 결과 페이지에서 반환되는 최대 이벤트 수예요 Integer
orderBy 결과에서 반환되는 이벤트의 순서예요 String
pageToken 반환할 결과 페이지를 지정하는 토큰이에요 String
privateExtendedProperty propertyName=value 형태로 지정한 확장 속성 제약조건이에요 List
q 다음 필드에서 이 검색어와 일치하는 이벤트를 찾는 자유 텍스트 검색어예요: - summary - description - location - attendee’s displayName - attendee’s email - organizer’s displayName - organizer’s email - workingLocationProperties String
sharedExtendedProperty propertyName=value 형태로 지정한 확장 속성 제약조건이에요 List
showDeleted 결과에 삭제된 이벤트(상태가 cancelled인)를 포함할지 여부예요 Boolean
showHiddenInvitations 결과에 숨겨진 초대를 포함할지 여부예요 Boolean
singleEvents 반복 이벤트를 인스턴스로 펼쳐 일회성 이벤트와 반복 이벤트의 인스턴스만 반환할지 여부예요(반복 이벤트 자체는 제외해요) Boolean
syncToken 이전 list 요청의 마지막 결과 페이지에서 반환된 nextSyncToken 필드에서 얻은 토큰이에요 String
timeMax 필터링할 이벤트 시작 시간의 상한(초과)이에요 DateTime
timeMin 필터링할 이벤트 종료 시간의 하한(초과)이에요 DateTime
timeZone 응답에 사용된 시간대예요 String
updatedMin 필터링할 이벤트 마지막 수정 시간(RFC3339 타임스탬프)의 하한이에요 DateTime

move 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Events.Move move(String calendarId, String eventId, String destination);

google-calendar/move API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 이벤트가 현재 있는 원본 캘린더의 식별자예요 String
destination 이벤트를 옮겨 갈 대상 캘린더의 식별자예요 String
eventId 이벤트 식별자예요 String
sendNotifications 지원 중단(deprecated)됐어요 Boolean
sendUpdates 이벤트 주최자(organizer) 변경에 대한 알림을 받아야 할 게스트예요 String

patch 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Events.Patch patch(String calendarId, String eventId, com.google.api.services.calendar.model.Event content);

google-calendar/patch API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
alwaysIncludeEmail 지원 중단(deprecated)됐고 무시돼요 Boolean
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
conferenceDataVersion API 클라이언트가 지원하는 컨퍼런스 데이터의 버전 번호예요 Integer
content The com.google.api.services.calendar.model.Event Event
eventId 이벤트 식별자예요 String
maxAttendees 응답에 포함할 참석자의 최대 수예요 Integer
sendNotifications 지원 중단(deprecated)됐어요 Boolean
sendUpdates 이벤트 업데이트에 대한 알림을 받아야 할 게스트예요(예: 제목 변경 등 String
supportsAttachments 연산을 수행하는 API 클라이언트가 이벤트 첨부 파일을 지원하는지 여부예요 Boolean

quickAdd 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Events.QuickAdd quickAdd(String calendarId, String text);

google-calendar/quickAdd API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
sendNotifications 지원 중단(deprecated)됐어요 Boolean
sendUpdates 새 이벤트 생성에 대한 알림을 받아야 할 게스트예요 String
text 만들 이벤트를 설명하는 텍스트예요 String

update 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Events.Update update(String calendarId, String eventId, com.google.api.services.calendar.model.Event content);

google-calendar/update API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
alwaysIncludeEmail 지원 중단(deprecated)됐고 무시돼요 Boolean
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
conferenceDataVersion API 클라이언트가 지원하는 컨퍼런스 데이터의 버전 번호예요 Integer
content The com.google.api.services.calendar.model.Event Event
eventId 이벤트 식별자예요 String
maxAttendees 응답에 포함할 참석자의 최대 수예요 Integer
sendNotifications 지원 중단(deprecated)됐어요 Boolean
sendUpdates 이벤트 업데이트에 대한 알림을 받아야 할 게스트예요(예: 제목 변경 등 String
supportsAttachments 연산을 수행하는 API 클라이언트가 이벤트 첨부 파일을 지원하는지 여부예요 Boolean

watch 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Events.Watch watch(String calendarId, com.google.api.services.calendar.model.Channel content);

google-calendar/watch API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
alwaysIncludeEmail 지원 중단(deprecated)됐고 무시돼요 Boolean
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
contentChannel The com.google.api.services.calendar.model.Channel Channel
eventTypes 반환할 이벤트 타입이에요 List
iCalUID 응답에 제공할 iCalendar 형식의 이벤트 ID를 지정해요 String
maxAttendees 응답에 포함할 참석자의 최대 수예요 Integer
maxResults 한 결과 페이지에서 반환되는 최대 이벤트 수예요 Integer
orderBy 결과에서 반환되는 이벤트의 순서예요 String
pageToken 반환할 결과 페이지를 지정하는 토큰이에요 String
privateExtendedProperty propertyName=value 형태로 지정한 확장 속성 제약조건이에요 List
q 다음 필드에서 이 검색어와 일치하는 이벤트를 찾는 자유 텍스트 검색어예요: - summary - description - location - attendee’s displayName - attendee’s email - organizer’s displayName - organizer’s email - workingLocationProperties String
sharedExtendedProperty propertyName=value 형태로 지정한 확장 속성 제약조건이에요 List
showDeleted 결과에 삭제된 이벤트(상태가 cancelled인)를 포함할지 여부예요 Boolean
showHiddenInvitations 결과에 숨겨진 초대를 포함할지 여부예요 Boolean
singleEvents 반복 이벤트를 인스턴스로 펼쳐 일회성 이벤트와 반복 이벤트의 인스턴스만 반환할지 여부예요(반복 이벤트 자체는 제외해요) Boolean
syncToken 이전 list 요청의 마지막 결과 페이지에서 반환된 nextSyncToken 필드에서 얻은 토큰이에요 String
timeMax 필터링할 이벤트 시작 시간의 상한(초과)이에요 DateTime
timeMin 필터링할 이벤트 종료 시간의 하한(초과)이에요 DateTime
timeZone 응답에 사용된 시간대예요 String
updatedMin 필터링할 이벤트 마지막 수정 시간(RFC3339 타임스탬프)의 하한이에요 DateTime

위 파라미터 외에도 google-calendar API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.

파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelGoogleCalendar.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelGoogleCalendar.myParameterNameHere 헤더를 덮어써요.

API: freebusy

producer와 consumer 모두 지원해요

freebusy API의 문법은 다음과 같이 정의돼 있어요:

google-calendar:freebusy/methodName?[parameters]

1개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)

Method Alias Description
query 여러 캘린더의 한가함/바쁨(free/busy) 정보를 반환해요

query 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Freebusy.Query query(com.google.api.services.calendar.model.FreeBusyRequest content);

google-calendar/query API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
content The com.google.api.services.calendar.model.FreeBusyRequest FreeBusyRequest

위 파라미터 외에도 google-calendar API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.

파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelGoogleCalendar.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelGoogleCalendar.myParameterNameHere 헤더를 덮어써요.

API: list

producer와 consumer 모두 지원해요

list API의 문법은 다음과 같이 정의돼 있어요:

google-calendar:list/methodName?[parameters]

7개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)

Method Alias Description
delete 사용자의 캘린더 목록에서 캘린더를 제거해요
get 사용자의 캘린더 목록에서 캘린더를 반환해요
insert 기존 캘린더를 사용자의 캘린더 목록에 넣어요
list 사용자의 캘린더 목록에 있는 캘린더들을 반환해요
patch 사용자의 캘린더 목록에 있는 기존 캘린더를 업데이트해요
update 사용자의 캘린더 목록에 있는 기존 캘린더를 업데이트해요
watch CalendarList 리소스의 변경을 감시(watch)해요

delete 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.CalendarList.Delete delete(String calendarId);

google-calendar/delete API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String

get 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.CalendarList.Get get(String calendarId);

google-calendar/get API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String

insert 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.CalendarList.Insert insert(com.google.api.services.calendar.model.CalendarListEntry content);

google-calendar/insert API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
colorRgbFormat 캘린더 색상(RGB)을 기록할 때 foregroundColor와 backgroundColor 필드를 사용할지 여부예요 Boolean
content The com.google.api.services.calendar.model.CalendarListEntry CalendarListEntry

list 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.CalendarList.List list();

google-calendar/list API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
maxResults 한 결과 페이지에서 반환되는 최대 항목 수예요 Integer
minAccessRole 반환되는 항목에서 사용자의 최소 접근 역할이에요 String
pageToken 반환할 결과 페이지를 지정하는 토큰이에요 String
showDeleted 결과에 삭제된 캘린더 목록 항목을 포함할지 여부예요 Boolean
showHidden 숨겨진 항목을 보여줄지 여부예요 Boolean
syncToken 이전 list 요청의 마지막 결과 페이지에서 반환된 nextSyncToken 필드에서 얻은 토큰이에요 String

patch 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.CalendarList.Patch patch(String calendarId, com.google.api.services.calendar.model.CalendarListEntry content);

google-calendar/patch API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
colorRgbFormat 캘린더 색상(RGB)을 기록할 때 foregroundColor와 backgroundColor 필드를 사용할지 여부예요 Boolean
content The com.google.api.services.calendar.model.CalendarListEntry CalendarListEntry

update 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.CalendarList.Update update(String calendarId, com.google.api.services.calendar.model.CalendarListEntry content);

google-calendar/update API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
calendarId 캘린더 식별자예요. 캘린더 ID를 가져오려면 calendarList.list 메서드를 호출해요. 현재 로그인한 사용자의 기본 캘린더에 접근하려면 primary 키워드를 쓰세요. String
colorRgbFormat 캘린더 색상(RGB)을 기록할 때 foregroundColor와 backgroundColor 필드를 사용할지 여부예요 Boolean
content The com.google.api.services.calendar.model.CalendarListEntry CalendarListEntry

watch 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.CalendarList.Watch watch(com.google.api.services.calendar.model.Channel content);

google-calendar/watch API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
contentChannel The com.google.api.services.calendar.model.Channel Channel
maxResults 한 결과 페이지에서 반환되는 최대 항목 수예요 Integer
minAccessRole 반환되는 항목에서 사용자의 최소 접근 역할이에요 String
pageToken 반환할 결과 페이지를 지정하는 토큰이에요 String
showDeleted 결과에 삭제된 캘린더 목록 항목을 포함할지 여부예요 Boolean
showHidden 숨겨진 항목을 보여줄지 여부예요 Boolean
syncToken 이전 list 요청의 마지막 결과 페이지에서 반환된 nextSyncToken 필드에서 얻은 토큰이에요 String

위 파라미터 외에도 google-calendar API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.

파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelGoogleCalendar.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelGoogleCalendar.myParameterNameHere 헤더를 덮어써요.

API: settings

producer와 consumer 모두 지원해요

settings API의 문법은 다음과 같이 정의돼 있어요:

google-calendar:settings/methodName?[parameters]

3개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)

Method Alias Description
get 사용자 설정 하나를 반환해요
list 인증된 사용자의 모든 사용자 설정을 반환해요
watch Settings 리소스의 변경을 감시(watch)해요

get 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Settings.Get get(String setting);

google-calendar/get API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
setting 사용자 설정의 id예요 String

list 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Settings.List list();

google-calendar/list API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
maxResults 한 결과 페이지에서 반환되는 최대 항목 수예요 Integer
pageToken 반환할 결과 페이지를 지정하는 토큰이에요 String
syncToken 이전 list 요청의 마지막 결과 페이지에서 반환된 nextSyncToken 필드에서 얻은 토큰이에요 String

watch 메서드

시그니처:

  • com.google.api.services.calendar.Calendar.Settings.Watch watch(com.google.api.services.calendar.model.Channel content);

google-calendar/watch API 메서드의 파라미터는 아래 표에 정리돼 있어요:

Parameter Description Type
contentChannel The com.google.api.services.calendar.model.Channel Channel
maxResults 한 결과 페이지에서 반환되는 최대 항목 수예요 Integer
pageToken 반환할 결과 페이지를 지정하는 토큰이에요 String
syncToken 이전 list 요청의 마지막 결과 페이지에서 반환된 nextSyncToken 필드에서 얻은 토큰이에요 String

위 파라미터 외에도 google-calendar API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.

파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelGoogleCalendar.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelGoogleCalendar.myParameterNameHere 헤더를 덮어써요.

참고 이 컴포넌트는 API 기반이라서 엔드포인트 옵션 외에 호출별 파라미터를 Camel 접두사가 붙은 exchange 헤더로도 넘길 수 있어요. 라우트가 신뢰할 수 없는 producer에서 온 메시지를 소비한다면, 메시지가 이 컴포넌트에 닿기 전에 신뢰 경계(trust boundary)에서 내부 헤더를 걷어내세요 — 예를 들어 removeHeaders("Camel*")를 쓰면 돼요 — 그래야 보낸 쪽이 API 호출을 덮어쓸 수 없습니다. 자세한 내용은 Camel 보안 모델 문서를 보세요.

더 알아보기 (Learn more)

각 API(acl, calendars, channels, events, freebusy, list, settings)의 메서드와 파라미터는 위 본문의 표에서 확인할 수 있어요. OAuth 자격 증명 생성 방법이 궁금하면 Google Calendar 인증 문서를 참고하고, 컴포넌트 옵션 전체 목록은 Google Calendar 컴포넌트 문서에서 볼 수 있습니다. 의존성 좌표는 위의 의존성 섹션 그대로 camel-google-calendar 아티팩트를 쓰면 돼요.