tgbotxx  1.1.6.9
Telegram Bot C++ Library
tgbotxx::WebhookInfo Struct Reference

Describes the current status of a webhook. https://core.telegram.org/bots/api#webhookinfo. More...

#include <WebhookInfo.hpp>

Public Member Functions

 WebhookInfo ()=default
 
 WebhookInfo (const nl::json &json)
 
nl::json toJson () const
 Serializes this object to JSON. More...
 
void fromJson (const nl::json &json)
 Deserializes this object from JSON. More...
 

Public Attributes

std::string url
 Webhook URL, may be empty if webhook is not set up. More...
 
bool hasCustomCertificate {}
 True, if a custom certificate was provided for webhook certificate checks. More...
 
std::int32_t pendingUpdateCount {}
 Number of updates awaiting delivery. More...
 
std::string ipAddress
 Optional. Currently used webhook IP address. More...
 
std::time_t lastErrorDate {}
 Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook. More...
 
std::string lastErrorMessage
 Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook. More...
 
std::time_t lastSynchronizationErrorDate {}
 Optional. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters. More...
 
std::int32_t maxConnections {}
 Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery. More...
 
std::vector< std::string > allowedUpdates
 Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member. More...
 

Detailed Description

Describes the current status of a webhook. https://core.telegram.org/bots/api#webhookinfo.

Definition at line 7 of file WebhookInfo.hpp.

Constructor & Destructor Documentation

◆ WebhookInfo() [1/2]

tgbotxx::WebhookInfo::WebhookInfo ( )
default

◆ WebhookInfo() [2/2]

tgbotxx::WebhookInfo::WebhookInfo ( const nl::json &  json)
inlineexplicit

Definition at line 9 of file WebhookInfo.hpp.

Member Function Documentation

◆ fromJson()

void tgbotxx::WebhookInfo::fromJson ( const nl::json &  json)
inline

Deserializes this object from JSON.

Definition at line 58 of file WebhookInfo.hpp.

◆ toJson()

nl::json tgbotxx::WebhookInfo::toJson ( ) const
inline

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 43 of file WebhookInfo.hpp.

Member Data Documentation

◆ allowedUpdates

std::vector<std::string> tgbotxx::WebhookInfo::allowedUpdates

Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member.

Definition at line 38 of file WebhookInfo.hpp.

◆ hasCustomCertificate

bool tgbotxx::WebhookInfo::hasCustomCertificate {}

True, if a custom certificate was provided for webhook certificate checks.

Definition at line 17 of file WebhookInfo.hpp.

◆ ipAddress

std::string tgbotxx::WebhookInfo::ipAddress

Optional. Currently used webhook IP address.

Definition at line 23 of file WebhookInfo.hpp.

◆ lastErrorDate

std::time_t tgbotxx::WebhookInfo::lastErrorDate {}

Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook.

Definition at line 26 of file WebhookInfo.hpp.

◆ lastErrorMessage

std::string tgbotxx::WebhookInfo::lastErrorMessage

Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook.

Definition at line 29 of file WebhookInfo.hpp.

◆ lastSynchronizationErrorDate

std::time_t tgbotxx::WebhookInfo::lastSynchronizationErrorDate {}

Optional. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters.

Definition at line 32 of file WebhookInfo.hpp.

◆ maxConnections

std::int32_t tgbotxx::WebhookInfo::maxConnections {}

Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery.

Definition at line 35 of file WebhookInfo.hpp.

◆ pendingUpdateCount

std::int32_t tgbotxx::WebhookInfo::pendingUpdateCount {}

Number of updates awaiting delivery.

Definition at line 20 of file WebhookInfo.hpp.

◆ url

std::string tgbotxx::WebhookInfo::url

Webhook URL, may be empty if webhook is not set up.

Definition at line 14 of file WebhookInfo.hpp.


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