Cppgram  1.0.0
Easy and modern C++14 Telegram Bot API wrapper
Public Member Functions | List of all members
InlineQueryResult Class Reference

Create articles to send as inlineQuery result. More...

#include <inline_query_result.hpp>

Public Member Functions

 InlineQueryResult ()
 InlineQueryResult constructor. More...
 
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. More...
 
const Json::Value & getResults () const
 Get results to send in answerInlineQuery. More...
 

Detailed Description

Create articles to send as inlineQuery result.

Helper class to create articles and pass the results to answerInlineQuery

Constructor & Destructor Documentation

◆ InlineQueryResult()

InlineQueryResult constructor.

Returns
A new object

Member Function Documentation

◆ getResults()

const Json::Value& getResults ( ) const

Get results to send in answerInlineQuery.

Returns
The JSON containing the results

◆ newArticle()

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.

Parameters
titleTitle of the result
message_textText of the message to be sent, 1-4096 characters
reply_markupOptional. Inline keyboard attached to the message
descriptionOptional. Short description of the result
parse_modeOptional. Formatting option
disable_web_page_previewOptional. Disables link previews for links in the sent message
Returns
Id of the article

The documentation for this class was generated from the following file: