aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/profile.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-04-17 07:42:13 +0200
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-04-17 07:49:41 +0200
commit7036ed0dcb137cb5cbb6b426dd338c5e2e4c6424 (patch)
treefa9e37d8874303bf56d5381b0844738bd516a79b /lib/csapi/profile.cpp
parent906699cc525e9e0be231a58cabffc31ad1f5193c (diff)
downloadlibquotient-7036ed0dcb137cb5cbb6b426dd338c5e2e4c6424.tar.gz
libquotient-7036ed0dcb137cb5cbb6b426dd338c5e2e4c6424.zip
Regenerate API files using new GTAD and refreshed templates
No functional changes.
Diffstat (limited to 'lib/csapi/profile.cpp')
-rw-r--r--lib/csapi/profile.cpp39
1 files changed, 14 insertions, 25 deletions
diff --git a/lib/csapi/profile.cpp b/lib/csapi/profile.cpp
index 27168f77..d86e3bdc 100644
--- a/lib/csapi/profile.cpp
+++ b/lib/csapi/profile.cpp
@@ -12,11 +12,9 @@ using namespace Quotient;
static const auto basePath = QStringLiteral("/_matrix/client/r0");
-static const auto SetDisplayNameJobName = QStringLiteral("SetDisplayNameJob");
-
SetDisplayNameJob::SetDisplayNameJob(const QString& userId,
const QString& displayname)
- : BaseJob(HttpVerb::Put, SetDisplayNameJobName,
+ : BaseJob(HttpVerb::Put, QStringLiteral("SetDisplayNameJob"),
basePath % "/profile/" % userId % "/displayname")
{
QJsonObject _data;
@@ -24,22 +22,20 @@ SetDisplayNameJob::SetDisplayNameJob(const QString& userId,
setRequestData(_data);
}
-class GetDisplayNameJob::Private
-{
+class GetDisplayNameJob::Private {
public:
QString displayname;
};
QUrl GetDisplayNameJob::makeRequestUrl(QUrl baseUrl, const QString& userId)
{
- return BaseJob::makeRequestUrl(
- std::move(baseUrl), basePath % "/profile/" % userId % "/displayname");
+ return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/profile/"
+ % userId
+ % "/displayname");
}
-static const auto GetDisplayNameJobName = QStringLiteral("GetDisplayNameJob");
-
GetDisplayNameJob::GetDisplayNameJob(const QString& userId)
- : BaseJob(HttpVerb::Get, GetDisplayNameJobName,
+ : BaseJob(HttpVerb::Get, QStringLiteral("GetDisplayNameJob"),
basePath % "/profile/" % userId % "/displayname", false)
, d(new Private)
{}
@@ -56,10 +52,8 @@ BaseJob::Status GetDisplayNameJob::parseJson(const QJsonDocument& data)
return Success;
}
-static const auto SetAvatarUrlJobName = QStringLiteral("SetAvatarUrlJob");
-
SetAvatarUrlJob::SetAvatarUrlJob(const QString& userId, const QString& avatarUrl)
- : BaseJob(HttpVerb::Put, SetAvatarUrlJobName,
+ : BaseJob(HttpVerb::Put, QStringLiteral("SetAvatarUrlJob"),
basePath % "/profile/" % userId % "/avatar_url")
{
QJsonObject _data;
@@ -67,22 +61,20 @@ SetAvatarUrlJob::SetAvatarUrlJob(const QString& userId, const QString& avatarUrl
setRequestData(_data);
}
-class GetAvatarUrlJob::Private
-{
+class GetAvatarUrlJob::Private {
public:
QString avatarUrl;
};
QUrl GetAvatarUrlJob::makeRequestUrl(QUrl baseUrl, const QString& userId)
{
- return BaseJob::makeRequestUrl(
- std::move(baseUrl), basePath % "/profile/" % userId % "/avatar_url");
+ return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/profile/"
+ % userId
+ % "/avatar_url");
}
-static const auto GetAvatarUrlJobName = QStringLiteral("GetAvatarUrlJob");
-
GetAvatarUrlJob::GetAvatarUrlJob(const QString& userId)
- : BaseJob(HttpVerb::Get, GetAvatarUrlJobName,
+ : BaseJob(HttpVerb::Get, QStringLiteral("GetAvatarUrlJob"),
basePath % "/profile/" % userId % "/avatar_url", false)
, d(new Private)
{}
@@ -99,8 +91,7 @@ BaseJob::Status GetAvatarUrlJob::parseJson(const QJsonDocument& data)
return Success;
}
-class GetUserProfileJob::Private
-{
+class GetUserProfileJob::Private {
public:
QString avatarUrl;
QString displayname;
@@ -112,10 +103,8 @@ QUrl GetUserProfileJob::makeRequestUrl(QUrl baseUrl, const QString& userId)
basePath % "/profile/" % userId);
}
-static const auto GetUserProfileJobName = QStringLiteral("GetUserProfileJob");
-
GetUserProfileJob::GetUserProfileJob(const QString& userId)
- : BaseJob(HttpVerb::Get, GetUserProfileJobName,
+ : BaseJob(HttpVerb::Get, QStringLiteral("GetUserProfileJob"),
basePath % "/profile/" % userId, false)
, d(new Private)
{}