1/******************************************************************************
2 * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
3 */
4
5#include "rooms.h"
6
7using namespace Quotient;
8
9QUrl GetOneRoomEventJob::makeRequestUrl(QUrl baseUrl, const QString& roomId,
10 const QString& eventId)
11{
12 return BaseJob::makeRequestUrl(baseUrl: std::move(baseUrl),
13 encodedPath: makePath(parts: "/_matrix/client/v3", parts: "/rooms/",
14 parts: roomId, parts: "/event/", parts: eventId));
15}
16
17GetOneRoomEventJob::GetOneRoomEventJob(const QString& roomId,
18 const QString& eventId)
19 : BaseJob(HttpVerb::Get, QStringLiteral("GetOneRoomEventJob"),
20 makePath(parts: "/_matrix/client/v3", parts: "/rooms/", parts: roomId, parts: "/event/",
21 parts: eventId))
22{}
23
24QUrl GetRoomStateWithKeyJob::makeRequestUrl(QUrl baseUrl, const QString& roomId,
25 const QString& eventType,
26 const QString& stateKey)
27{
28 return BaseJob::makeRequestUrl(baseUrl: std::move(baseUrl),
29 encodedPath: makePath(parts: "/_matrix/client/v3", parts: "/rooms/",
30 parts: roomId, parts: "/state/", parts: eventType, parts: "/",
31 parts: stateKey));
32}
33
34GetRoomStateWithKeyJob::GetRoomStateWithKeyJob(const QString& roomId,
35 const QString& eventType,
36 const QString& stateKey)
37 : BaseJob(HttpVerb::Get, QStringLiteral("GetRoomStateWithKeyJob"),
38 makePath(parts: "/_matrix/client/v3", parts: "/rooms/", parts: roomId, parts: "/state/",
39 parts: eventType, parts: "/", parts: stateKey))
40{}
41
42QUrl GetRoomStateJob::makeRequestUrl(QUrl baseUrl, const QString& roomId)
43{
44 return BaseJob::makeRequestUrl(baseUrl: std::move(baseUrl),
45 encodedPath: makePath(parts: "/_matrix/client/v3", parts: "/rooms/",
46 parts: roomId, parts: "/state"));
47}
48
49GetRoomStateJob::GetRoomStateJob(const QString& roomId)
50 : BaseJob(HttpVerb::Get, QStringLiteral("GetRoomStateJob"),
51 makePath(parts: "/_matrix/client/v3", parts: "/rooms/", parts: roomId, parts: "/state"))
52{}
53
54auto queryToGetMembersByRoom(const QString& at, const QString& membership,
55 const QString& notMembership)
56{
57 QUrlQuery _q;
58 addParam<IfNotEmpty>(container&: _q, QStringLiteral("at"), value: at);
59 addParam<IfNotEmpty>(container&: _q, QStringLiteral("membership"), value: membership);
60 addParam<IfNotEmpty>(container&: _q, QStringLiteral("not_membership"), value: notMembership);
61 return _q;
62}
63
64QUrl GetMembersByRoomJob::makeRequestUrl(QUrl baseUrl, const QString& roomId,
65 const QString& at,
66 const QString& membership,
67 const QString& notMembership)
68{
69 return BaseJob::makeRequestUrl(
70 baseUrl: std::move(baseUrl),
71 encodedPath: makePath(parts: "/_matrix/client/v3", parts: "/rooms/", parts: roomId, parts: "/members"),
72 query: queryToGetMembersByRoom(at, membership, notMembership));
73}
74
75GetMembersByRoomJob::GetMembersByRoomJob(const QString& roomId,
76 const QString& at,
77 const QString& membership,
78 const QString& notMembership)
79 : BaseJob(HttpVerb::Get, QStringLiteral("GetMembersByRoomJob"),
80 makePath(parts: "/_matrix/client/v3", parts: "/rooms/", parts: roomId, parts: "/members"),
81 queryToGetMembersByRoom(at, membership, notMembership))
82{}
83
84QUrl GetJoinedMembersByRoomJob::makeRequestUrl(QUrl baseUrl,
85 const QString& roomId)
86{
87 return BaseJob::makeRequestUrl(baseUrl: std::move(baseUrl),
88 encodedPath: makePath(parts: "/_matrix/client/v3", parts: "/rooms/",
89 parts: roomId, parts: "/joined_members"));
90}
91
92GetJoinedMembersByRoomJob::GetJoinedMembersByRoomJob(const QString& roomId)
93 : BaseJob(HttpVerb::Get, QStringLiteral("GetJoinedMembersByRoomJob"),
94 makePath(parts: "/_matrix/client/v3", parts: "/rooms/", parts: roomId,
95 parts: "/joined_members"))
96{}
97