1 | /****************************************************************************** |
2 | * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN |
3 | */ |
4 | |
5 | #include "third_party_lookup.h" |
6 | |
7 | using namespace Quotient; |
8 | |
9 | QUrl GetProtocolsJob::makeRequestUrl(QUrl baseUrl) |
10 | { |
11 | return BaseJob::makeRequestUrl(baseUrl: std::move(baseUrl), |
12 | encodedPath: makePath(parts: "/_matrix/client/v3" , |
13 | parts: "/thirdparty/protocols" )); |
14 | } |
15 | |
16 | GetProtocolsJob::GetProtocolsJob() |
17 | : BaseJob(HttpVerb::Get, QStringLiteral("GetProtocolsJob" ), |
18 | makePath(parts: "/_matrix/client/v3" , parts: "/thirdparty/protocols" )) |
19 | {} |
20 | |
21 | QUrl GetProtocolMetadataJob::makeRequestUrl(QUrl baseUrl, |
22 | const QString& protocol) |
23 | { |
24 | return BaseJob::makeRequestUrl(baseUrl: std::move(baseUrl), |
25 | encodedPath: makePath(parts: "/_matrix/client/v3" , |
26 | parts: "/thirdparty/protocol/" , parts: protocol)); |
27 | } |
28 | |
29 | GetProtocolMetadataJob::GetProtocolMetadataJob(const QString& protocol) |
30 | : BaseJob(HttpVerb::Get, QStringLiteral("GetProtocolMetadataJob" ), |
31 | makePath(parts: "/_matrix/client/v3" , parts: "/thirdparty/protocol/" , parts: protocol)) |
32 | {} |
33 | |
34 | auto queryToQueryLocationByProtocol(const QString& searchFields) |
35 | { |
36 | QUrlQuery _q; |
37 | addParam<IfNotEmpty>(container&: _q, QStringLiteral("searchFields" ), value: searchFields); |
38 | return _q; |
39 | } |
40 | |
41 | QUrl QueryLocationByProtocolJob::makeRequestUrl(QUrl baseUrl, |
42 | const QString& protocol, |
43 | const QString& searchFields) |
44 | { |
45 | return BaseJob::makeRequestUrl(baseUrl: std::move(baseUrl), |
46 | encodedPath: makePath(parts: "/_matrix/client/v3" , |
47 | parts: "/thirdparty/location/" , parts: protocol), |
48 | query: queryToQueryLocationByProtocol(searchFields)); |
49 | } |
50 | |
51 | QueryLocationByProtocolJob::QueryLocationByProtocolJob( |
52 | const QString& protocol, const QString& searchFields) |
53 | : BaseJob(HttpVerb::Get, QStringLiteral("QueryLocationByProtocolJob" ), |
54 | makePath(parts: "/_matrix/client/v3" , parts: "/thirdparty/location/" , parts: protocol), |
55 | queryToQueryLocationByProtocol(searchFields)) |
56 | {} |
57 | |
58 | auto queryToQueryUserByProtocol(const QString& fields) |
59 | { |
60 | QUrlQuery _q; |
61 | addParam<IfNotEmpty>(container&: _q, QStringLiteral("fields..." ), value: fields); |
62 | return _q; |
63 | } |
64 | |
65 | QUrl QueryUserByProtocolJob::makeRequestUrl(QUrl baseUrl, |
66 | const QString& protocol, |
67 | const QString& fields) |
68 | { |
69 | return BaseJob::makeRequestUrl(baseUrl: std::move(baseUrl), |
70 | encodedPath: makePath(parts: "/_matrix/client/v3" , |
71 | parts: "/thirdparty/user/" , parts: protocol), |
72 | query: queryToQueryUserByProtocol(fields)); |
73 | } |
74 | |
75 | QueryUserByProtocolJob::QueryUserByProtocolJob(const QString& protocol, |
76 | const QString& fields) |
77 | : BaseJob(HttpVerb::Get, QStringLiteral("QueryUserByProtocolJob" ), |
78 | makePath(parts: "/_matrix/client/v3" , parts: "/thirdparty/user/" , parts: protocol), |
79 | queryToQueryUserByProtocol(fields)) |
80 | {} |
81 | |
82 | auto queryToQueryLocationByAlias(const QString& alias) |
83 | { |
84 | QUrlQuery _q; |
85 | addParam<>(container&: _q, QStringLiteral("alias" ), value: alias); |
86 | return _q; |
87 | } |
88 | |
89 | QUrl QueryLocationByAliasJob::makeRequestUrl(QUrl baseUrl, const QString& alias) |
90 | { |
91 | return BaseJob::makeRequestUrl(baseUrl: std::move(baseUrl), |
92 | encodedPath: makePath(parts: "/_matrix/client/v3" , |
93 | parts: "/thirdparty/location" ), |
94 | query: queryToQueryLocationByAlias(alias)); |
95 | } |
96 | |
97 | QueryLocationByAliasJob::QueryLocationByAliasJob(const QString& alias) |
98 | : BaseJob(HttpVerb::Get, QStringLiteral("QueryLocationByAliasJob" ), |
99 | makePath(parts: "/_matrix/client/v3" , parts: "/thirdparty/location" ), |
100 | queryToQueryLocationByAlias(alias)) |
101 | {} |
102 | |
103 | auto queryToQueryUserByID(const QString& userid) |
104 | { |
105 | QUrlQuery _q; |
106 | addParam<>(container&: _q, QStringLiteral("userid" ), value: userid); |
107 | return _q; |
108 | } |
109 | |
110 | QUrl QueryUserByIDJob::makeRequestUrl(QUrl baseUrl, const QString& userid) |
111 | { |
112 | return BaseJob::makeRequestUrl(baseUrl: std::move(baseUrl), |
113 | encodedPath: makePath(parts: "/_matrix/client/v3" , |
114 | parts: "/thirdparty/user" ), |
115 | query: queryToQueryUserByID(userid)); |
116 | } |
117 | |
118 | QueryUserByIDJob::QueryUserByIDJob(const QString& userid) |
119 | : BaseJob(HttpVerb::Get, QStringLiteral("QueryUserByIDJob" ), |
120 | makePath(parts: "/_matrix/client/v3" , parts: "/thirdparty/user" ), |
121 | queryToQueryUserByID(userid)) |
122 | {} |
123 | |