com.pengrad.telegrambot.model.request.InputMediaPhoto 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.model.request;
import com.pengrad.telegrambot.request.ContentTypes;
import java.io.File;
import java.io.Serializable;
/**
* Stas Parshin
* 23 November 2017
*/
public class InputMediaPhoto extends InputMedia implements Serializable {
private final static long serialVersionUID = 1L;
private Boolean has_spoiler;
public InputMediaPhoto(String media) {
super("photo", media);
}
public InputMediaPhoto(File media) {
super("photo", media);
}
public InputMediaPhoto(byte[] media) {
super("photo", media);
}
public InputMediaPhoto hasSpoiler(boolean has_spoiler) {
this.has_spoiler = has_spoiler;
return this;
}
@Override
public String getDefaultFileName() {
return ContentTypes.PHOTO_FILE_NAME;
}
@Override
public String getDefaultContentType() {
return ContentTypes.PHOTO_MIME_TYPE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy