wttr.in Source
Provided by: "Apache Software Foundation"
Support Level for this Kamelet is: "Preview"
Get weather forecasts from the wttr.in weather forecast service
Configuration Options
The following table summarizes the configuration options available for the wttrin-source
Kamelet:
Property | Name | Description | Type | Default | Example |
---|---|---|---|---|---|
Output Type |
The type of output. |
string |
current |
current, weather, full |
|
Period |
The interval between fetches to the wttr.in service in milliseconds. |
integer |
60000 |
||
Language |
The language to use for displaying weather forecasts. |
string |
am ar af be bn ca da de el et fr fa hi hu ia id it lt mg nb nl oc pl pt-br ro ru ta tr th uk vi zh-cn zh-tw |
||
Location |
The location to get weather forecasts. |
string |
"paris", "~Eiffel+tower", "Москва", "muc", "@stackoverflow.com", "94107", "-78.46,106.79" |
Dependencies
At runtime, the wttrin-source
Kamelet relies upon the presence of the following dependencies:
-
camel:core
-
camel:http
-
camel:jackson
-
camel:jsonpath
-
camel:kamelet
-
camel:timer
Usage
This section describes how you can use the wttrin-source
.
Knative source
You can use the wttrin-source
Kamelet as a Knative source by binding it to a Knative object.
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
name: wttrin-source-binding
spec:
source:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: wttrin-source
sink:
ref:
kind: Channel
apiVersion: messaging.knative.dev/v1
name: mychannel
Prerequisite
You have Camel K installed on the cluster.
Kafka source
You can use the wttrin-source
Kamelet as a Kafka source by binding it to a Kafka topic.
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
name: wttrin-source-binding
spec:
source:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: wttrin-source
sink:
ref:
kind: KafkaTopic
apiVersion: kafka.strimzi.io/v1beta1
name: my-topic
Prerequisites
-
You’ve installed Strimzi.
-
You’ve created a topic named
my-topic
in the current namespace. -
You have Camel K installed on the cluster.