Cppgram  1.0.0
Easy and modern C++14 Telegram Bot API wrapper
inline_query_result.hpp
1 #ifndef CPPGRAM_INLINE_QUERY_RESULT_HPP
2 #define CPPGRAM_INLINE_QUERY_RESULT_HPP
3 
4 #include <json/json.h>
5 #include <string>
6 
7 namespace cppgram
8 {
9 enum EParseMode : short;
10 
17 {
18  public:
24 
37  short newArticle( const std::string &title,
38  const std::string &message_text,
39  const Json::Value &reply_markup = Json::Value(),
40  const std::string &description = "",
41  const EParseMode parse_mode = static_cast<EParseMode>( 1 ),
42  const bool disable_web_page_preview = true );
43 
44  short newArticle( const std::string &title,
45  const std::string &message_text,
46  const std::string &description,
47  const Json::Value &reply_markup = Json::Value(),
48  const EParseMode parse_mode = static_cast<EParseMode>( 0 ),
49  const bool disable_web_page_preview = true,
50  const std::string &url = "",
51  const bool hide_url = false,
52  const std::string &thumb_url = "",
53  const int_fast32_t thumb_width = 0,
54  const int_fast32_t thumb_height = 0 );
55 
60  const Json::Value &getResults() const;
61 
62  private:
63  Json::Value results;
64  short articleId;
65 };
66 }
67 
68 #endif
Create articles to send as inlineQuery result.
Definition: inline_query_result.hpp:16
InlineQueryResult()
InlineQueryResult constructor.
const Json::Value & getResults() const
Get results to send in answerInlineQuery.
EParseMode
Formattation options.
Definition: enums.hpp:66
main namespace for Cppgram
Definition: enums.hpp:40
short newArticle(const std::string &title, const std::string &message_text, const Json::Value &reply_markup=Json::Value(), const std::string &description="", const EParseMode parse_mode=static_cast< EParseMode >(1), const bool disable_web_page_preview=true)
Add a new article to the results.