10#include <QJsonDocument>
19 addArg(
"latitude", latitude);
20 addArg(
"longitude", longitude);
24 for (
auto it = extraObjects.begin(); it != extraObjects.end(); it = std::next(it)) {
25 addArg(it.key(), QJsonDocument(*it.value()).toJson(QJsonDocument::Compact));
TelegramSendLocation(const TelegramArgs &args, float latitude, float longitude, const ExtraJsonObjects &extraObjects={})
The TelegramSingleRquest class Is base class for all single requests commands with arguments.
const QMap< QString, QVariant > & args() const
args This method returns a current list of arguments
void addArg(const QString &key, const QVariant &val)
addArg This method push new arg, to arguments list
void setPriority(RequestPriority newPriority)
QHash< QString, QSharedPointer< QJsonObject > > ExtraJsonObjects
ExtraJsonObjects hash map of the extra objects of the message.
The TelegramArgs class is base structure for the all tellegram message arguments.