tgbotxx 1.1.9.2
Telegram Bot C++ Library
Loading...
Searching...
No Matches
UserChatBoosts.hpp
Go to the documentation of this file.
1#pragma once
4
5namespace tgbotxx {
6
10 UserChatBoosts() = default;
11 explicit UserChatBoosts(const nl::json& json) {
12 fromJson(json);
13 }
14
16 std::vector<Ptr<ChatBoost>> boosts;
17
20 nl::json toJson() const {
21 nl::json json = nl::json::object();
23 return json;
24 }
25
27 void fromJson(const nl::json& json) {
28 OBJECT_DESERIALIZE_FIELD_PTR_ARRAY(json, "boosts", boosts, false);
29 }
30 };
31
32}
#define OBJECT_SERIALIZE_FIELD_PTR_ARRAY(json, json_field, array_field)
Definition Object.hpp:27
#define OBJECT_DESERIALIZE_FIELD_PTR_ARRAY(json, json_field, array_field, optional)
Definition Object.hpp:89
This object represents a list of boosts added to a chat by a user. https://core.telegram....
std::vector< Ptr< ChatBoost > > boosts
The list of boosts added to the chat by the user.
UserChatBoosts(const nl::json &json)
void fromJson(const nl::json &json)
Deserializes this object from JSON.
nl::json toJson() const
Serializes this object to JSON.