1 | /****************************************************************************** |
2 | * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN |
3 | */ |
4 | |
5 | #include "account-data.h" |
6 | |
7 | using namespace Quotient; |
8 | |
9 | SetAccountDataJob::SetAccountDataJob(const QString& userId, const QString& type, |
10 | const QJsonObject& content) |
11 | : BaseJob(HttpVerb::Put, QStringLiteral("SetAccountDataJob" ), |
12 | makePath(parts: "/_matrix/client/v3" , parts: "/user/" , parts: userId, parts: "/account_data/" , |
13 | parts: type)) |
14 | { |
15 | setRequestData({ toJson(pod: content) }); |
16 | } |
17 | |
18 | QUrl GetAccountDataJob::makeRequestUrl(QUrl baseUrl, const QString& userId, |
19 | const QString& type) |
20 | { |
21 | return BaseJob::makeRequestUrl(baseUrl: std::move(baseUrl), |
22 | encodedPath: makePath(parts: "/_matrix/client/v3" , parts: "/user/" , |
23 | parts: userId, parts: "/account_data/" , parts: type)); |
24 | } |
25 | |
26 | GetAccountDataJob::GetAccountDataJob(const QString& userId, const QString& type) |
27 | : BaseJob(HttpVerb::Get, QStringLiteral("GetAccountDataJob" ), |
28 | makePath(parts: "/_matrix/client/v3" , parts: "/user/" , parts: userId, parts: "/account_data/" , |
29 | parts: type)) |
30 | {} |
31 | |
32 | SetAccountDataPerRoomJob::SetAccountDataPerRoomJob(const QString& userId, |
33 | const QString& roomId, |
34 | const QString& type, |
35 | const QJsonObject& content) |
36 | : BaseJob(HttpVerb::Put, QStringLiteral("SetAccountDataPerRoomJob" ), |
37 | makePath(parts: "/_matrix/client/v3" , parts: "/user/" , parts: userId, parts: "/rooms/" , |
38 | parts: roomId, parts: "/account_data/" , parts: type)) |
39 | { |
40 | setRequestData({ toJson(pod: content) }); |
41 | } |
42 | |
43 | QUrl GetAccountDataPerRoomJob::makeRequestUrl(QUrl baseUrl, |
44 | const QString& userId, |
45 | const QString& roomId, |
46 | const QString& type) |
47 | { |
48 | return BaseJob::makeRequestUrl(baseUrl: std::move(baseUrl), |
49 | encodedPath: makePath(parts: "/_matrix/client/v3" , parts: "/user/" , |
50 | parts: userId, parts: "/rooms/" , parts: roomId, |
51 | parts: "/account_data/" , parts: type)); |
52 | } |
53 | |
54 | GetAccountDataPerRoomJob::GetAccountDataPerRoomJob(const QString& userId, |
55 | const QString& roomId, |
56 | const QString& type) |
57 | : BaseJob(HttpVerb::Get, QStringLiteral("GetAccountDataPerRoomJob" ), |
58 | makePath(parts: "/_matrix/client/v3" , parts: "/user/" , parts: userId, parts: "/rooms/" , |
59 | parts: roomId, parts: "/account_data/" , parts: type)) |
60 | {} |
61 | |