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

This object represents a point on the map. https://core.telegram.org/bots/api#location. More...

#include <Location.hpp>

Public Member Functions

 Location ()=default
 
 Location (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

float longitude {}
 Longitude as defined by sender. More...
 
float latitude {}
 Latitude as defined by sender. More...
 
float horizontalAccuracy {}
 Optional. The radius of uncertainty for the location, measured in meters; 0-1500. More...
 
std::int32_t livePeriod {}
 Optional. Time relative to the message sending date, during which the location can be updated, in seconds. For active live locations only. More...
 
std::int32_t heading {}
 Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only. More...
 
std::int32_t proximityAlertRadius {}
 Optional. Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only. More...
 

Detailed Description

This object represents a point on the map. https://core.telegram.org/bots/api#location.

Definition at line 7 of file Location.hpp.

Constructor & Destructor Documentation

◆ Location() [1/2]

tgbotxx::Location::Location ( )
default

◆ Location() [2/2]

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

Definition at line 9 of file Location.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 49 of file Location.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 37 of file Location.hpp.

Member Data Documentation

◆ heading

std::int32_t tgbotxx::Location::heading {}

Optional. The direction in which user is moving, in degrees; 1-360. For active live locations only.

Definition at line 28 of file Location.hpp.

◆ horizontalAccuracy

float tgbotxx::Location::horizontalAccuracy {}

Optional. The radius of uncertainty for the location, measured in meters; 0-1500.

Definition at line 20 of file Location.hpp.

◆ latitude

float tgbotxx::Location::latitude {}

Latitude as defined by sender.

Definition at line 17 of file Location.hpp.

◆ livePeriod

std::int32_t tgbotxx::Location::livePeriod {}

Optional. Time relative to the message sending date, during which the location can be updated, in seconds. For active live locations only.

Definition at line 24 of file Location.hpp.

◆ longitude

float tgbotxx::Location::longitude {}

Longitude as defined by sender.

Definition at line 14 of file Location.hpp.

◆ proximityAlertRadius

std::int32_t tgbotxx::Location::proximityAlertRadius {}

Optional. Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only.

Definition at line 33 of file Location.hpp.


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