This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
The following commit(s) were added to refs/heads/main by this push:
new c759e0a Chuck Norris Kamelet (#318)
c759e0a is described below
commit c759e0acfa7621a66fd392162770d9bf5a686911
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Jun 1 14:22:53 2021 +0200
Chuck Norris Kamelet (#318)
Chuck Norris Kamelet
---
chuck-norris-source.kamelet.yaml | 42 ++++++++++++++++++++++
.../kamelets/chuck-norris-source.kamelet.yaml | 42 ++++++++++++++++++++++
2 files changed, 84 insertions(+)
diff --git a/chuck-norris-source.kamelet.yaml b/chuck-norris-source.kamelet.yaml
new file mode 100644
index 0000000..42c2644
--- /dev/null
+++ b/chuck-norris-source.kamelet.yaml
@@ -0,0 +1,42 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+ name: chuck-norris-source
+ annotations:
+ camel.apache.org/kamelet.support.level: "Preview"
+ camel.apache.org/catalog.version: "main-SNAPSHOT"
+ camel.apache.org/kamelet.icon:
data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDA
[...]
+ camel.apache.org/provider: "Apache Software Foundation"
+ camel.apache.org/kamelet.group: "Chuck Norris"
+ labels:
+ camel.apache.org/kamelet.type: "source"
+spec:
+ definition:
+ title: "Chuck Norris Source"
+ description: |-
+ Gets peridically Chuck Norris jokes from http://www.icndb.com/
+ type: object
+ properties:
+ period:
+ title: Period
+ description: The interval (msec) to wait before getting the next joke
+ type: integer
+ default: 5000
+ types:
+ out:
+ mediaType: text/plain
+ dependencies:
+ - "camel:kamelet"
+ - "camel:timer"
+ - "camel:http"
+ - "camel:jsonpath"
+ flow:
+ from:
+ uri: "timer:chuck"
+ parameters:
+ period: "{{period}}"
+ steps:
+ - to: "http://api.icndb.com/jokes/random"
+ - set-body:
+ jsonpath: "$.value.joke"
+ - to: "kamelet:sink"
\ No newline at end of file
diff --git
a/library/camel-kamelets-catalog/src/main/resources/kamelets/chuck-norris-source.kamelet.yaml
b/library/camel-kamelets-catalog/src/main/resources/kamelets/chuck-norris-source.kamelet.yaml
new file mode 100644
index 0000000..42c2644
--- /dev/null
+++
b/library/camel-kamelets-catalog/src/main/resources/kamelets/chuck-norris-source.kamelet.yaml
@@ -0,0 +1,42 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+ name: chuck-norris-source
+ annotations:
+ camel.apache.org/kamelet.support.level: "Preview"
+ camel.apache.org/catalog.version: "main-SNAPSHOT"
+ camel.apache.org/kamelet.icon:
data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDA
[...]
+ camel.apache.org/provider: "Apache Software Foundation"
+ camel.apache.org/kamelet.group: "Chuck Norris"
+ labels:
+ camel.apache.org/kamelet.type: "source"
+spec:
+ definition:
+ title: "Chuck Norris Source"
+ description: |-
+ Gets peridically Chuck Norris jokes from http://www.icndb.com/
+ type: object
+ properties:
+ period:
+ title: Period
+ description: The interval (msec) to wait before getting the next joke
+ type: integer
+ default: 5000
+ types:
+ out:
+ mediaType: text/plain
+ dependencies:
+ - "camel:kamelet"
+ - "camel:timer"
+ - "camel:http"
+ - "camel:jsonpath"
+ flow:
+ from:
+ uri: "timer:chuck"
+ parameters:
+ period: "{{period}}"
+ steps:
+ - to: "http://api.icndb.com/jokes/random"
+ - set-body:
+ jsonpath: "$.value.joke"
+ - to: "kamelet:sink"
\ No newline at end of file