com.antonioaltieri.telegram.botapi.requests.SendChatActionRequest Maven / Gradle / Ivy
package com.antonioaltieri.telegram.botapi.requests;
import java.util.HashMap;
import java.util.Map;
public class SendChatActionRequest implements ApiRequest {
private Map args = new HashMap<>();
public SendChatActionRequest(int chatId, ChatAction chatAction) {
args.put("chat_id", String.valueOf(chatId));
args.put("action", chatAction.getAction());
}
@Override
public String getMethodName() {
return "sendChatAction";
}
@Override
public ResultTypes getResultType() {
return ResultTypes.BOOLEAN;
}
@Override
public Map getArgs() {
return args;
}
@Override
public RequestStrategy getRequestStrategy() {
return new PostStrategy();
}
@Override
public String toString() {
return "SendChatActionRequest{" +
"args=" + args +
'}';
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy