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

io.github.biezhi.tgbot.request.SendAudio Maven / Gradle / Ivy

The newest version!
package io.github.biezhi.tgbot.request;

import java.io.File;

/**
 * stas
 * 5/2/16.
 */
public class SendAudio extends AbstractMultipartRequest {

    public SendAudio(Object chatId, String audio) {
        super(chatId, audio);
    }

    public SendAudio(Object chatId, File audio) {
        super(chatId, audio);
    }

    public SendAudio(Object chatId, byte[] audio) {
        super(chatId, audio);
    }

    public SendAudio caption(String caption) {
        return add("caption", caption);
    }

    public SendAudio duration(int duration) {
        return add("duration", duration);
    }

    public SendAudio performer(String performer) {
        return add("performer", performer);
    }

    public SendAudio title(String title) {
        return add("title", title);
    }

    @Override
    protected String getFileParamName() {
        return "audio";
    }

    @Override
    public String getDefaultFileName() {
        return ContentTypes.AUDIO_FILE_NAME;
    }

    @Override
    public String getContentType() {
        return ContentTypes.AUDIO_MIME_TYPE;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy