1 #ifndef CPPGRAM_CHOOSEN_INLINE_RESULT_HPP 2 #define CPPGRAM_CHOOSEN_INLINE_RESULT_HPP 8 #include "location.hpp" 34 std::experimental::optional<Location>
location;
45 : result_id( json_chosen_inline_result[
"result_id"].asString() )
46 , from( json_chosen_inline_result[
"from"] )
47 , query( json_chosen_inline_result[
"query"].asString() )
49 if ( !json_chosen_inline_result[
"location"].isNull() )
51 location.emplace(
Location( json_chosen_inline_result[
"location"] ) );
54 if ( !json_chosen_inline_result[
"inline_message_id"].isNull() )
56 inline_message_id.emplace( json_chosen_inline_result[
"inline_message_id"].asString() );
std::string result_id
The unique identifier for the result that was chosen.
Definition: chosen_inline_result.hpp:28
std::experimental::optional< std::string > inline_message_id
Optional. Identifier of the sent inline message.
Definition: chosen_inline_result.hpp:39
User from
The user that chose the result.
Definition: chosen_inline_result.hpp:31
A location send by a user.
Definition: location.hpp:19
main namespace for Cppgram
std::string query
The query that was used to obtain the result.
Definition: chosen_inline_result.hpp:42
std::experimental::optional< Location > location
Optional. Sender location, only for bots that require user location
Definition: chosen_inline_result.hpp:34
User object.
Definition: user.hpp:20
A inline query choosed by the user.
Definition: chosen_inline_result.hpp:22