第59章 GoogleCalendar


GoogleCalendar コンポーネント

Camel 2.15 以降で利用可能

コンポーネントの説明

Google Calendar コンポーネントは、Google カレンダー Web API 経由で Google カレンダー へのアクセスを提供します
Google カレンダーは、OAuth 2.0 プロトコル を使用して Google アカウントを認証し、ユーザーデータへのアクセスを承認します。このコンポーネントを使用する前に、アカウントを作成し、OAuth クレデンシャル を生成 する必要があります。認証情報は、clientId、clientSecret、および refreshToken で設定されます。有効期間の長い refreshToken を生成するための便利なリソースは OAuth プレイグラウンドです
Maven ユーザーは、このコンポーネントの pom.xml に以下の依存関係を追加する必要があります。
    <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-google-calendar</artifactId>
            <version>2.17.0.redhat-630xxx</version>
    </dependency>
Copy to Clipboard Toggle word wrap

URI 形式

GoogleCalendar コンポーネントは以下の URI 形式を使用します。
google-calendar://endpoint-prefix/endpoint?[options]
Copy to Clipboard Toggle word wrap
エンドポイント接頭辞は以下のいずれかになります。
  • acl
  • calendars
  • channels
  • colors
  • events
  • freebusy
  • list
  • settings

GoogleCalendarComponent

GoogleCalendar コンポーネントは、以下のオプションで設定できます。これらのオプションは、タイプ org.apache.camel.component.google.calendar.GoogleCalendarConfiguration のコンポーネントの Bean プロパティー configuration を使用して提供できます。
Expand
オプション タイプ
accessToken String OAuth 2 アクセストークン通常、これは 1 時間後に期限切れになるため、長期間の使用には refreshToken が推奨されます。
applicationName String Google カレンダーアプリケーション名。たとえば、camel-google-calendar/1.0 です。
clientId String カレンダーアプリケーションのクライアント ID。
clientSecret String カレンダーアプリケーションのクライアントシークレット。
refreshToken
String
OAuth2 更新トークン。このトークンを使用すると、Google カレンダーコンポーネントは現在の有効期限が切れるたびに新しい accessToken を取得できます。アプリケーションが長期間使用する場合は必要となります。
scopes List<String> カレンダーアプリケーションでユーザーアカウントに必要なパーミッションのレベルを指定します。詳細は、https://developers.google.com/google-apps/calendar/auth を参照してください。
emailAddress String
Camel 2.16.0: Google Service Account の emailAddress
p12FileName String
Camel 2.16.0: Google サービスアカウントで使用する秘密鍵を持つ .p12 ファイルの名前。

プロデューサーエンドポイント

プロデューサーエンドポイントはエンドポイント接頭辞を使用し、続いてエンドポイント名と以下で説明する関連オプションを使用できます。一部のエンドポイントには、短縮エイリアスを使用できます。エンドポイント URI には 接頭辞が含まれている必要があります。
必須ではないエンドポイントオプションは [] で示されます。エンドポイントに必須のオプションがない場合は、[] オプションのセットの 1 つを指定する必要があります。プロデューサーエンドポイントは、Camel Exchange In メッセージに含まれる値を持つ endpoint オプションの名前が含まれる必要がある特別なオプション inBody を使用することもできます。
エンドポイントオプションは、エンドポイント URI またはメッセージヘッダーで動的に指定できます。メッセージヘッダー名は CamelGoogleCalendar.<option> の形式である必要があります。inBody オプションはメッセージヘッダーを上書きすることに注意してください。つまり、エンドポイントオプション inBody=optionCamelGoogleCalendar.option ヘッダーを上書きすることに注意してください。

1.エンドポイント接頭辞 acl

以下のエンドポイントは、以下のように接頭辞 acl で呼び出すことができます。
google-calendar://acl/endpoint?[options]
Copy to Clipboard Toggle word wrap
Expand
エンドポイント 短縮形エイリアス オプション 結果ボディーのタイプ
delete calendarId, ruleId
get calendarId, ruleId com.google.api.services.calendar.model.AclRule
insert calendarId, content com.google.api.services.calendar.model.AclRule
list calendarId com.google.api.services.calendar.model.Acl
patch calendarId、content、ruleId com.google.api.services.calendar.model.AclRule
update calendarId、content、ruleId com.google.api.services.calendar.model.AclRule
watch calendarId, contentChannel com.google.api.services.calendar.model.Channel

aclの URI オプション

Expand
名前 タイプ
calendarId 文字列
content com.google.api.services.calendar.model.AclRule
contentChannel com.google.api.services.calendar.model.Channel
ruleId 文字列

2.エンドポイント接頭辞 カレンダー

以下のエンドポイントは、以下のように接頭辞 calendars で呼び出すことができます。
google-calendar://calendars/endpoint?[options]
Copy to Clipboard Toggle word wrap
Expand
エンドポイント 短縮形エイリアス オプション 結果ボディーのタイプ
clear calendarId
delete calendarId
get calendarId com.google.api.services.calendar.Calendar
insert content com.google.api.services.calendar.Calendar
patch calendarId, content com.google.api.services.calendar.Calendar
update calendarId, content com.google.api.services.calendar.Calendar

カレンダーの URI オプション

Expand
名前 タイプ
calendarId 文字列
content com.google.api.services.calendar.model.Calendar

3.エンドポイント接頭辞 チャネル

以下のエンドポイントは、以下のように接頭辞 channels で呼び出すことができます。
google-calendar://channels/endpoint?[options]
Copy to Clipboard Toggle word wrap
Expand
エンドポイント 短縮形エイリアス オプション 結果ボディーのタイプ
stop contentChannel

チャネルの URI オプション

Expand
名前 タイプ
contentChannel com.google.api.services.calendar.model.Channel

4.エンドポイント接頭辞の 色

以下のエンドポイントは、以下のように接頭辞 colors で呼び出すことができます。
google-calendar://colors/endpoint?[options]
Copy to Clipboard Toggle word wrap
Expand
エンドポイント 短縮形エイリアス オプション 結果ボディーのタイプ
get com.google.api.services.calendar.model.Colors

色の URI オプション

Expand
名前 タイプ

5.エンドポイント接頭辞 イベント

以下のエンドポイントは、以下のように接頭辞 events で呼び出すことができます。
        google-calendar://events/endpoint?[options]
Copy to Clipboard Toggle word wrap
Expand
エンドポイント 短縮形エイリアス オプション 結果ボディーのタイプ
calendarImport calendarId, content com.google.api.services.calendar.model.Event
delete calendarId, eventId
get calendarId, eventId com.google.api.services.calendar.model.Event
insert calendarId, content com.google.api.services.calendar.model.Event
instances calendarId, eventId com.google.api.services.calendar.model.Events
list calendarId com.google.api.services.calendar.model.Events
move calendarId、destination、eventId com.google.api.services.calendar.model.Event
patch calendarId、content、eventId com.google.api.services.calendar.model.Event
quickAdd calendarId, text com.google.api.services.calendar.model.Event
update calendarId、content、eventId com.google.api.services.calendar.model.Event
watch calendarId, contentChannel com.google.api.services.calendar.model.Channel

イベントの URI オプション

Expand
名前 タイプ
calendarId 文字列
content com.google.api.services.calendar.model.Event
contentChannel com.google.api.services.calendar.model.Channel
destination 文字列
eventId 文字列
text 文字列

6.エンドポイント接頭辞 freebusy

以下のエンドポイントは、以下のように接頭辞 freebusy で呼び出すことができます。
        google-calendar://freebusy/endpoint?[options]
Copy to Clipboard Toggle word wrap
Expand
エンドポイント 短縮形エイリアス オプション 結果ボディーのタイプ
query content com.google.api.services.calendar.model.FreeBusyResponse

freebusyの URI オプション

Expand
名前 タイプ
content com.google.api.services.calendar.model.FreeBusyRequest

7.endpoint Prefix list

以下のエンドポイントは、以下のように接頭辞 list で呼び出すことができます。
google-calendar://list/endpoint?[options]
Copy to Clipboard Toggle word wrap
Expand
エンドポイント 短縮形エイリアス オプション 結果ボディーのタイプ
delete calendarId
get calendarId com.google.api.services.calendar.model.CalendarListEntry
insert content com.google.api.services.calendar.model.CalendarListEntry
list com.google.api.services.calendar.model.CalendarList
patch calendarId, content com.google.api.services.calendar.model.CalendarListEntry
update calendarId, content com.google.api.services.calendar.model.CalendarListEntry
watch contentChannel com.google.api.services.calendar.model.Channel

listの URI オプション

Expand
名前 タイプ
calendarId 文字列
content com.google.api.services.calendar.model.CalendarListEntry
contentChannel com.google.api.services.calendar.model.Channel

8.エンドポイント接頭辞の 設定

以下のエンドポイントは、以下のように接頭辞 settings で呼び出すことができます。
        google-calendar://settings/endpoint?[options]
Copy to Clipboard Toggle word wrap
Expand
エンドポイント 短縮形エイリアス オプション 結果ボディーのタイプ
get 設定 com.google.api.services.calendar.model.Setting
list com.google.api.services.calendar.model.Settings
watch contentChannel com.google.api.services.calendar.model.Channel

設定の URI オプション

Expand
名前 タイプ
contentChannel com.google.api.services.calendar.model.Channel
設定 文字列

コンシューマーエンドポイント

プロデューサーエンドポイントはいずれもコンシューマーエンドポイントとして使用できます。コンシューマーエンドポイントは、consumer. 接頭辞が付い た Scheduled Poll Consumer オプション を使用して、エンドポイントの呼び出しをスケジュールできます。配列またはコレクションを返すコンシューマーエンドポイントは、要素ごとにエクスチェンジを 1 つ生成し、それらのルートはエクスチェンジごとに 1 回実行されます。

メッセージヘッダー

URI オプションは、CamelGoogleCalendar. 接頭辞が付いたプロデューサーエンドポイントのメッセージヘッダーで指定できます。

メッセージボディー

すべての結果メッセージ本文は、GoogleCalendarComponent によって使用される基礎となる API によって提供されるオブジェクトを使用します。プロデューサーエンドポイントは、inBody エンドポイント URI パラメーターに受信メッセージボディーのオプション名を指定できます。配列またはコレクションを返すエンドポイントの場合、コンシューマーエンドポイントはすべての要素を個別のメッセージにマップします。
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat