Class BasecampController
- java.lang.Object
-
- io.micronaut.chatbots.basecamp.http.BasecampController
-
@Requires(beans=Dispatcher.class) @Requires(property="micronaut.chatbots.basecamp.endpoint.enabled",notEquals="false",defaultValue="true") @Controller("${micronaut.chatbots.basecamp.endpoint.path:/basecamp}") public class BasecampController extends java.lang.Object
Defines a route to handle the Basecamp Chatbot webhook.- Since:
- 1.0.0
- Author:
- Sergio del Amo
-
-
Constructor Summary
Constructors Constructor Description BasecampController(Dispatcher<BasecampBotConfiguration,Query,java.lang.String> dispatcher)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.micronaut.http.HttpResponse<java.lang.String>
callback(Query update)
-
-
-
Constructor Detail
-
BasecampController
public BasecampController(Dispatcher<BasecampBotConfiguration,Query,java.lang.String> dispatcher)
Constructor.- Parameters:
dispatcher
- Message dispatcher
-
-
Method Detail
-
callback
@Produces("text/html") @Post public io.micronaut.http.HttpResponse<java.lang.String> callback(@Body Query update)
- Parameters:
update
- Basecamp Message- Returns:
- HTTP Response. It could 200 OK with an empty body if the request is handle asynchronously or a 200 with the response payload if the request is handled synchronously.
-
-