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/29 13:16:03 UTC

[camel-kamelets] branch direct-message-twitter created (now 33e3036)

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

acosentino pushed a change to branch direct-message-twitter
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git.


      at 33e3036  Added Twitter Direct Message Source Kamelet

This branch includes the following new commits:

     new e6ca0bb  Added Twitter Direct Message Source Kamelet
     new 7e05c72  Added Twitter Direct Message Source Kamelet
     new 33e3036  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.


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

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

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

commit e6ca0bbcc63df36a0c14633e02585ce383502e6e
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"

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

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

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

commit 7e05c72a06afb0e2d92699b16e960ba7e84da1f6
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 db36965..73a7266 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:webhook-source.adoc[image:kamelets/webhook-source.svg[] Webhook Source]
 // THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT

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

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

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

commit 33e303688e20593e2e2f550c0536b03ae46bd289
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