1 | /****************************************************************************** |
2 | * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN |
3 | */ |
4 | |
5 | #include "search.h" |
6 | |
7 | using namespace Quotient; |
8 | |
9 | auto queryToSearch(const QString& nextBatch) |
10 | { |
11 | QUrlQuery _q; |
12 | addParam<IfNotEmpty>(container&: _q, QStringLiteral("next_batch" ), value: nextBatch); |
13 | return _q; |
14 | } |
15 | |
16 | SearchJob::SearchJob(const Categories& searchCategories, |
17 | const QString& nextBatch) |
18 | : BaseJob(HttpVerb::Post, QStringLiteral("SearchJob" ), |
19 | makePath(parts: "/_matrix/client/v3" , parts: "/search" ), |
20 | queryToSearch(nextBatch)) |
21 | { |
22 | QJsonObject _dataJson; |
23 | addParam<>(container&: _dataJson, QStringLiteral("search_categories" ), value: searchCategories); |
24 | setRequestData({ _dataJson }); |
25 | addExpectedKey(key: "search_categories" ); |
26 | } |
27 | |