|
tgbotxx 1.1.9.2
Telegram Bot C++ Library
|
Contains information about a suggested post. https://core.telegram.org/bots/api#suggestedpostinfo. More...
#include <SuggestedPostInfo.hpp>
Public Types | |
| enum class | State : std::uint8_t { Pending = 0 , Approved , Declined } |
| Enum of possible types of State. More... | |
Public Member Functions | |
| SuggestedPostInfo ()=default | |
| SuggestedPostInfo (const nl::json &json) | |
| nl::json | toJson () const |
| Serializes this object to JSON. | |
| void | fromJson (const nl::json &json) |
| Deserializes this object from JSON. | |
Static Public Member Functions | |
| static std::optional< std::string > | StateToString (const State type) noexcept |
| Converts enum State to a string. | |
| static std::optional< State > | StringToState (const std::string &str) noexcept |
| Converts string to an enum State. | |
Public Attributes | |
| State | state {} |
| State of the suggested post. Currently, it can be one of “pending”, “approved”, “declined”. | |
| Ptr< SuggestedPostPrice > | price |
| Optional. Proposed price of the post. If the field is omitted, then the post is unpaid. | |
| std::time_t | sendDate {} |
| Optional. Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it. | |
Contains information about a suggested post. https://core.telegram.org/bots/api#suggestedpostinfo.
Definition at line 8 of file SuggestedPostInfo.hpp.
|
strong |
Enum of possible types of State.
| Enumerator | |
|---|---|
| Pending | |
| Approved | |
| Declined | |
Definition at line 15 of file SuggestedPostInfo.hpp.
|
default |
|
inlineexplicit |
Definition at line 10 of file SuggestedPostInfo.hpp.
|
inline |
Deserializes this object from JSON.
Definition at line 57 of file SuggestedPostInfo.hpp.
|
inlinestaticnoexcept |
Converts enum State to a string.
Definition at line 21 of file SuggestedPostInfo.hpp.
|
inlinestaticnoexcept |
Converts string to an enum State.
Definition at line 28 of file SuggestedPostInfo.hpp.
|
inline |
Serializes this object to JSON.
Definition at line 48 of file SuggestedPostInfo.hpp.
| Ptr<SuggestedPostPrice> tgbotxx::SuggestedPostInfo::price |
Optional. Proposed price of the post. If the field is omitted, then the post is unpaid.
Definition at line 38 of file SuggestedPostInfo.hpp.
| std::time_t tgbotxx::SuggestedPostInfo::sendDate {} |
Optional. Proposed send date of the post. If the field is omitted, then the post can be published at any time within 30 days at the sole discretion of the user or administrator who approves it.
Definition at line 43 of file SuggestedPostInfo.hpp.
| State tgbotxx::SuggestedPostInfo::state {} |
State of the suggested post. Currently, it can be one of “pending”, “approved”, “declined”.
Definition at line 35 of file SuggestedPostInfo.hpp.