You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2020/09/28 10:14:41 UTC

[camel] branch master updated: camel-telegram: fix wrong documentation

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 831d607  camel-telegram: fix wrong documentation
831d607 is described below

commit 831d6072051269cbb69f49985f3e16531d797615
Author: Luca Burgazzoli <lb...@gmail.com>
AuthorDate: Mon Sep 28 10:47:06 2020 +0200

    camel-telegram: fix wrong documentation
---
 .../camel/catalog/docs/telegram-component.adoc     | 32 +++++++++++-----------
 .../src/main/docs/telegram-component.adoc          | 32 +++++++++++-----------
 .../modules/ROOT/pages/telegram-component.adoc     | 32 +++++++++++-----------
 3 files changed, 48 insertions(+), 48 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/telegram-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/telegram-component.adoc
index 91ce86b..244c993 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/telegram-component.adoc
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/telegram-component.adoc
@@ -47,7 +47,7 @@ for this component:
 
 [source,text]
 ----------------------------------------------------
-telegram:type/authorizationToken[?options]
+telegram:type[?options]
 ----------------------------------------------------
 
 You can append query options to the URI in the following format,
@@ -175,7 +175,7 @@ in Java DSL
 
 [source,java]
 ---------------------------------------------------------
-from("direct:start").to("telegram:bots/123456789:insertYourAuthorizationTokenHere");
+from("direct:start").to("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere");
 ---------------------------------------------------------
 
 or in Spring XML
@@ -184,7 +184,7 @@ or in Spring XML
 ---------------------------------------------
 <route>
     <from uri="direct:start"/>
-    <to uri="telegram:bots/123456789:insertYourAuthorizationTokenHere"/>
+    <to uri="telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere"/>
 <route>
 ---------------------------------------------
 
@@ -226,7 +226,7 @@ In Java DSL
 
 [source,java]
 ---------------------------------------------------------
-from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
+from("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere")
 .bean(ProcessorBean.class)
 ---------------------------------------------------------
 
@@ -235,7 +235,7 @@ or in Spring XML
 [source,xml]
 ---------------------------------------------
 <route>
-    <from uri="telegram:bots/123456789:insertYourAuthorizationTokenHere"/>
+    <from uri="telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere"/>
     <bean ref="myBean" />
 <route>
 
@@ -281,9 +281,9 @@ The following is a basic configuration of the chat-bot in Java DSL
 
 [source,java]
 ---------------------------------------------------------
-from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
+from("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere")
 .bean(ChatBotLogic.class)
-.to("telegram:bots/123456789:insertYourAuthorizationTokenHere");
+.to("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere");
 ---------------------------------------------------------
 
 or in Spring XML
@@ -291,9 +291,9 @@ or in Spring XML
 [source,xml]
 ---------------------------------------------
 <route>
-    <from uri="telegram:bots/123456789:insertYourAuthorizationTokenHere"/>
+    <from uri="telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere"/>
     <bean ref="chatBotLogic" />
-    <to uri="telegram:bots/123456789:insertYourAuthorizationTokenHere"/>
+    <to uri="telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere"/>
 <route>
 
 <bean id="chatBotLogic" class="com.example.ChatBotLogic"/>
@@ -331,7 +331,7 @@ First, add the bot to the chat where you want to push messages, then run a route
 
 [source,java]
 ---------------------------------------------------------
-from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
+from("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere")
 .to("log:INFO?showHeaders=true");
 ---------------------------------------------------------
 
@@ -344,7 +344,7 @@ Once you get the chat ID, you can use the following sample route to push message
 ---------------------------------------------------------
 from("timer:tick")
 .setBody().constant("Hello")
-to("telegram:bots/123456789:insertYourAuthorizationTokenHere?chatId=123456")
+to("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere?chatId=123456")
 ---------------------------------------------------------
 
 Note that the corresponding URI parameter is simply `chatId`.
@@ -355,7 +355,7 @@ You can customize the user keyboard instead of asking him to write an option. `O
 
 [source,java]
 ---------------------------------------------------------
-from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
+from("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere")
     .process(exchange -> {
 
         OutgoingTextMessage msg = new OutgoingTextMessage();
@@ -382,14 +382,14 @@ from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
 
         exchange.getIn().setBody(msg);
     })
-    .to("telegram:bots/123456789:insertYourAuthorizationTokenHere");
+    .to("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere");
 ---------------------------------------------------------
 
 If you want to disable it the next message must have the property `removeKeyboard` set on `ReplyKeyboardMarkup` object.
 
 [source,java]
 ---------------------------------------------------------
-from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
+from("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere")
     .process(exchange -> {
 
         OutgoingTextMessage msg = new OutgoingTextMessage();
@@ -403,7 +403,7 @@ from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
 
         exchange.getIn().setBody(msg);
     })
-    .to("telegram:bots/123456789:insertYourAuthorizationTokenHere");
+    .to("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere");
 ---------------------------------------------------------
 
 
@@ -430,7 +430,7 @@ In Java DSL:
 
 [source,java]
 ---------------------------------------------------------
-from("webhook:telegram:bots/123456789:insertYourAuthorizationTokenHere").to("log:info");
+from("webhook:telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere").to("log:info");
 ---------------------------------------------------------
 
 Some endpoints will be exposed by your application and Telegram will be configured to send messages to them.
diff --git a/components/camel-telegram/src/main/docs/telegram-component.adoc b/components/camel-telegram/src/main/docs/telegram-component.adoc
index 91ce86b..244c993 100644
--- a/components/camel-telegram/src/main/docs/telegram-component.adoc
+++ b/components/camel-telegram/src/main/docs/telegram-component.adoc
@@ -47,7 +47,7 @@ for this component:
 
 [source,text]
 ----------------------------------------------------
-telegram:type/authorizationToken[?options]
+telegram:type[?options]
 ----------------------------------------------------
 
 You can append query options to the URI in the following format,
@@ -175,7 +175,7 @@ in Java DSL
 
 [source,java]
 ---------------------------------------------------------
-from("direct:start").to("telegram:bots/123456789:insertYourAuthorizationTokenHere");
+from("direct:start").to("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere");
 ---------------------------------------------------------
 
 or in Spring XML
@@ -184,7 +184,7 @@ or in Spring XML
 ---------------------------------------------
 <route>
     <from uri="direct:start"/>
-    <to uri="telegram:bots/123456789:insertYourAuthorizationTokenHere"/>
+    <to uri="telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere"/>
 <route>
 ---------------------------------------------
 
@@ -226,7 +226,7 @@ In Java DSL
 
 [source,java]
 ---------------------------------------------------------
-from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
+from("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere")
 .bean(ProcessorBean.class)
 ---------------------------------------------------------
 
@@ -235,7 +235,7 @@ or in Spring XML
 [source,xml]
 ---------------------------------------------
 <route>
-    <from uri="telegram:bots/123456789:insertYourAuthorizationTokenHere"/>
+    <from uri="telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere"/>
     <bean ref="myBean" />
 <route>
 
@@ -281,9 +281,9 @@ The following is a basic configuration of the chat-bot in Java DSL
 
 [source,java]
 ---------------------------------------------------------
-from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
+from("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere")
 .bean(ChatBotLogic.class)
-.to("telegram:bots/123456789:insertYourAuthorizationTokenHere");
+.to("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere");
 ---------------------------------------------------------
 
 or in Spring XML
@@ -291,9 +291,9 @@ or in Spring XML
 [source,xml]
 ---------------------------------------------
 <route>
-    <from uri="telegram:bots/123456789:insertYourAuthorizationTokenHere"/>
+    <from uri="telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere"/>
     <bean ref="chatBotLogic" />
-    <to uri="telegram:bots/123456789:insertYourAuthorizationTokenHere"/>
+    <to uri="telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere"/>
 <route>
 
 <bean id="chatBotLogic" class="com.example.ChatBotLogic"/>
@@ -331,7 +331,7 @@ First, add the bot to the chat where you want to push messages, then run a route
 
 [source,java]
 ---------------------------------------------------------
-from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
+from("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere")
 .to("log:INFO?showHeaders=true");
 ---------------------------------------------------------
 
@@ -344,7 +344,7 @@ Once you get the chat ID, you can use the following sample route to push message
 ---------------------------------------------------------
 from("timer:tick")
 .setBody().constant("Hello")
-to("telegram:bots/123456789:insertYourAuthorizationTokenHere?chatId=123456")
+to("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere?chatId=123456")
 ---------------------------------------------------------
 
 Note that the corresponding URI parameter is simply `chatId`.
@@ -355,7 +355,7 @@ You can customize the user keyboard instead of asking him to write an option. `O
 
 [source,java]
 ---------------------------------------------------------
-from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
+from("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere")
     .process(exchange -> {
 
         OutgoingTextMessage msg = new OutgoingTextMessage();
@@ -382,14 +382,14 @@ from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
 
         exchange.getIn().setBody(msg);
     })
-    .to("telegram:bots/123456789:insertYourAuthorizationTokenHere");
+    .to("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere");
 ---------------------------------------------------------
 
 If you want to disable it the next message must have the property `removeKeyboard` set on `ReplyKeyboardMarkup` object.
 
 [source,java]
 ---------------------------------------------------------
-from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
+from("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere")
     .process(exchange -> {
 
         OutgoingTextMessage msg = new OutgoingTextMessage();
@@ -403,7 +403,7 @@ from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
 
         exchange.getIn().setBody(msg);
     })
-    .to("telegram:bots/123456789:insertYourAuthorizationTokenHere");
+    .to("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere");
 ---------------------------------------------------------
 
 
@@ -430,7 +430,7 @@ In Java DSL:
 
 [source,java]
 ---------------------------------------------------------
-from("webhook:telegram:bots/123456789:insertYourAuthorizationTokenHere").to("log:info");
+from("webhook:telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere").to("log:info");
 ---------------------------------------------------------
 
 Some endpoints will be exposed by your application and Telegram will be configured to send messages to them.
diff --git a/docs/components/modules/ROOT/pages/telegram-component.adoc b/docs/components/modules/ROOT/pages/telegram-component.adoc
index 714625c..2f8a813 100644
--- a/docs/components/modules/ROOT/pages/telegram-component.adoc
+++ b/docs/components/modules/ROOT/pages/telegram-component.adoc
@@ -49,7 +49,7 @@ for this component:
 
 [source,text]
 ----------------------------------------------------
-telegram:type/authorizationToken[?options]
+telegram:type[?options]
 ----------------------------------------------------
 
 You can append query options to the URI in the following format,
@@ -177,7 +177,7 @@ in Java DSL
 
 [source,java]
 ---------------------------------------------------------
-from("direct:start").to("telegram:bots/123456789:insertYourAuthorizationTokenHere");
+from("direct:start").to("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere");
 ---------------------------------------------------------
 
 or in Spring XML
@@ -186,7 +186,7 @@ or in Spring XML
 ---------------------------------------------
 <route>
     <from uri="direct:start"/>
-    <to uri="telegram:bots/123456789:insertYourAuthorizationTokenHere"/>
+    <to uri="telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere"/>
 <route>
 ---------------------------------------------
 
@@ -228,7 +228,7 @@ In Java DSL
 
 [source,java]
 ---------------------------------------------------------
-from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
+from("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere")
 .bean(ProcessorBean.class)
 ---------------------------------------------------------
 
@@ -237,7 +237,7 @@ or in Spring XML
 [source,xml]
 ---------------------------------------------
 <route>
-    <from uri="telegram:bots/123456789:insertYourAuthorizationTokenHere"/>
+    <from uri="telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere"/>
     <bean ref="myBean" />
 <route>
 
@@ -283,9 +283,9 @@ The following is a basic configuration of the chat-bot in Java DSL
 
 [source,java]
 ---------------------------------------------------------
-from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
+from("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere")
 .bean(ChatBotLogic.class)
-.to("telegram:bots/123456789:insertYourAuthorizationTokenHere");
+.to("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere");
 ---------------------------------------------------------
 
 or in Spring XML
@@ -293,9 +293,9 @@ or in Spring XML
 [source,xml]
 ---------------------------------------------
 <route>
-    <from uri="telegram:bots/123456789:insertYourAuthorizationTokenHere"/>
+    <from uri="telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere"/>
     <bean ref="chatBotLogic" />
-    <to uri="telegram:bots/123456789:insertYourAuthorizationTokenHere"/>
+    <to uri="telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere"/>
 <route>
 
 <bean id="chatBotLogic" class="com.example.ChatBotLogic"/>
@@ -333,7 +333,7 @@ First, add the bot to the chat where you want to push messages, then run a route
 
 [source,java]
 ---------------------------------------------------------
-from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
+from("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere")
 .to("log:INFO?showHeaders=true");
 ---------------------------------------------------------
 
@@ -346,7 +346,7 @@ Once you get the chat ID, you can use the following sample route to push message
 ---------------------------------------------------------
 from("timer:tick")
 .setBody().constant("Hello")
-to("telegram:bots/123456789:insertYourAuthorizationTokenHere?chatId=123456")
+to("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere?chatId=123456")
 ---------------------------------------------------------
 
 Note that the corresponding URI parameter is simply `chatId`.
@@ -357,7 +357,7 @@ You can customize the user keyboard instead of asking him to write an option. `O
 
 [source,java]
 ---------------------------------------------------------
-from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
+from("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere")
     .process(exchange -> {
 
         OutgoingTextMessage msg = new OutgoingTextMessage();
@@ -384,14 +384,14 @@ from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
 
         exchange.getIn().setBody(msg);
     })
-    .to("telegram:bots/123456789:insertYourAuthorizationTokenHere");
+    .to("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere");
 ---------------------------------------------------------
 
 If you want to disable it the next message must have the property `removeKeyboard` set on `ReplyKeyboardMarkup` object.
 
 [source,java]
 ---------------------------------------------------------
-from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
+from("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere")
     .process(exchange -> {
 
         OutgoingTextMessage msg = new OutgoingTextMessage();
@@ -405,7 +405,7 @@ from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
 
         exchange.getIn().setBody(msg);
     })
-    .to("telegram:bots/123456789:insertYourAuthorizationTokenHere");
+    .to("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere");
 ---------------------------------------------------------
 
 
@@ -432,7 +432,7 @@ In Java DSL:
 
 [source,java]
 ---------------------------------------------------------
-from("webhook:telegram:bots/123456789:insertYourAuthorizationTokenHere").to("log:info");
+from("webhook:telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere").to("log:info");
 ---------------------------------------------------------
 
 Some endpoints will be exposed by your application and Telegram will be configured to send messages to them.