tgbotxx  1.1.6.9
Telegram Bot C++ Library
SentWebAppMessage.hpp
Go to the documentation of this file.
1 #pragma once
3 
4 namespace tgbotxx {
8  SentWebAppMessage() = default;
9  explicit SentWebAppMessage(const nl::json& json) {
10  fromJson(json);
11  }
12 
15  std::string inlineMessageId;
16 
19  nl::json toJson() const {
20  nl::json json = nl::json::object();
21  OBJECT_SERIALIZE_FIELD(json, "inline_message_id", inlineMessageId);
22  return json;
23  }
24 
26  void fromJson([[maybe_unused]] const nl::json& json) {
27  OBJECT_DESERIALIZE_FIELD(json, "inline_message_id", inlineMessageId, "", false);
28  }
29  };
30 }
#define OBJECT_SERIALIZE_FIELD(json, json_field, field)
Available objects: https://core.telegram.org/bots/api#available-types.
Definition: Object.hpp:19
#define OBJECT_DESERIALIZE_FIELD(json, json_field, field, default_value, optional)
Deserialize.
Definition: Object.hpp:44
Definition: Api.hpp:14
Describes an inline message sent by a Web App on behalf of a user. https://core.telegram....
std::string inlineMessageId
Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attach...
nl::json toJson() const
Serializes this object to JSON.
void fromJson([[maybe_unused]] const nl::json &json)
Deserializes this object from JSON.
SentWebAppMessage(const nl::json &json)