aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/users.cpp
blob: 48b727f0722f9f4176ebb95a19388de3c87d9b06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/******************************************************************************
 * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
 */

#include "users.h"

using namespace Quotient;

SearchUserDirectoryJob::SearchUserDirectoryJob(const QString& searchTerm,
                                               Omittable<int> limit)
    : BaseJob(HttpVerb::Post, QStringLiteral("SearchUserDirectoryJob"),
              makePath("/_matrix/client/r0", "/user_directory/search"))
{
    QJsonObject _data;
    addParam<>(_data, QStringLiteral("search_term"), searchTerm);
    addParam<IfNotEmpty>(_data, QStringLiteral("limit"), limit);
    setRequestData(std::move(_data));
    addExpectedKey("results");
    addExpectedKey("limited");
}