summaryrefslogtreecommitdiff
path: root/include/tgbot/Api.h
diff options
context:
space:
mode:
authorAndrea Giove <andreagiove@outlook.com>2016-04-16 22:38:00 +0200
committerAndrea Giove <andreagiove@outlook.com>2016-04-16 22:38:00 +0200
commit730407e8df5031d19a097be4e3e597f2f3b868fd (patch)
tree610cbc5a27b10c0a2152eaaec0210ff2aec161ee /include/tgbot/Api.h
parentabbd611b34ccb5f77c1c28160294f1481c9479c2 (diff)
Added sendVoice method and update sendAudio method
Diffstat (limited to 'include/tgbot/Api.h')
-rw-r--r--include/tgbot/Api.h36
1 files changed, 34 insertions, 2 deletions
diff --git a/include/tgbot/Api.h b/include/tgbot/Api.h
index 0670ea0..d7cfc0e 100644
--- a/include/tgbot/Api.h
+++ b/include/tgbot/Api.h
@@ -112,12 +112,15 @@ public:
* @param chatId Unique identifier for the target chat.
* @param audio Audio to send.
* @param duration Duration of sent audio in seconds.
+ * @param performer Performer
+ * @param title Track name
* @param replyToMessageId Optional. If the message is a reply, ID of the original message.
* @param replyMarkup Optional. Additional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user.
* @param disableNotification Optional. Sends the message silenty.
* @return On success, the sent message is returned.
*/
- Message::Ptr sendAudio(int64_t chatId, const InputFile::Ptr& audio, int32_t duration = 0, int32_t replyToMessageId = 0,
+ Message::Ptr sendAudio(int64_t chatId, const InputFile::Ptr& audio, int32_t duration = 0,
+ const std::string& performer = "", const std::string& title = "", int32_t replyToMessageId = 0,
const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const;
/**
@@ -125,12 +128,15 @@ public:
* @param chatId Unique identifier for the target chat.
* @param audio Id of the audio that is already on the Telegram servers.
* @param duration Duration of sent audio in seconds.
+ * @param performer Performer
+ * @param title Track name
* @param replyToMessageId Optional. If the message is a reply, ID of the original message.
* @param replyMarkup Optional. Additional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user.
* @param disableNotification Optional. Sends the message silenty.
* @return On success, the sent message is returned.
*/
- Message::Ptr sendAudio(int64_t chatId, const std::string& audioId, int32_t duration = 0, int32_t replyToMessageId = 0,
+ Message::Ptr sendAudio(int64_t chatId, const std::string& audioId, int32_t duration = 0,
+ const std::string& performer = "", const std::string& title = "", int32_t replyToMessageId = 0,
const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const;
/**
@@ -206,6 +212,32 @@ public:
const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const;
/**
+ * Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message.
+ * @param chatId Unique identifier for the target chat.
+ * @param voice Audio file to send.
+ * @param duration Duration of send audio in seconds.
+ * @param replyToMessageId Optional. If the message is a reply, ID of the original message.
+ * @param replyMarkup Optional. Additional interface options. A object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user.
+ * @param disableNotification Optional. Sends the message silenty.
+ * @return On success, the sent message is returned.
+ */
+ Message::Ptr sendVoice(int64_t chatId, const InputFile::Ptr& voice, int duration = 0, int32_t replyToMessageId = 0,
+ const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const;
+
+ /**
+ * Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message.
+ * @param chatId Unique identifier for the target chat.
+ * @param voiceId Id of the voice that is already on the Telegram servers.
+ * @param duration Duration of send audio in seconds.
+ * @param replyToMessageId Optional. If the message is a reply, ID of the original message.
+ * @param replyMarkup Optional. Additional interface options. A object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user.
+ * @param disableNotification Optional. Sends the message silenty.
+ * @return On success, the sent message is returned.
+ */
+ Message::Ptr sendVoice(int64_t chatId, const std::string& voiceId, int duration = 0, int32_t replyToMessageId = 0,
+ const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const;
+
+ /**
* Use this method to send point on the map.
* @param chatId Unique identifier for the target chat.
* @param latitude Latitude of location.