libkazv
Loading...
Searching...
No Matches
third_party_lookup.hpp
Go to the documentation of this file.
1/******************************************************************************
2 * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
3 */
4
5#pragma once
6
7#include "basejob.hpp"
11
12namespace Kazv::Api {
13
20class GetProtocolsJob : public BaseJob {
21public:
22
23
24
25class JobResponse : public Response
26{
27
28public:
30 bool success() const;
31
32 // Result properties
33
34
36
37 immer::map<std::string, ThirdPartyProtocol> data() const
38 {
39 return
40 std::move(jsonBody().get()).get<immer::map<std::string, ThirdPartyProtocol>>()
41 ;
42 }
43
44
45};
46 static constexpr auto needsAuth() {
47 return true
48 ;
49 }
50
51
52// Construction/destruction
53
55 explicit GetProtocolsJob(std::string serverUrl
56 , std::string _accessToken
57
58
59 );
60
61
63 );
64
65 static BaseJob::Body buildBody();
66
67
68
69
70
73 };
75 }
76 namespace nlohmann
77 {
78 using namespace Kazv;
79 using namespace Kazv::Api;
80
81 }
82
83 namespace Kazv::Api
84 {
85
91public:
92
93
94
95class JobResponse : public Response
96{
97
98public:
100 bool success() const;
101
102 // Result properties
103
104
106
108 {
109 return
110 std::move(jsonBody().get()).get<ThirdPartyProtocol>()
111 ;
112 }
113
114
115};
116 static constexpr auto needsAuth() {
117 return true
118 ;
119 }
120
121
122// Construction/destruction
123
129 explicit GetProtocolMetadataJob(std::string serverUrl
130 , std::string _accessToken
131 ,
132 std::string protocol
133 );
134
135
137 );
138
139 static BaseJob::Body buildBody(std::string protocol);
140
141
142
143
144
147 };
149 }
150 namespace nlohmann
151 {
152 using namespace Kazv;
153 using namespace Kazv::Api;
154
155 }
156
157 namespace Kazv::Api
158 {
159
172public:
173
174
175
176class JobResponse : public Response
177{
178
179public:
181 bool success() const;
182
183 // Result properties
184
185
187
188 immer::array<ThirdPartyLocation> data() const
189 {
190 return
191 std::move(jsonBody().get()).get<immer::array<ThirdPartyLocation>>()
192 ;
193 }
194
195
196};
197 static constexpr auto needsAuth() {
198 return true
199 ;
200 }
201
202
203// Construction/destruction
204
214 explicit QueryLocationByProtocolJob(std::string serverUrl
215 , std::string _accessToken
216 ,
217 std::string protocol , std::optional<std::string> searchFields = std::nullopt
218 );
219
220
222 std::optional<std::string> searchFields);
223
224 static BaseJob::Body buildBody(std::string protocol, std::optional<std::string> searchFields);
225
226
227
228
229
232 };
234 }
235 namespace nlohmann
236 {
237 using namespace Kazv;
238 using namespace Kazv::Api;
239
240 }
241
242 namespace Kazv::Api
243 {
244
251public:
252
253
254
255class JobResponse : public Response
256{
257
258public:
260 bool success() const;
261
262 // Result properties
263
264
266
267 immer::array<ThirdPartyUser> data() const
268 {
269 return
270 std::move(jsonBody().get()).get<immer::array<ThirdPartyUser>>()
271 ;
272 }
273
274
275};
276 static constexpr auto needsAuth() {
277 return true
278 ;
279 }
280
281
282// Construction/destruction
283
292 explicit QueryUserByProtocolJob(std::string serverUrl
293 , std::string _accessToken
294 ,
295 std::string protocol , std::optional<std::string> fields = std::nullopt
296 );
297
298
300 std::optional<std::string> fields);
301
302 static BaseJob::Body buildBody(std::string protocol, std::optional<std::string> fields);
303
304
305
306
307
310 };
312 }
313 namespace nlohmann
314 {
315 using namespace Kazv;
316 using namespace Kazv::Api;
317
318 }
319
320 namespace Kazv::Api
321 {
322
329public:
330
331
332
333class JobResponse : public Response
334{
335
336public:
338 bool success() const;
339
340 // Result properties
341
342
344
345 immer::array<ThirdPartyLocation> data() const
346 {
347 return
348 std::move(jsonBody().get()).get<immer::array<ThirdPartyLocation>>()
349 ;
350 }
351
352
353};
354 static constexpr auto needsAuth() {
355 return true
356 ;
357 }
358
359
360// Construction/destruction
361
367 explicit QueryLocationByAliasJob(std::string serverUrl
368 , std::string _accessToken
369 ,
370 std::string alias
371 );
372
373
375 std::string alias);
376
377 static BaseJob::Body buildBody(std::string alias);
378
379
380
381
382
385 };
387 }
388 namespace nlohmann
389 {
390 using namespace Kazv;
391 using namespace Kazv::Api;
392
393 }
394
395 namespace Kazv::Api
396 {
397
402class QueryUserByIDJob : public BaseJob {
403public:
404
405
406
407class JobResponse : public Response
408{
409
410public:
412 bool success() const;
413
414 // Result properties
415
416
418
419 immer::array<ThirdPartyUser> data() const
420 {
421 return
422 std::move(jsonBody().get()).get<immer::array<ThirdPartyUser>>()
423 ;
424 }
425
426
427};
428 static constexpr auto needsAuth() {
429 return true
430 ;
431 }
432
433
434// Construction/destruction
435
441 explicit QueryUserByIDJob(std::string serverUrl
442 , std::string _accessToken
443 ,
444 std::string userid
445 );
446
447
449 std::string userid);
450
451 static BaseJob::Body buildBody(std::string userid);
452
453
454
455
456
459 };
461 }
462 namespace nlohmann
463 {
464 using namespace Kazv;
465 using namespace Kazv::Api;
466
467 }
468
469 namespace Kazv::Api
470 {
471
472} // namespace Kazv::Api
Definition third_party_lookup.hpp:96
ThirdPartyProtocol data() const
The protocol was found and metadata returned.
Definition third_party_lookup.hpp:107
bool success() const
Definition third_party_lookup.cpp:138
Retrieve metadata about a specific protocol that the homeserver supports.
Definition third_party_lookup.hpp:90
static BaseJob::Body buildBody(std::string protocol)
Definition third_party_lookup.cpp:89
GetProtocolMetadataJob withData(JsonWrap j) &&
Definition third_party_lookup.cpp:121
static BaseJob::Query buildQuery()
Definition third_party_lookup.cpp:81
static constexpr auto needsAuth()
Definition third_party_lookup.hpp:116
Definition third_party_lookup.hpp:26
bool success() const
Definition third_party_lookup.cpp:70
immer::map< std::string, ThirdPartyProtocol > data() const
The protocols supported by the homeserver.
Definition third_party_lookup.hpp:37
Retrieve metadata about all protocols that a homeserver supports.
Definition third_party_lookup.hpp:20
static constexpr auto needsAuth()
Definition third_party_lookup.hpp:46
static BaseJob::Body buildBody()
Definition third_party_lookup.cpp:21
static BaseJob::Query buildQuery()
Definition third_party_lookup.cpp:13
GetProtocolsJob withData(JsonWrap j) &&
Definition third_party_lookup.cpp:53
Definition third_party_lookup.hpp:334
bool success() const
Definition third_party_lookup.cpp:345
immer::array< ThirdPartyLocation > data() const
All found third party locations.
Definition third_party_lookup.hpp:345
Reverse-lookup third party locations given a Matrix room alias.
Definition third_party_lookup.hpp:328
static constexpr auto needsAuth()
Definition third_party_lookup.hpp:354
static BaseJob::Query buildQuery(std::string alias)
Definition third_party_lookup.cpp:287
QueryLocationByAliasJob withData(JsonWrap j) &&
Definition third_party_lookup.cpp:328
static BaseJob::Body buildBody(std::string alias)
Definition third_party_lookup.cpp:296
Definition third_party_lookup.hpp:177
immer::array< ThirdPartyLocation > data() const
At least one portal room was found.
Definition third_party_lookup.hpp:188
bool success() const
Definition third_party_lookup.cpp:207
Retrieve Matrix-side portals rooms leading to a third party location.
Definition third_party_lookup.hpp:171
static BaseJob::Body buildBody(std::string protocol, std::optional< std::string > searchFields)
Definition third_party_lookup.cpp:158
static constexpr auto needsAuth()
Definition third_party_lookup.hpp:197
QueryLocationByProtocolJob withData(JsonWrap j) &&
Definition third_party_lookup.cpp:190
static BaseJob::Query buildQuery(std::optional< std::string > searchFields)
Definition third_party_lookup.cpp:149
Definition third_party_lookup.hpp:408
bool success() const
Definition third_party_lookup.cpp:414
immer::array< ThirdPartyUser > data() const
An array of third party users.
Definition third_party_lookup.hpp:419
Reverse-lookup third party users given a Matrix User ID.
Definition third_party_lookup.hpp:402
static BaseJob::Body buildBody(std::string userid)
Definition third_party_lookup.cpp:365
static BaseJob::Query buildQuery(std::string userid)
Definition third_party_lookup.cpp:356
static constexpr auto needsAuth()
Definition third_party_lookup.hpp:428
QueryUserByIDJob withData(JsonWrap j) &&
Definition third_party_lookup.cpp:397
Definition third_party_lookup.hpp:256
immer::array< ThirdPartyUser > data() const
The Matrix User IDs found with the given parameters.
Definition third_party_lookup.hpp:267
bool success() const
Definition third_party_lookup.cpp:276
Retrieve the Matrix User ID of a corresponding third party user.
Definition third_party_lookup.hpp:250
QueryUserByProtocolJob withData(JsonWrap j) &&
Definition third_party_lookup.cpp:259
static constexpr auto needsAuth()
Definition third_party_lookup.hpp:276
static BaseJob::Query buildQuery(std::optional< std::string > fields)
Definition third_party_lookup.cpp:218
static BaseJob::Body buildBody(std::string protocol, std::optional< std::string > fields)
Definition third_party_lookup.cpp:227
Definition basejob.hpp:94
Definition basejob.hpp:68
::Kazv::Body Body
Definition basejob.hpp:103
Definition jsonwrap.hpp:23
Definition location.hpp:10
Definition location.hpp:10
Definition location.hpp:27
Definition protocol.hpp:120
Definition basejob.hpp:49
JsonWrap jsonBody() const
Definition basejob.cpp:141