All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.telegram.telegrambots.api.methods.send.SendPhoto Maven / Gradle / Ivy

There is a newer version: 0.1.1
Show newest version
package org.telegram.telegrambots.api.methods.send;

import java.io.File;
import java.io.InputStream;

import javax.ws.rs.Path;

import org.telegram.telegrambots.api.objects.replykeyboard.ReplyKeyboard;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * 
 * @author Lev Nadeinsky
 * @author Ruben Bermudez
 * @brief Use this method to send photos. On success, the sent Message is returned.
 * @date	2016-11-21
 */
@Data
@EqualsAndHashCode(callSuper=true)
@ToString(callSuper=true)
@Path("sendphoto")
public class SendPhoto extends ApiMethod{
    String chatId; ///< Unique identifier for the chat to send the message to (Or username for channels)
    String photo; ///< Photo to send. file_id as String to resend a photo that is already on the Telegram servers
    String caption; ///< Optional Photo caption (may also be used when resending photos by file_id).
    /**
     * Optional. Sends the message silently. iOS users will not receive a notification, Android
     * users will receive a notification with no sound. Other apps coming soon
     */
    Boolean disableNotification;
    Integer replyToMessageId; ///< Optional. If the message is a reply, ID of the original message
    ReplyKeyboard replyMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard

    boolean isNewPhoto; ///< True if the photo must be uploaded from a file, file if it is a fileId
    String photoName; ///< Name of the photo
    File newPhotoFile; // New photo file
    InputStream newPhotoStream; // New photo stream

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy