diff options
author | Konstantin Kukin <kukin.konstantin@gmail.com> | 2016-12-27 15:17:11 +0300 |
---|---|---|
committer | Konstantin Kukin <kukin.konstantin@gmail.com> | 2016-12-27 15:17:11 +0300 |
commit | c912fac6016ec582ac3bfeec642a9b758562c994 (patch) | |
tree | 561b586a14da851ca4fa3cbd4c805eecdf432e6f /include | |
parent | 76d3a4c33a8808552b55b1bf36934b455528a150 (diff) |
upgrade existing inline type and create new
Diffstat (limited to 'include')
27 files changed, 917 insertions, 32 deletions
diff --git a/include/tgbot/types/ChosenInlineResult.h b/include/tgbot/types/ChosenInlineResult.h index c6d730e..4492e52 100644 --- a/include/tgbot/types/ChosenInlineResult.h +++ b/include/tgbot/types/ChosenInlineResult.h @@ -9,6 +9,7 @@ #include <memory> #include "tgbot/types/User.h" +#include "tgbot/types/Location.h" namespace TgBot { @@ -31,6 +32,18 @@ public: User::Ptr from; /** + * Optional. Sender location, only for bots that require user location + */ + Location::Ptr location; + + /** + * Optional. Identifier of the sent inline message. + * Available only if there is an inline keyboard attached to the message. + * Will be also received in callback queries and can be used to edit the message. + */ + std::string inlineMessageId; + + /** * The query that was used to obtain the result. */ std::string query; diff --git a/include/tgbot/types/InlineQueryResult.h b/include/tgbot/types/InlineQueryResult.h index d3eb968..6dad81b 100644 --- a/include/tgbot/types/InlineQueryResult.h +++ b/include/tgbot/types/InlineQueryResult.h @@ -8,6 +8,9 @@ #include <memory> #include <string> +#include "tgbot/types/InlineKeyboardMarkup.h" +#include "tgbot/types/InputMessageContent.h" + namespace TgBot { /** @@ -19,7 +22,7 @@ public: typedef std::shared_ptr<InlineQueryResult> Ptr; InlineQueryResult() { - this->disableWebPagePreview = false; + //this->disableWebPagePreview = false; } virtual ~InlineQueryResult() { } @@ -40,26 +43,19 @@ public: std::string title; /** - * Text of the message t be sent. (1-4096 characters) - */ - std::string messageText; - - /** - * Optional. Send Markdown or HTML, if you want Telegram apps to - * show bold, italic, fixed-width text or inline URLs in your bot's message. - */ - std::string parseMode; - - /** - * Optional. Disables link previews for links in the send message. - */ - bool disableWebPagePreview; - - /** - * Optional. Url of the thumbnail for the result. - */ - std::string thumbUrl; - + * Optional. Caption of the file to be sent, 0-200 characters + */ + std::string caption; + + /** + * Optional. Inline keyboard attached to the message + */ + InlineKeyboardMarkup::Ptr replyMarkup; + + /** + * Content of the message to be sent + */ + InputMessageContent::Ptr inputMessageContent; }; } diff --git a/include/tgbot/types/InlineQueryResultArticle.h b/include/tgbot/types/InlineQueryResultArticle.h index c903255..924963c 100644 --- a/include/tgbot/types/InlineQueryResultArticle.h +++ b/include/tgbot/types/InlineQueryResultArticle.h @@ -44,6 +44,11 @@ public: */ std::string description; + /** + * Optional. Url of the thumbnail for the result + */ + std::string thumbUrl; + /** * Optional. Thumbnail width. */ diff --git a/include/tgbot/types/InlineQueryResultAudio.h b/include/tgbot/types/InlineQueryResultAudio.h new file mode 100644 index 0000000..7c02e4e --- /dev/null +++ b/include/tgbot/types/InlineQueryResultAudio.h @@ -0,0 +1,47 @@ +// +// Created by Konstantin Kukin on 27/12/16 +// + +#ifndef TGBOT_INLINEQUERYRESULTAUDIO_H +#define TGBOT_INLINEQUERYRESULTAUDIO_H + +#include <string> +#include <memory> + +#include "tgbot/types/InlineQueryResult.h" + +namespace TgBot { + +/** + * Represents a link to an mp3 audio file. + * @ingroup types + */ +class InlineQueryResultAudio : public InlineQueryResult { +public: + static const std::string TYPE; + + typedef std::shared_ptr<InlineQueryResultAudio> Ptr; + + InlineQueryResultAudio() { + this->type = TYPE; + this->audioDuration = 0; + } + + /** + * A valid URL for the audio file + */ + std::string audioUrl; + + /** + * Optional. Performer + */ + std::string performer; + + /** + * Optional. Audio duration in seconds + */ + int32_t audioDuration; +}; +} + +#endif //TGBOT_INLINEQUERYRESULTAUDIO_H diff --git a/include/tgbot/types/InlineQueryResultCachedAudio.h b/include/tgbot/types/InlineQueryResultCachedAudio.h new file mode 100644 index 0000000..db1db2f --- /dev/null +++ b/include/tgbot/types/InlineQueryResultCachedAudio.h @@ -0,0 +1,37 @@ +// +// Created by Konstantin Kukin on 27/12/16. +// + +#ifndef TGBOT_INLINEQUERYRESULTCACHEDAUDIO_H +#define TGBOT_INLINEQUERYRESULTCACHEDAUDIO_H + +#include <string> +#include <memory> + +#include "tgbot/types/InlineQueryResult.h" + +namespace TgBot { + +/** + * Represents a link to an mp3 audio file stored on the Telegram servers. + * @ingroup types + */ +class InlineQueryResultCachedAudio : public InlineQueryResult { +public: + static const std::string TYPE; + + typedef std::shared_ptr<InlineQueryResultCachedAudio> Ptr; + + InlineQueryResultCachedAudio() { + this->type = TYPE; + } + + /** + * A valid file identifier for the audio file + */ + std::string audioFileId; + +}; +} + +#endif //TGBOT_INLINEQUERYRESULTCACHEDAUDIO_H diff --git a/include/tgbot/types/InlineQueryResultCachedDocument.h b/include/tgbot/types/InlineQueryResultCachedDocument.h new file mode 100644 index 0000000..60ad19d --- /dev/null +++ b/include/tgbot/types/InlineQueryResultCachedDocument.h @@ -0,0 +1,41 @@ +// +// Created by Konstantin Kukin on 27/12/16. +// + +#ifndef TGBOT_INLINEQUERYRESULTCACHEDDOCUMENT_H +#define TGBOT_INLINEQUERYRESULTCACHEDDOCUMENT_H + +#include <string> +#include <memory> + +#include "tgbot/types/InlineQueryResult.h" + +namespace TgBot { + +/** + * Represents a link to a file stored on the Telegram servers. + * @ingroup types + */ +class InlineQueryResultCachedDocument : public InlineQueryResult { +public: + static const std::string TYPE; + + typedef std::shared_ptr<InlineQueryResultCachedDocument> Ptr; + + InlineQueryResultCachedDocument() { + this->type = TYPE; + } + + /** + * A valid file identifier for the file + */ + std::string documentFileId; + + /** + * Optional. Short description of the result + */ + std::string description; +}; +} + +#endif //TGBOT_INLINEQUERYRESULTCACHEDDOCUMENT_H diff --git a/include/tgbot/types/InlineQueryResultCachedGif.h b/include/tgbot/types/InlineQueryResultCachedGif.h new file mode 100644 index 0000000..e360d4d --- /dev/null +++ b/include/tgbot/types/InlineQueryResultCachedGif.h @@ -0,0 +1,37 @@ +// +// Created by Konstantin Kukin on 27/12/16. +// + +#ifndef TGBOT_INLINEQUERYRESULTCACHEDGIF_H +#define TGBOT_INLINEQUERYRESULTCACHEDGIF_H + +#include <string> +#include <memory> + +#include "tgbot/types/InlineQueryResult.h" + +namespace TgBot { + +/** + * Represents a link to an animated GIF file stored on the Telegram servers. + * @ingroup types + */ +class InlineQueryResultCachedGif : public InlineQueryResult { +public: + static const std::string TYPE; + + typedef std::shared_ptr<InlineQueryResultCachedGif> Ptr; + + InlineQueryResultCachedGif() { + this->type = TYPE; + } + + /** + * A valid file identifier for the GIF file + */ + std::string gifFileId; + +}; +} + +#endif //TGBOT_INLINEQUERYRESULTCACHEDGIF_H diff --git a/include/tgbot/types/InlineQueryResultCachedMpeg4Gif.h b/include/tgbot/types/InlineQueryResultCachedMpeg4Gif.h new file mode 100644 index 0000000..55c7f92 --- /dev/null +++ b/include/tgbot/types/InlineQueryResultCachedMpeg4Gif.h @@ -0,0 +1,37 @@ +// +// Created by Konstantin Kukin on 27/12/16. +// + +#ifndef TGBOT_INLINEQUERYRESULTCACHEDMPEG4GIF_H +#define TGBOT_INLINEQUERYRESULTCACHEDMPEG4GIF_H + +#include <string> +#include <memory> + +#include "tgbot/types/InlineQueryResult.h" + +namespace TgBot { + +/** + * Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. + * @ingroup types + */ +class InlineQueryResultCachedMpeg4Gif : public InlineQueryResult { +public: + static const std::string TYPE; + + typedef std::shared_ptr<InlineQueryResultCachedMpeg4Gif> Ptr; + + InlineQueryResultCachedMpeg4Gif() { + this->type = TYPE; + } + + /** + * A valid file identifier for the MP4 file + */ + std::string mpeg4FileId; + +}; +} + +#endif //TGBOT_INLINEQUERYRESULTCACHEDMPEG4GIF_H diff --git a/include/tgbot/types/InlineQueryResultCachedPhoto.h b/include/tgbot/types/InlineQueryResultCachedPhoto.h new file mode 100644 index 0000000..ac21224 --- /dev/null +++ b/include/tgbot/types/InlineQueryResultCachedPhoto.h @@ -0,0 +1,41 @@ +// +// Created by Konstantin Kukin on 27/12/16. +// + +#ifndef TGBOT_INLINEQUERYRESULTCACHEDPHOTO_H +#define TGBOT_INLINEQUERYRESULTCACHEDPHOTO_H + +#include <string> +#include <memory> + +#include "tgbot/types/InlineQueryResult.h" + +namespace TgBot { + +/** + * Represents a link to a photo stored on the Telegram servers. + * @ingroup types + */ +class InlineQueryResultCachedPhoto : public InlineQueryResult { +public: + static const std::string TYPE; + + typedef std::shared_ptr<InlineQueryResultCachedPhoto> Ptr; + + InlineQueryResultCachedPhoto() { + this->type = TYPE; + } + + /** + * A valid file identifier of the photo + */ + std::string photoFileId; + + /** + * Optional. Short description of the result + */ + std::string description; +}; +} + +#endif //TGBOT_INLINEQUERYRESULTCACHEDPHOTO_H diff --git a/include/tgbot/types/InlineQueryResultCachedSticker.h b/include/tgbot/types/InlineQueryResultCachedSticker.h new file mode 100644 index 0000000..597479c --- /dev/null +++ b/include/tgbot/types/InlineQueryResultCachedSticker.h @@ -0,0 +1,36 @@ +// +// Created by Konstantin Kukin on 27/12/16. +// + +#ifndef TGBOT_INLINEQUERYRESULTCACHEDSTICKER_H +#define TGBOT_INLINEQUERYRESULTCACHEDSTICKER_H + +#include <string> +#include <memory> + +#include "tgbot/types/InlineQueryResult.h" + +namespace TgBot { + +/** + * Represents a link to a sticker stored on the Telegram servers. + * @ingroup types + */ +class InlineQueryResultCachedSticker : public InlineQueryResult { +public: + static const std::string TYPE; + + typedef std::shared_ptr<InlineQueryResultCachedSticker> Ptr; + + InlineQueryResultCachedSticker() { + this->type = TYPE; + } + + /** + * A valid file identifier of the sticker + */ + std::string stickerFileId; +}; +} + +#endif //TGBOT_INLINEQUERYRESULTCACHEDSTICKER_H diff --git a/include/tgbot/types/InlineQueryResultCachedVideo.h b/include/tgbot/types/InlineQueryResultCachedVideo.h new file mode 100644 index 0000000..48010bf --- /dev/null +++ b/include/tgbot/types/InlineQueryResultCachedVideo.h @@ -0,0 +1,41 @@ +// +// Created by Konstantin Kukin on 27/12/16. +// + +#ifndef TGBOT_INLINEQUERYRESULTCACHEDVIDEO_H +#define TGBOT_INLINEQUERYRESULTCACHEDVIDEO_H + +#include <string> +#include <memory> + +#include "tgbot/types/InlineQueryResult.h" + +namespace TgBot { + +/** + * Represents a link to a video file stored on the Telegram servers. + * @ingroup types + */ +class InlineQueryResultCachedVideo : public InlineQueryResult { +public: + static const std::string TYPE; + + typedef std::shared_ptr<InlineQueryResultCachedVideo> Ptr; + + InlineQueryResultCachedVideo() { + this->type = TYPE; + } + + /** + * A valid file identifier of the video + */ + std::string videoFileId; + + /** + * Optional. Short description of the result + */ + std::string description; +}; +} + +#endif //TGBOT_INLINEQUERYRESULTCACHEDVIDEO_H diff --git a/include/tgbot/types/InlineQueryResultCachedVoice.h b/include/tgbot/types/InlineQueryResultCachedVoice.h new file mode 100644 index 0000000..1e70ff5 --- /dev/null +++ b/include/tgbot/types/InlineQueryResultCachedVoice.h @@ -0,0 +1,36 @@ +// +// Created by Konstantin Kukin on 27/12/16. +// + +#ifndef TGBOT_INLINEQUERYRESULTCACHEDVOICE_H +#define TGBOT_INLINEQUERYRESULTCACHEDVOICE_H + +#include <string> +#include <memory> + +#include "tgbot/types/InlineQueryResult.h" + +namespace TgBot { + +/** + * Represents a link to a voice message stored on the Telegram servers. + * @ingroup types + */ +class InlineQueryResultCachedVoice : public InlineQueryResult { +public: + static const std::string TYPE; + + typedef std::shared_ptr<InlineQueryResultCachedVoice> Ptr; + + InlineQueryResultCachedVoice() { + this->type = TYPE; + } + + /** + * A valid file identifier of the voice message + */ + std::string voiceFileId; +}; +} + +#endif //TGBOT_INLINEQUERYRESULTCACHEDVOICE_H diff --git a/include/tgbot/types/InlineQueryResultContact.h b/include/tgbot/types/InlineQueryResultContact.h new file mode 100644 index 0000000..80d04d5 --- /dev/null +++ b/include/tgbot/types/InlineQueryResultContact.h @@ -0,0 +1,63 @@ +// +// Created by Konstantin Kukin on 27/12/16 +// + +#ifndef TGBOT_INLINEQUERYRESULTCONTACT_H +#define TGBOT_INLINEQUERYRESULTCONTACT_H + +#include <string> +#include <memory> + +#include "tgbot/types/InlineQueryResult.h" + +namespace TgBot { + +/** + * Represents a contact with a phone number + * @ingroup types + */ +class InlineQueryResultContact : public InlineQueryResult { +public: + static const std::string TYPE; + + typedef std::shared_ptr<InlineQueryResultContact> Ptr; + + InlineQueryResultContact() { + this->type = TYPE; + this->thumbHeight = 0; + this->thumbWidth = 0; + } + + /** + * Contact's phone number + */ + std::string phoneNumber; + + /** + * Contact's first name + */ + std::string firstName; + + /** + * Optional. Contact's last name + */ + std::string lastName; + + /** + * Optional. Url of the thumbnail for the result + */ + std::string thumbUrl; + + /** + * Optional. Thumbnail width. + */ + int32_t thumbWidth; + + /** + * Optinal. Thumbnail height + */ + int32_t thumbHeight; +}; +} + +#endif //TGBOT_INLINEQUERYRESULTCONTACT_H diff --git a/include/tgbot/types/InlineQueryResultDocument.h b/include/tgbot/types/InlineQueryResultDocument.h new file mode 100644 index 0000000..70e0d33 --- /dev/null +++ b/include/tgbot/types/InlineQueryResultDocument.h @@ -0,0 +1,63 @@ +// +// Created by Konstantin Kukin on 27/12/16 +// + +#ifndef TGBOT_INLINEQUERYRESULTDOCUMENT_H +#define TGBOT_INLINEQUERYRESULTDOCUMENT_H + +#include <string> +#include <memory> + +#include "tgbot/types/InlineQueryResult.h" + +namespace TgBot { + +/** + * Represents a link to a file. + * @ingroup types + */ +class InlineQueryResultDocument : public InlineQueryResult { +public: + static const std::string TYPE; + + typedef std::shared_ptr<InlineQueryResultDocument> Ptr; + + InlineQueryResultDocument() { + this->type = TYPE; + this->thumbHeight = 0; + this->thumbWidth = 0; + } + + /** + * A valid URL for the file + */ + std::string documentUrl; + + /** + * Mime type of the content of the file, either “application/pdf” or “application/zip” + */ + std::string mimeType; + + /** + * Optional. Short description of the result + */ + std::string description; + + /** + * Optional. Url of the thumbnail for the result + */ + std::string thumbUrl; + + /** + * Optional. Thumbnail width. + */ + int32_t thumbWidth; + + /** + * Optinal. Thumbnail height + */ + int32_t thumbHeight; +}; +} + +#endif //TGBOT_INLINEQUERYRESULTDOCUMENT_H diff --git a/include/tgbot/types/InlineQueryResultGame.h b/include/tgbot/types/InlineQueryResultGame.h new file mode 100644 index 0000000..d06d1bd --- /dev/null +++ b/include/tgbot/types/InlineQueryResultGame.h @@ -0,0 +1,36 @@ +// +// Created by Konstantin Kukin on 27/12/16 +// + +#ifndef TGBOT_INLINEQUERYRESULTGAME_H +#define TGBOT_INLINEQUERYRESULTGAME_H + +#include <string> +#include <memory> + +#include "tgbot/types/InlineQueryResult.h" + +namespace TgBot { + +/** + * Represents a Game. + * @ingroup types + */ +class InlineQueryResultGame : public InlineQueryResult { +public: + static const std::string TYPE; + + typedef std::shared_ptr<InlineQueryResultGame> Ptr; + + InlineQueryResultGame() { + this->type = TYPE; + } + + /** + * Short name of the game + */ + std::string gameShortName; +}; +} + +#endif //TGBOT_INLINEQUERYRESULTGAME_H diff --git a/include/tgbot/types/InlineQueryResultGif.h b/include/tgbot/types/InlineQueryResultGif.h index 8892f56..0dc67e8 100644 --- a/include/tgbot/types/InlineQueryResultGif.h +++ b/include/tgbot/types/InlineQueryResultGif.h @@ -44,9 +44,9 @@ public: int32_t gifHeight; /** - * Optional. Caption for the GIF file to be sent. + * URL of the static thumbnail for the result (jpeg or gif) */ - std::string caption; + std::string thumbUrl; }; } diff --git a/include/tgbot/types/InlineQueryResultLocation.h b/include/tgbot/types/InlineQueryResultLocation.h new file mode 100644 index 0000000..e5cf6ab --- /dev/null +++ b/include/tgbot/types/InlineQueryResultLocation.h @@ -0,0 +1,58 @@ +// +// Created by Konstantin Kukin on 27/12/16 +// + +#ifndef TGBOT_INLINEQUERYRESULTLOCATION_H +#define TGBOT_INLINEQUERYRESULTLOCATION_H + +#include <string> +#include <memory> + +#include "tgbot/types/InlineQueryResult.h" + +namespace TgBot { + +/** + * Represents a location on a map. + * @ingroup types + */ +class InlineQueryResultLocation : public InlineQueryResult { +public: + static const std::string TYPE; + + typedef std::shared_ptr<InlineQueryResultLocation> Ptr; + + InlineQueryResultLocation() { + this->type = TYPE; + this->thumbHeight = 0; + this->thumbWidth = 0; + } + + /** + * Location latitude in degrees + */ + float latitude; + + /** + * Location longitude in degrees + */ + float longitude; + + /** + * Optional. Url of the thumbnail for the result + */ + std::string thumbUrl; + + /** + * Optional. Thumbnail width. + */ + int32_t thumbWidth; + + /** + * Optinal. Thumbnail height + */ + int32_t thumbHeight; +}; +} + +#endif //TGBOT_INLINEQUERYRESULTLOCATION_H diff --git a/include/tgbot/types/InlineQueryResultMpeg4Gif.h b/include/tgbot/types/InlineQueryResultMpeg4Gif.h index 0ba80aa..c1dbb9e 100644 --- a/include/tgbot/types/InlineQueryResultMpeg4Gif.h +++ b/include/tgbot/types/InlineQueryResultMpeg4Gif.h @@ -39,10 +39,9 @@ public: int32_t mpeg4Height; /** - * Optional. Caption of the MPEG-4 file to be sent. - */ - std::string caption; - + * URL of the static thumbnail (jpeg or gif) for the result + */ + std::string thumbUrl; }; } diff --git a/include/tgbot/types/InlineQueryResultPhoto.h b/include/tgbot/types/InlineQueryResultPhoto.h index 1c333f6..b689d35 100644 --- a/include/tgbot/types/InlineQueryResultPhoto.h +++ b/include/tgbot/types/InlineQueryResultPhoto.h @@ -33,6 +33,11 @@ public: */ std::string photoUrl; + /** + * URL of the thumbnail for the photo + */ + std::string thumbUrl; + /** * Optional. Width of the photo. */ @@ -47,11 +52,6 @@ public: * Optional. Short description of the result. */ std::string description; - - /** - * Optional. Caption of the photo to be sent. - */ - std::string caption; }; } diff --git a/include/tgbot/types/InlineQueryResultVenue.h b/include/tgbot/types/InlineQueryResultVenue.h new file mode 100644 index 0000000..c2e47c5 --- /dev/null +++ b/include/tgbot/types/InlineQueryResultVenue.h @@ -0,0 +1,68 @@ +// +// Created by Konstantin Kukin on 27/12/16 +// + +#ifndef TGBOT_INLINEQUERYRESULTVENUE_H +#define TGBOT_INLINEQUERYRESULTVENUE_H + +#include <string> +#include <memory> + +#include "tgbot/types/InlineQueryResult.h" + +namespace TgBot { + +/** + * Represents a venue. + * @ingroup types + */ +class InlineQueryResultVenue : public InlineQueryResult { +public: + static const std::string TYPE; + + typedef std::shared_ptr<InlineQueryResultVenue> Ptr; + + InlineQueryResultVenue() { + this->type = TYPE; + this->thumbHeight = 0; + this->thumbWidth = 0; + } + + /** + * Latitude of the venue location in degrees + */ + float latitude; + + /** + * Longitude of the venue location in degrees + */ + float longitude; + + /** + * Address of the venue + */ + std::string address; + + /** + * Optional. Foursquare identifier of the venue if known + */ + std::string foursquareId; + + /** + * Optional. Url of the thumbnail for the result + */ + std::string thumbUrl; + + /** + * Optional. Thumbnail width. + */ + int32_t thumbWidth; + + /** + * Optinal. Thumbnail height + */ + int32_t thumbHeight; +}; +} + +#endif //TGBOT_INLINEQUERYRESULTVENUE_H diff --git a/include/tgbot/types/InlineQueryResultVideo.h b/include/tgbot/types/InlineQueryResultVideo.h index 6449c6d..1515486 100644 --- a/include/tgbot/types/InlineQueryResultVideo.h +++ b/include/tgbot/types/InlineQueryResultVideo.h @@ -35,6 +35,11 @@ public: std::string mimeType; /** + * URL of the thumbnail (jpeg only) for the video + */ + std::string thumbUrl; + + /** * Optional. Video width. */ int32_t videoWidth; diff --git a/include/tgbot/types/InlineQueryResultVoice.h b/include/tgbot/types/InlineQueryResultVoice.h new file mode 100644 index 0000000..2bc4aac --- /dev/null +++ b/include/tgbot/types/InlineQueryResultVoice.h @@ -0,0 +1,37 @@ +// +// Created by Konstantin Kukin on 27/12/16 +// + +#ifndef TGBOT_INLINEQUERYRESULTVOICE_H +#define TGBOT_INLINEQUERYRESULTVOICE_H + +namespace TgBot { + +/** + * Represents link to a page containing an embedded video player or a video file. + * @ingroup types + */ +class InlineQueryResultVoice : public InlineQueryResult { +public: + static const std::string TYPE; + + typedef std::shared_ptr<InlineQueryResultVoice> Ptr; + + InlineQueryResultVoice() { + this->type = TYPE; + this->voiceDuration = 0; + }; + + /** + * A valid URL for the voice recording + */ + std::string voiceUrl; + + /** + * Optional. Recording duration in seconds + */ + int32_t voiceDuration; +}; +} + +#endif //TGBOT_INLINEQUERYRESULTVOICE_H diff --git a/include/tgbot/types/InputContactMessageContent.h b/include/tgbot/types/InputContactMessageContent.h new file mode 100644 index 0000000..84ba907 --- /dev/null +++ b/include/tgbot/types/InputContactMessageContent.h @@ -0,0 +1,40 @@ +// +// Created by Konstantin Kukin on 26/12/16. +// + +#ifndef TGBOT_INPUTCONTACTMESSAGECONTENT_H +#define TGBOT_INPUTCONTACTMESSAGECONTENT_H + +#include <memory> +#include <string> + +namespace TgBot { + +/** +* Represents the content of a contact message to be sent as the result of an inline query. +* @ingroup types +*/ +class InputContactMessageContent : public InputMessageContent { +public: + typedef std::shared_ptr<InputContactMessageContent> Ptr; + + /** + * Contact's phone number + */ + std::string phoneNumber; + + /** + * Contact's first name + */ + std::string firstName; + + /** + * Optional. Contact's last name + */ + std::string lastName; + + virtual ~InputContactMessageContent() { } +}; +} + +#endif //TGBOT_INPUTCONTACTMESSAGECONTENT_H diff --git a/include/tgbot/types/InputLocationMessageContent.h b/include/tgbot/types/InputLocationMessageContent.h new file mode 100644 index 0000000..737ca9f --- /dev/null +++ b/include/tgbot/types/InputLocationMessageContent.h @@ -0,0 +1,34 @@ +// +// Created by Konstantin Kukin on 26/12/16. +// + +#ifndef TGBOT_INPUTLOCATIONMESSAGECONTENT_H +#define TGBOT_INPUTLOCATIONMESSAGECONTENT_H + +#include <memory> + +namespace TgBot { + +/** +* Represents the content of a location message to be sent as the result of an inline query. +* @ingroup types +*/ +class InputLocationMessageContent : public InputMessageContent { +public: + typedef std::shared_ptr<InputLocationMessageContent> Ptr; + + /** + * Latitude of the location in degrees + */ + float latitude; + + /** + * Longitude of the location in degrees + */ + float longitude; + + virtual ~InputLocationMessageContent() { } +}; +} + +#endif //TGBOT_INPUTLOCATIONMESSAGECONTENT_H diff --git a/include/tgbot/types/InputMessageContent.h b/include/tgbot/types/InputMessageContent.h new file mode 100644 index 0000000..2063c08 --- /dev/null +++ b/include/tgbot/types/InputMessageContent.h @@ -0,0 +1,24 @@ +// +// Created by Konstantin Kukin on 26/12/16. +// + +#ifndef TGBOT_INPUTMESSAGECONTENT_H +#define TGBOT_INPUTMESSAGECONTENT_H + +#include <memory> + +namespace TgBot { + +/** +* This object represents the content of a message to be sent as a result of an inline query. +* @ingroup types +*/ +class InputMessageContent { +public: + typedef std::shared_ptr<InputMessageContent> Ptr; + + virtual ~InputMessageContent() { } +}; +} + +#endif //TGBOT_INPUTMESSAGECONTENT_H diff --git a/include/tgbot/types/InputTextMessageContent.h b/include/tgbot/types/InputTextMessageContent.h new file mode 100644 index 0000000..4960164 --- /dev/null +++ b/include/tgbot/types/InputTextMessageContent.h @@ -0,0 +1,40 @@ +// +// Created by Konstantin Kukin on 26/12/16. +// + +#ifndef TGBOT_INPUTTEXTMESSAGECONTENT_H +#define TGBOT_INPUTTEXTMESSAGECONTENT_H + +#include <memory> +#include <string> + +namespace TgBot { + +/** +* Represents the content of a text message to be sent as the result of an inline query. +* @ingroup types +*/ +class InputTextMessageContent : public InputMessageContent { +public: + typedef std::shared_ptr<InputTextMessageContent> Ptr; + + /** + * Text of the message to be sent, 1-4096 characters + */ + std::string messageText; + + /** + * Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. + */ + std::string parseMode; + + /** + * Optional. Disables link previews for links in the sent message + */ + bool disableWebPagePreview; + + virtual ~InputTextMessageContent() { } +}; +} + +#endif //TGBOT_INPUTTEXTMESSAGECONTENT_H diff --git a/include/tgbot/types/InputVenueMessageContent.h b/include/tgbot/types/InputVenueMessageContent.h new file mode 100644 index 0000000..0b5eab7 --- /dev/null +++ b/include/tgbot/types/InputVenueMessageContent.h @@ -0,0 +1,51 @@ +// +// Created by Konstantin Kukin on 26/12/16. +// + + +#ifndef TGBOT_INPUTVENUEMESSAGECONTENT_H +#define TGBOT_INPUTVENUEMESSAGECONTENT_H + +#include <memory> +#include <string> + +namespace TgBot { + +/** +* Represents the content of a venue message to be sent as the result of an inline query. +* @ingroup types +*/ +class InputVenueMessageContent : public InputMessageContent { +public: + typedef std::shared_ptr<InputVenueMessageContent> Ptr; + + /** + * Latitude of the location in degrees + */ + float latitude; + + /** + * Longitude of the location in degrees + */ + float longitude; + + /** + * Name of the venue + */ + std::string title; + + /** + * Address of the venue + */ + std::string address; + + /** + * Optional. Foursquare identifier of the venue, if known + */ + std::string foursquare_id; + + virtual ~InputVenueMessageContent() { } +}; +} + +#endif //TGBOT_INPUTVENUEMESSAGECONTENT_H |