You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/03/09 15:52:00 UTC

[camel-kamelets] 02/02: Added Google Calendar Stream source Kamelet

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch calendar
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 2ac3852f3c8234258683323e3e573e746b40c18a
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Mar 9 16:51:40 2021 +0100

    Added Google Calendar Stream source Kamelet
---
 .../kamelets/google-calendar-stream-source.svg     |  1 +
 docs/modules/ROOT/nav.adoc                         |  1 +
 .../ROOT/pages/google-calendar-stream-source.adoc  | 74 ++++++++++++++++++++++
 3 files changed, 76 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/google-calendar-stream-source.svg b/docs/modules/ROOT/assets/images/kamelets/google-calendar-stream-source.svg
new file mode 100644
index 0000000..28f6a33
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/google-calendar-stream-source.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="186 38 76 76"><path fill="#fff" d="M244 56h-40v40h40V56z"/><path fill="#EA4335" d="M244 114l18-18h-18v18z"/><path fill="#FBBC04" d="M262 56h-18v40h18V56z"/><path fill="#34A853" d="M244 96h-40v18h40V96z"/><path fill="#188038" d="M186 96v12c0 3.315 2.685 6 6 6h12V96h-18z"/><path fill="#1967D2" d="M262 56V44c0-3.315-2.685-6-6-6h-12v18h18z"/><path fill="#4285F4" d="M244 38h-52c-3.315 0 -6 2.685-6 6v52h18V56h40V38z"/><path fill="#4285F4" d="M21 [...]
\ No newline at end of file
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 360f971..907bc37 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -5,6 +5,7 @@
 * xref:ROOT:bitcoin-source.adoc[image:kamelets/bitcoin-source.svg[] Bitcoin Source]
 * xref:ROOT:ftp-source.adoc[image:kamelets/ftp-source.svg[] FTP Source]
 * xref:ROOT:ftps-source.adoc[image:kamelets/ftps-source.svg[] FTPS Source]
+* xref:ROOT:google-calendar-stream-source.adoc[image:kamelets/google-calendar-stream-source.svg[] Google Calendar Stream Source]
 * xref:ROOT:http-source.adoc[image:kamelets/http-source.svg[] HTTP Source]
 * xref:ROOT:jira-source.adoc[image:kamelets/jira-source.svg[] Jira Source]
 * xref:ROOT:kafka-source.adoc[image:kamelets/kafka-source.svg[] Kafka Source]
diff --git a/docs/modules/ROOT/pages/google-calendar-stream-source.adoc b/docs/modules/ROOT/pages/google-calendar-stream-source.adoc
new file mode 100644
index 0000000..edc1689
--- /dev/null
+++ b/docs/modules/ROOT/pages/google-calendar-stream-source.adoc
@@ -0,0 +1,74 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/google-calendar-stream-source.svg[] Google Calendar Stream Source
+
+*Provided by: "Apache Software Foundation"*
+
+Receive data from Google Calendar.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `google-calendar-stream-source` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *accessToken {empty}* *| Access Token| OAuth 2 access token for google calendar application. This typically expires after an hour so refreshToken is recommended for long term usage.| string| | 
+| *applicationName {empty}* *| Application name| Google Calendar application name| string| | 
+| *calendarId {empty}* *| Calendar ID| The calendar ID to be used as events source| string| | 
+| *clientId {empty}* *| Client Id| Client ID of the calendar application| string| | 
+| *clientSecret {empty}* *| Client Secret| Client Secret of the calendar application| string| | 
+| *index {empty}* *| Index| An index for the google calendar endpoint| string| | 
+| *refreshToken {empty}* *| Refresh Token| OAuth 2 refresh token for google calendar application. Using this, the Google Calendar component can obtain a new accessToken whenever the current one expires - a necessity if the application is long-lived.| string| | 
+| consumeFromNow| Consume from now| Consume events in the selected calendar from now on| boolean| `true`| 
+| syncFlow| Sync Flow| Sync events for incremental synchronization| boolean| `false`| 
+|===
+
+NOTE: Fields marked with ({empty}*) are mandatory.
+
+== Usage
+
+This section summarizes how the `google-calendar-stream-source` can be used in various contexts.
+
+=== Knative Source
+
+The `google-calendar-stream-source` Kamelet can be used as Knative source by binding it to a Knative object.
+
+.google-calendar-stream-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: google-calendar-stream-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: google-calendar-stream-source
+    properties:
+      accessToken: "The Access Token"
+      applicationName: "The Application name"
+      calendarId: "The Calendar ID"
+      clientId: "The Client Id"
+      clientSecret: "The Client Secret"
+      index: "The Index"
+      refreshToken: "The Refresh Token"
+  sink:
+    ref:
+      kind: InMemoryChannel
+      apiVersion: messaging.knative.dev/v1
+      name: mychannel
+
+----
+
+Make sure you have xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the Kubernetes cluster you're connected to.
+
+Save the `google-calendar-stream-source-binding.yaml` file into your hard drive, then configure it according to your needs.
+
+You can run the source using the following command:
+
+[source,shell]
+----
+kubectl apply -f google-calendar-stream-source-binding.yaml
+----
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT