You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2021/03/29 13:35:45 UTC

[camel-kamelets] branch master updated (d352b1b -> 3a6da54)

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

nferraro pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git.


    from d352b1b  Added Twitter Timeline Kamelet Source
     new 5c5166c  Added Twitter Direct Message Source Kamelet
     new d12e8fa  Added Twitter Direct Message Source Kamelet
     new 3a6da54  Added Twitter Direct Message Source Kamelet

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ...source.svg => twitter-directmessage-source.svg} |  0
 docs/modules/ROOT/nav.adoc                         |  1 +
 ...urce.adoc => twitter-directmessage-source.adoc} | 22 +++++++++++-----------
 ...elet.yaml => twitter-directmessage.kamelet.yaml | 11 +++++------
 4 files changed, 17 insertions(+), 17 deletions(-)
 copy docs/modules/ROOT/assets/images/kamelets/{twitter-timeline-source.svg => twitter-directmessage-source.svg} (100%)
 copy docs/modules/ROOT/pages/{twitter-timeline-source.adoc => twitter-directmessage-source.adoc} (69%)
 copy twitter-timeline.kamelet.yaml => twitter-directmessage.kamelet.yaml (94%)

[camel-kamelets] 03/03: Added Twitter Direct Message Source Kamelet

Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 3a6da548f0d71ff4a51fefa6e9b81cd30a9510a0
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Mar 29 15:15:46 2021 +0200

    Added Twitter Direct Message Source Kamelet
---
 .../kamelets/twitter-directmessage-source.svg      |  6 ++
 .../ROOT/pages/twitter-directmessage-source.adoc   | 71 ++++++++++++++++++++++
 2 files changed, 77 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/twitter-directmessage-source.svg b/docs/modules/ROOT/assets/images/kamelets/twitter-directmessage-source.svg
new file mode 100644
index 0000000..c0364cc
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/twitter-directmessage-source.svg
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg width="256px" height="209px" viewBox="0 0 256 209" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid">
+    <g>
+        <path d="M256,25.4500259 C246.580841,29.6272672 236.458451,32.4504868 225.834156,33.7202333 C236.678503,27.2198053 245.00583,16.9269929 248.927437,4.66307685 C238.779765,10.6812633 227.539325,15.0523376 215.57599,17.408298 C205.994835,7.2006971 192.34506,0.822 177.239197,0.822 C148.232605,0.822 124.716076,24.3375931 124.716076,53.3423116 C124.716076,57.4586875 125.181462,61.4673784 126.076652,65.3112644 C82.4258385,63.1210453 43.7257252,42.211429 17.821398,10.4359288 C13.3005011, [...]
+    </g>
+</svg>
\ No newline at end of file
diff --git a/docs/modules/ROOT/pages/twitter-directmessage-source.adoc b/docs/modules/ROOT/pages/twitter-directmessage-source.adoc
new file mode 100644
index 0000000..ed5c905
--- /dev/null
+++ b/docs/modules/ROOT/pages/twitter-directmessage-source.adoc
@@ -0,0 +1,71 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/twitter-directmessage-source.svg[] Twitter Direct Message Source
+
+*Provided by: "Apache Software Foundation"*
+
+Allows to get all direct messages for your Twitter account.
+
+It requires tokens that can be obtained by creating an application 
+in the Twitter developer portal: https://developer.twitter.com/.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `twitter-directmessage-source` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *accessToken {empty}* *| Access Token| The Access Token from the Twitter application in the developer portal| string| | 
+| *accessTokenSecret {empty}* *| Access Token Secret| The Access Token Secret from the Twitter application in the developer portal| string| | 
+| *apiKey {empty}* *| API Key| The API Key from the Twitter application in the developer portal| string| | 
+| *apiKeySecret {empty}* *| API Key Secret| The API Key Secret from the Twitter application in the developer portal| string| | 
+| *user {empty}* *| User| The user we want to read the direct messages| string| | `"ApacheCamel"`
+|===
+
+NOTE: Fields marked with ({empty}*) are mandatory.
+
+== Usage
+
+This section summarizes how the `twitter-directmessage-source` can be used in various contexts.
+
+=== Knative Source
+
+The `twitter-directmessage-source` Kamelet can be used as Knative source by binding it to a Knative object.
+
+.twitter-directmessage-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: twitter-directmessage-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: twitter-directmessage-source
+    properties:
+      accessToken: "The Access Token"
+      accessTokenSecret: "The Access Token Secret"
+      apiKey: "The API Key"
+      apiKeySecret: "The API Key Secret"
+      user: "ApacheCamel"
+  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 `twitter-directmessage-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 twitter-directmessage-source-binding.yaml
+----
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT

[camel-kamelets] 02/03: Added Twitter Direct Message Source Kamelet

Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d12e8fabe3bf972f13b637bc343277cbd1893134
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Mar 29 15:15:34 2021 +0200

    Added Twitter Direct Message Source Kamelet
---
 docs/modules/ROOT/nav.adoc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 945672a..d370b95 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -34,6 +34,7 @@
 * xref:ROOT:telegram-sink.adoc[image:kamelets/telegram-sink.svg[] Telegram Sink]
 * xref:ROOT:telegram-source.adoc[image:kamelets/telegram-source.svg[] Telegram Source]
 * xref:ROOT:timer-source.adoc[image:kamelets/timer-source.svg[] Timer Source]
+* xref:ROOT:twitter-directmessage-source.adoc[image:kamelets/twitter-directmessage-source.svg[] Twitter Direct Message Source]
 * xref:ROOT:twitter-search-source.adoc[image:kamelets/twitter-search-source.svg[] Twitter Search Source]
 * xref:ROOT:twitter-timeline-source.adoc[image:kamelets/twitter-timeline-source.svg[] Twitter Timeline Source]
 * xref:ROOT:webhook-source.adoc[image:kamelets/webhook-source.svg[] Webhook Source]

[camel-kamelets] 01/03: Added Twitter Direct Message Source Kamelet

Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5c5166c5d273d2c17cdfdb44a560898d58c71c12
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Mar 29 15:14:40 2021 +0200

    Added Twitter Direct Message Source Kamelet
---
 twitter-directmessage.kamelet.yaml | 73 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/twitter-directmessage.kamelet.yaml b/twitter-directmessage.kamelet.yaml
new file mode 100755
index 0000000..ce01a20
--- /dev/null
+++ b/twitter-directmessage.kamelet.yaml
@@ -0,0 +1,73 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: twitter-directmessage-source
+  annotations:
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjI1NnB4IiBoZWlnaHQ9IjIwOXB4IiB2aWV3Qm94PSIwIDAgMjU2IDIwOSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+CiAgICA8Zz4KICAgICAgICA8cGF0aCBkPSJNMjU2LDI1LjQ1MDAyNTkgQzI0Ni41ODA4NDEsMjkuNjI3MjY3MiAyMzYuNDU4NDUxLDMyLjQ1MDQ4NjggMj [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+  labels:
+    camel.apache.org/kamelet.type: "source"
+    camel.apache.org/kamelet.group: "Twitter"
+spec:
+  definition:
+    title: "Twitter Direct Message Source"
+    description: |-
+      Allows to get all direct messages for your Twitter account.
+
+      It requires tokens that can be obtained by creating an application 
+      in the Twitter developer portal: https://developer.twitter.com/.
+    required:
+    - user
+    - apiKey
+    - apiKeySecret
+    - accessToken
+    - accessTokenSecret
+    properties:
+      user:
+        title: User
+        description: The user we want to read the direct messages
+        type: string
+        example: "ApacheCamel"
+      apiKey:
+        title: API Key
+        description: The API Key from the Twitter application in the developer portal
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+      apiKeySecret:
+        title: API Key Secret
+        description: The API Key Secret from the Twitter application in the developer portal
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+      accessToken:
+        title: Access Token
+        description: The Access Token from the Twitter application in the developer portal
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+      accessTokenSecret:
+        title: Access Token Secret
+        description: The Access Token Secret from the Twitter application in the developer portal
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+  types:
+    out:
+      mediaType: application/json
+  flow:
+    from:
+      uri: "twitter-directmessage:{{user}}"
+      parameters:
+        accessToken: "{{accessToken}}"
+        accessTokenSecret: "{{accessTokenSecret}}"
+        consumerKey: "{{apiKey}}"
+        consumerSecret: "{{apiKeySecret}}"
+      steps:
+      - marshal:
+          json: {}
+      - to: "kamelet:sink"