Class GetGameHighScores
- java.lang.Object
-
- org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod<T>
-
- org.telegram.telegrambots.meta.api.methods.BotApiMethod<ArrayList<GameHighScore>>
-
- org.telegram.telegrambots.meta.api.methods.games.GetGameHighScores
-
- All Implemented Interfaces:
Validable
public class GetGameHighScores extends BotApiMethod<ArrayList<GameHighScore>>
- Version:
- 2.4 Use this method to get data for high score tables. Will return the score of the specified user and several of his neighbors in a game. On success, returns an Array of GameHighScore objects.
- Author:
- Ruben Bermudez
-
-
Field Summary
Fields Modifier and Type Field Description static StringPATH-
Fields inherited from class org.telegram.telegrambots.meta.api.methods.BotApiMethod
METHOD_FIELD
-
Fields inherited from class org.telegram.telegrambots.meta.api.methods.PartialBotApiMethod
OBJECT_MAPPER
-
-
Constructor Summary
Constructors Constructor Description GetGameHighScores()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArrayList<GameHighScore>deserializeResponse(String answer)Deserialize a json answer to the response type to a methodStringgetChatId()StringgetInlineMessageId()IntegergetMessageId()StringgetMethod()Getter for method path (that is the same as method name)IntegergetUserId()GetGameHighScoressetChatId(Long chatId)GetGameHighScoressetChatId(String chatId)GetGameHighScoressetInlineMessageId(String inlineMessageId)GetGameHighScoressetMessageId(Integer messageId)GetGameHighScoressetUserId(Integer userId)StringtoString()voidvalidate()Validates that mandatory fields are filled and optional objects
-
-
-
Field Detail
-
PATH
public static final String PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
getChatId
public String getChatId()
-
getMessageId
public Integer getMessageId()
-
getInlineMessageId
public String getInlineMessageId()
-
getUserId
public Integer getUserId()
-
setChatId
public GetGameHighScores setChatId(String chatId)
-
setChatId
public GetGameHighScores setChatId(Long chatId)
-
setMessageId
public GetGameHighScores setMessageId(Integer messageId)
-
setInlineMessageId
public GetGameHighScores setInlineMessageId(String inlineMessageId)
-
setUserId
public GetGameHighScores setUserId(Integer userId)
-
getMethod
public String getMethod()
Description copied from class:BotApiMethodGetter for method path (that is the same as method name)- Specified by:
getMethodin classBotApiMethod<ArrayList<GameHighScore>>- Returns:
- Method path
-
deserializeResponse
public ArrayList<GameHighScore> deserializeResponse(String answer) throws TelegramApiRequestException
Description copied from class:PartialBotApiMethodDeserialize a json answer to the response type to a method- Specified by:
deserializeResponsein classPartialBotApiMethod<ArrayList<GameHighScore>>- Parameters:
answer- Json answer received- Returns:
- Answer for the method
- Throws:
TelegramApiRequestException
-
validate
public void validate() throws TelegramApiValidationExceptionDescription copied from interface:ValidableValidates that mandatory fields are filled and optional objects- Throws:
TelegramApiValidationException- If any mandatory field is empty
-
-