
com.pengrad.telegrambot.request.SendDocument Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-telegram-bot-api Show documentation
Show all versions of java-telegram-bot-api Show documentation
Java API for Telegram Bot API
package com.pengrad.telegrambot.request;
import java.io.File;
/**
* stas
* 5/2/16.
*/
public class SendDocument extends AbstractMultipartRequest {
public SendDocument(Object chatId, String document) {
super(chatId, document);
}
public SendDocument(Object chatId, File document) {
super(chatId, document);
}
public SendDocument(Object chatId, byte[] document) {
super(chatId, document);
}
public SendDocument caption(String caption) {
return add("caption", caption);
}
@Override
protected String getFileParamName() {
return "document";
}
@Override
public String getFileName() {
return ContentTypes.DOC_FILE_NAME;
}
@Override
public String getContentType() {
return ContentTypes.DOC_MIME_TYPE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy