Skip to content

Commit

Permalink
Added Google Calendar Stream source Kamelet
Browse files Browse the repository at this point in the history
  • Loading branch information
oscerd authored and nicolaferraro committed Mar 10, 2021
1 parent 5014dfa commit 9bad055
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
74 changes: 74 additions & 0 deletions docs/modules/ROOT/pages/google-calendar-stream-source.adoc
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9bad055

Please sign in to comment.