/****************************************************************************** * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN */ #include "versions.h" #include "converters.h" #include using namespace QMatrixClient; static const auto basePath = QStringLiteral("/_matrix/client"); class GetVersionsJob::Private { public: QVector versions; }; QUrl GetVersionsJob::makeRequestUrl(QUrl baseUrl) { return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/versions"); } GetVersionsJob::GetVersionsJob() : BaseJob(HttpVerb::Get, "GetVersionsJob", basePath % "/versions", false) , d(new Private) { } GetVersionsJob::~GetVersionsJob() = default; const QVector& GetVersionsJob::versions() const { return d->versions; } BaseJob::Status GetVersionsJob::parseJson(const QJsonDocument& data) { auto json = data.object(); d->versions = fromJson>(json.value("versions")); return Success; }