2 * Copyright (c) 2010-2020 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.telegram.bot;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
19 * Provides the actions for the Telegram API.
21 * @author Laurent Garnier - Initial contribution
24 public interface ITelegramActions {
26 public boolean sendTelegramAnswer(@Nullable Long chatId, @Nullable String replyId, @Nullable String message);
28 public boolean sendTelegramAnswer(@Nullable String replyId, @Nullable String message);
30 public boolean sendTelegram(@Nullable Long chatId, @Nullable String message);
32 public boolean sendTelegram(@Nullable String message);
34 public boolean sendTelegramQuery(@Nullable Long chatId, @Nullable String message, @Nullable String replyId,
35 @Nullable String... buttons);
37 public boolean sendTelegramQuery(@Nullable String message, @Nullable String replyId, @Nullable String... buttons);
39 public boolean sendTelegram(@Nullable Long chatId, @Nullable String message, @Nullable Object... args);
41 public boolean sendTelegram(@Nullable String message, @Nullable Object... args);
43 public boolean sendTelegramPhoto(@Nullable Long chatId, @Nullable String photoURL, @Nullable String caption,
44 @Nullable String username, @Nullable String password);
46 public boolean sendTelegramPhoto(@Nullable String photoURL, @Nullable String caption, @Nullable String username,
47 @Nullable String password);