diff options
author | JellyBrick <shlee1503@naver.com> | 2018-05-28 19:39:17 +0900 |
---|---|---|
committer | JellyBrick <shlee1503@naver.com> | 2018-05-28 19:39:17 +0900 |
commit | 955e70900a847f79b632a65c850b510b737a2a2a (patch) | |
tree | 4d9b11968d7a65d930b638fb54f39cfd005804a0 /include/tgbot/Api.h | |
parent | ce9bcf9d653a0598b41fcf52708d01b396c6fd30 (diff) |
Bot API 3.6 update
Diffstat (limited to 'include/tgbot/Api.h')
-rw-r--r-- | include/tgbot/Api.h | 57 |
1 files changed, 35 insertions, 22 deletions
diff --git a/include/tgbot/Api.h b/include/tgbot/Api.h index 685f19e..ffce252 100644 --- a/include/tgbot/Api.h +++ b/include/tgbot/Api.h @@ -77,7 +77,8 @@ public: * @param disableNotification Optional. Sends the message silenty. * @return On success, the sent message is returned. */ - Message::Ptr sendMessage(int64_t chatId, const std::string& text, bool disableWebPagePreview = false, int32_t replyToMessageId = 0, const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), const std::string& parseMode = "", bool disableNotification = false) const; + Message::Ptr sendMessage(int64_t chatId, const std::string& text, bool disableWebPagePreview = false, int32_t replyToMessageId = 0, + const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), const std::string& parseMode = "", bool disableNotification = false) const; /** * Use this method to forward messages of any kind. @@ -96,11 +97,12 @@ public: * @param caption Optional. Photo caption. * @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 parseMode Optional. Set it to "Markdown" or "HTML" if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. * @param disableNotification Optional. Sends the message silenty. * @return On success, the sent message is returned. */ Message::Ptr sendPhoto(int64_t chatId, const InputFile::Ptr photo, const std::string& caption = "", int32_t replyToMessageId = 0, - const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), bool disableNotification = false) const; + const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), const std::string& parseMode = "", bool disableNotification = false) const; /** * Use this method to send photos. @@ -109,11 +111,12 @@ public: * @param caption Optional. Photo caption. * @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 parseMode Optional. Set it to "Markdown" or "HTML" if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. * @param disableNotification Optional. Sends the message silenty. * @return On success, the sent message is returned. */ Message::Ptr sendPhoto(int64_t chatId, const std::string& photoId, const std::string& caption = "", int32_t replyToMessageId = 0, - const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), bool disableNotification = false) const; + const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), const std::string& parseMode = "", 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. For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Document). @@ -125,12 +128,13 @@ public: * @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 parseMode Optional. Set it to "Markdown" or "HTML" if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. * @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, const std::string &caption = "", int32_t duration = 0, const std::string& performer = "", const std::string& title = "", int32_t replyToMessageId = 0, - const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), bool disableNotification = false) const; + const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), const std::string& parseMode = "", 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. For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Document). @@ -142,12 +146,13 @@ public: * @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 parseMode Optional. Set it to "Markdown" or "HTML" if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. * @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, const std::string &caption = "", int32_t duration = 0, const std::string& performer = "", const std::string& title = "", int32_t replyToMessageId = 0, - const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), bool disableNotification = false) const; + const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), const std::string& parseMode = "", bool disableNotification = false) const; /** * Use this method to send general files. @@ -156,11 +161,12 @@ public: * @param caption Document caption (may also be used when resending documents by file_id), 0-200 characters * @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 parseMode Optional. Set it to "Markdown" or "HTML" if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. * @param disableNotification Optional. Sends the message silenty. * @return On success, the sent message is returned. */ Message::Ptr sendDocument(int64_t chatId, const InputFile::Ptr document, const std::string &caption = "", int32_t replyToMessageId = 0, - const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), bool disableNotification = false) const; + const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), const std::string& parseMode = "", bool disableNotification = false) const; /** * Use this method to send general files. @@ -169,11 +175,12 @@ public: * @param caption Document caption (may also be used when resending documents by file_id), 0-200 characters * @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 parseMode Optional. Set it to "Markdown" or "HTML" if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. * @param disableNotification Optional. Sends the message silenty. * @return On success, the sent message is returned. */ Message::Ptr sendDocument(int64_t chatId, const std::string& documentId, const std::string &caption = "", int32_t replyToMessageId = 0, - const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), bool disableNotification = false) const; + const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), const std::string& parseMode = "", bool disableNotification = false) const; /** * Use this method to send .webp stickers. @@ -287,33 +294,37 @@ public: * Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document). * @param chatId Unique identifier for the target chat. * @param video Video to send. - * @param duration Duration of sent video in seconds - * @param width Video width - * @param height Video height - * @param caption Video caption (may also be used when resending videos by file_id), 0-200 characters + * @param supportsStreaming Optional. Pass True, if the uploaded video is suitable for streaming. + * @param duration Optional. Duration of sent video in seconds + * @param width Optional. Video width + * @param height Optional. Video height + * @param caption Optional. Video caption (may also be used when resending videos by file_id), 0-200 characters * @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 parseMode Optional. Set it to "Markdown" or "HTML" if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. * @param disableNotification Optional. Sends the message silenty. * @return On success, the sent message is returned. */ - Message::Ptr sendVideo(int64_t chatId, const InputFile::Ptr video, int32_t duration = 0, int32_t width = 0, int32_t height = 0, const std::string& caption = "", - int32_t replyToMessageId = 0, const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), bool disableNotification = false) const; + Message::Ptr sendVideo(int64_t chatId, const InputFile::Ptr video, bool supportsStreaming = false, int32_t duration = 0, int32_t width = 0, int32_t height = 0, const std::string& caption = "", + int32_t replyToMessageId = 0, const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), const std::string& parseMode = "", bool disableNotification = false) const; /** * Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document). * @param chatId Unique identifier for the target chat. - * @param video Id of the video that is already on the Telegram servers. - * @param duration Duration of sent video in seconds - * @param width Video width - * @param height Video height - * @param caption Video caption (may also be used when resending videos by file_id), 0-200 characters + * @param videoId Id of the video that is already on the Telegram servers. + * @param supportsStreaming Optional. Pass True, if the uploaded video is suitable for streaming. + * @param duration Optional. Duration of sent video in seconds + * @param width Optional. Video width + * @param height Optional. Video height + * @param caption Optional. Video caption (may also be used when resending videos by file_id), 0-200 characters * @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 parseMode Optional. Set it to "Markdown" or "HTML" if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. * @param disableNotification Optional. Sends the message silenty. * @return On success, the sent message is returned. */ - Message::Ptr sendVideo(int64_t chatId, const std::string& videoId, int32_t duration = 0, int32_t width = 0, int32_t height = 0, const std::string& caption = "", - int32_t replyToMessageId = 0, const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), bool disableNotification = false) const; + Message::Ptr sendVideo(int64_t chatId, const std::string& videoId, bool supportsStreaming = false, int32_t duration = 0, int32_t width = 0, int32_t height = 0, const std::string& caption = "", + int32_t replyToMessageId = 0, const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), const std::string& parseMode = "", bool disableNotification = false) const; /** * Use this method to send video messages. On success, the sent Message is returned. @@ -362,11 +373,12 @@ public: * @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 parseMode Optional. Set it to "Markdown" or "HTML" if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. * @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, const std::string& caption = "", int duration = 0, int32_t replyToMessageId = 0, - const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), bool disableNotification = false) const; + const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), const std::string& parseMode = "", 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. @@ -376,11 +388,12 @@ public: * @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 parseMode Optional. Set it to "Markdown" or "HTML" if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. * @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, const std::string& caption = "", int duration = 0, int32_t replyToMessageId = 0, - const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), bool disableNotification = false) const; + const GenericReply::Ptr replyMarkup = std::make_shared<GenericReply>(), const std::string& parseMode = "", bool disableNotification = false) const; /** * Use this method to send point on the map. |