10#include <QJsonDocument>
15 const QHash<QString, QSharedPointer<QJsonObject> > &extraObjects)
20 QMap<QString, QVariant>&&
args = generalArgs.
toMap();
22 for (
auto it = extraObjects.begin(); it != extraObjects.end(); it = std::next(it)) {
23 args[it.key()] = QJsonDocument(*it.value()).toJson(QJsonDocument::Compact);
TelegramSendMsg(const TelegramArgs &args, const ExtraJsonObjects &extraObjects={})
TelegramSendMsg This object sents msg to telegram server.
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 setArgs(const QMap< QString, QVariant > &newArgs)
setArgs For the some requests list of arguments posible to build only after constructor.
The TelegramArgs class is base structure for the all tellegram message arguments.
QMap< QString, QVariant > toMap(bool textAsCaption=false) const
toMap convert all arguments to the map.