1 | /****************************************************************************** |
2 | * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN |
3 | */ |
4 | |
5 | #include "users.h" |
6 | |
7 | using namespace Quotient; |
8 | |
9 | SearchUserDirectoryJob::SearchUserDirectoryJob(const QString& searchTerm, |
10 | Omittable<int> limit) |
11 | : BaseJob(HttpVerb::Post, QStringLiteral("SearchUserDirectoryJob" ), |
12 | makePath(parts: "/_matrix/client/v3" , parts: "/user_directory/search" )) |
13 | { |
14 | QJsonObject _dataJson; |
15 | addParam<>(container&: _dataJson, QStringLiteral("search_term" ), value: searchTerm); |
16 | addParam<IfNotEmpty>(container&: _dataJson, QStringLiteral("limit" ), value&: limit); |
17 | setRequestData({ _dataJson }); |
18 | addExpectedKey(key: "results" ); |
19 | addExpectedKey(key: "limited" ); |
20 | } |
21 | |