Class InlineQuery
- java.lang.Object
-
- io.micronaut.chatbots.telegram.api.InlineQuery
-
public class InlineQuery extends java.lang.Object
This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.- Since:
- 1.0.0
- Author:
- Sergio del Amo
- See Also:
- InlineQuery
-
-
Constructor Summary
Constructors Constructor Description InlineQuery()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getChatType()
User
getFrom()
java.lang.String
getId()
Location
getLocation()
java.lang.String
getOffset()
java.lang.String
getQuery()
void
setChatType(java.lang.String chatType)
void
setFrom(User from)
void
setId(java.lang.String id)
void
setLocation(Location location)
void
setOffset(java.lang.String offset)
void
setQuery(java.lang.String query)
java.lang.String
toString()
-
-
-
Method Detail
-
getId
@NonNull public java.lang.String getId()
- Returns:
- Unique identifier for this query.
-
setId
public void setId(@NonNull java.lang.String id)
- Parameters:
id
- Unique identifier for this query.
-
getFrom
@NonNull public User getFrom()
- Returns:
- Sender.
-
setFrom
public void setFrom(@NonNull User from)
- Parameters:
from
- Sender.
-
getLocation
@Nullable public Location getLocation()
- Returns:
- Sender location, only for bots that request user location.
-
setLocation
public void setLocation(@Nullable Location location)
- Parameters:
location
- Sender location, only for bots that request user location.
-
getQuery
@NonNull public java.lang.String getQuery()
- Returns:
- Text of the query (up to 512 characters).
-
setQuery
public void setQuery(@NonNull java.lang.String query)
- Parameters:
query
- Text of the query (up to 512 characters).
-
getOffset
@NonNull public java.lang.String getOffset()
- Returns:
- Offset of the results to be returned, can be controlled by the bot.
-
setOffset
public void setOffset(@NonNull java.lang.String offset)
- Parameters:
offset
- Offset of the results to be returned, can be controlled by the bot.
-
getChatType
@Nullable public java.lang.String getChatType()
- Returns:
- Type of the chat from which the inline query was sent
-
setChatType
public void setChatType(@Nullable java.lang.String chatType)
- Parameters:
chatType
- Type of the chat from which the inline query was sent
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-