org.telegram.telegrambots.meta.api.methods.GetMe Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of telegrambots-meta Show documentation
Show all versions of telegrambots-meta Show documentation
Easy to use library to create Telegram Bots
The newest version!
package org.telegram.telegrambots.meta.api.methods;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.telegram.telegrambots.meta.api.methods.botapimethods.BotApiMethod;
import org.telegram.telegrambots.meta.api.objects.User;
import org.telegram.telegrambots.meta.exceptions.TelegramApiRequestException;
/**
* @author Ruben Bermudez
* @version 1.0
* A simple method for testing your bot's auth token. Requires no parameters.
* Returns basic information about the bot in form of a User object
*/
@EqualsAndHashCode(callSuper = false)
@Getter
@Setter
@ToString
@AllArgsConstructor
@Builder
public class GetMe extends BotApiMethod {
public static final String PATH = "getme";
@Override
public String getMethod() {
return PATH;
}
@Override
public User deserializeResponse(String answer) throws TelegramApiRequestException {
return deserializeResponse(answer, User.class);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy