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 46bdd48792917a8fd275865cf39bfbc71eeb40af Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Tue Mar 23 14:14:42 2021 +0100 Added Dropbox Kamelet source --- dropbox-source.kamelet.yaml | 66 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/dropbox-source.kamelet.yaml b/dropbox-source.kamelet.yaml new file mode 100644 index 0000000..bfda21c --- /dev/null +++ b/dropbox-source.kamelet.yaml @@ -0,0 +1,66 @@ +apiVersion: camel.apache.org/v1alpha1 +kind: Kamelet +metadata: + name: dropbox-source + annotations: + camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjAiIHk9IjAiIHZpZXdCb3g9IjAgMCAyNDguMiAzMDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxzdHlsZT4uc3QyOHtmaWxsOiM4YzMxMjN9LnN0Mjl7ZmlsbDojZTA1MjQzfTwvc3R5bGU+PHBhdGggY2xhc3M9InN0MjgiIGQ9Ik0yMCA1Mi4xTDAgNjJ2MTc1LjVsMjAgOS45LjEtLjFWNTIuMmwtLjEtLjEiLz48cGF0aCBjbGFzcz0ic3QyOSIgZD0iTTEyNyAyMjJMMjAgMjQ3LjVWNTIuMUwxMjcgNzd2MTQ1Ii8+PHBhdGggY2xhc3M9InN0MjgiIG [...] + camel.apache.org/provider: "Apache Software Foundation" + labels: + camel.apache.org/kamelet.type: "source" +spec: + definition: + title: "Dropbox Source" + description: |- + Consume Files from Dropbox. + required: + - period + - accessToken + - clientIdentifier + - remotePath + properties: + period: + title: Period between polls + description: The interval between fetches to the earthquake API in milliseconds + type: integer + default: 10000 + accessToken: + title: Dropbox Access Token + description: The access Token to use to access Dropbox + type: string + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:password + clientIdentifier: + title: The client identifier + description: Dropbox App client Identifier + type: string + remotePath: + title: Remote path + description: Original file or folder to work with + type: string + query: + title: Querys + description: A space-separated list of sub-strings to search for. A file matches only if it contains all the sub-strings. If this option is not set, all files will be matched. + type: string + flow: + from: + uri: "timer:dropbox-stream" + parameters: + period: "{{period}}" + steps: + - to: + uri: "dropbox:search" + parameters: + accessToken: "{{accessToken}}" + remotePath: "{{remotePath}}" + clientIdentifier: "{{clientIdentifier}}" + query: "{{query}}" + - split: + jsonpath: "$.*" + steps: + - set-property: + name: dropboxFileName + simple: ${body.metadata.pathDisplay} + - tod: "dropbox:get?accessToken={{accessToken}}&clientIdentifier={{clientIdentifier}}&remotePath=${exchangeProperty.dropboxFileName}" + - to: "kamelet:sink" + - tod: "dropbox:del?accessToken={{accessToken}}&clientIdentifier={{clientIdentifier}}&remotePath=${exchangeProperty.dropboxFileName}" +