1 | /****************************************************************************** |
2 | * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN |
3 | */ |
4 | |
5 | #include "profile.h" |
6 | |
7 | using namespace Quotient; |
8 | |
9 | SetDisplayNameJob::SetDisplayNameJob(const QString& userId, |
10 | const QString& displayname) |
11 | : BaseJob(HttpVerb::Put, QStringLiteral("SetDisplayNameJob" ), |
12 | makePath(parts: "/_matrix/client/v3" , parts: "/profile/" , parts: userId, |
13 | parts: "/displayname" )) |
14 | { |
15 | QJsonObject _dataJson; |
16 | addParam<>(container&: _dataJson, QStringLiteral("displayname" ), value: displayname); |
17 | setRequestData({ _dataJson }); |
18 | } |
19 | |
20 | QUrl GetDisplayNameJob::makeRequestUrl(QUrl baseUrl, const QString& userId) |
21 | { |
22 | return BaseJob::makeRequestUrl(baseUrl: std::move(baseUrl), |
23 | encodedPath: makePath(parts: "/_matrix/client/v3" , parts: "/profile/" , |
24 | parts: userId, parts: "/displayname" )); |
25 | } |
26 | |
27 | GetDisplayNameJob::GetDisplayNameJob(const QString& userId) |
28 | : BaseJob(HttpVerb::Get, QStringLiteral("GetDisplayNameJob" ), |
29 | makePath(parts: "/_matrix/client/v3" , parts: "/profile/" , parts: userId, |
30 | parts: "/displayname" ), |
31 | false) |
32 | {} |
33 | |
34 | SetAvatarUrlJob::SetAvatarUrlJob(const QString& userId, const QUrl& avatarUrl) |
35 | : BaseJob(HttpVerb::Put, QStringLiteral("SetAvatarUrlJob" ), |
36 | makePath(parts: "/_matrix/client/v3" , parts: "/profile/" , parts: userId, parts: "/avatar_url" )) |
37 | { |
38 | QJsonObject _dataJson; |
39 | addParam<>(container&: _dataJson, QStringLiteral("avatar_url" ), value: avatarUrl); |
40 | setRequestData({ _dataJson }); |
41 | } |
42 | |
43 | QUrl GetAvatarUrlJob::makeRequestUrl(QUrl baseUrl, const QString& userId) |
44 | { |
45 | return BaseJob::makeRequestUrl(baseUrl: std::move(baseUrl), |
46 | encodedPath: makePath(parts: "/_matrix/client/v3" , parts: "/profile/" , |
47 | parts: userId, parts: "/avatar_url" )); |
48 | } |
49 | |
50 | GetAvatarUrlJob::GetAvatarUrlJob(const QString& userId) |
51 | : BaseJob(HttpVerb::Get, QStringLiteral("GetAvatarUrlJob" ), |
52 | makePath(parts: "/_matrix/client/v3" , parts: "/profile/" , parts: userId, parts: "/avatar_url" ), |
53 | false) |
54 | {} |
55 | |
56 | QUrl GetUserProfileJob::makeRequestUrl(QUrl baseUrl, const QString& userId) |
57 | { |
58 | return BaseJob::makeRequestUrl(baseUrl: std::move(baseUrl), |
59 | encodedPath: makePath(parts: "/_matrix/client/v3" , parts: "/profile/" , |
60 | parts: userId)); |
61 | } |
62 | |
63 | GetUserProfileJob::GetUserProfileJob(const QString& userId) |
64 | : BaseJob(HttpVerb::Get, QStringLiteral("GetUserProfileJob" ), |
65 | makePath(parts: "/_matrix/client/v3" , parts: "/profile/" , parts: userId), false) |
66 | {} |
67 | |