aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/filter.cpp
blob: 57cb127150e365784373fed8d828e35aa06132ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/******************************************************************************
 * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
 */

#include "filter.h"

using namespace Quotient;

DefineFilterJob::DefineFilterJob(const QString& userId, const Filter& filter)
    : BaseJob(HttpVerb::Post, QStringLiteral("DefineFilterJob"),
              makePath("/_matrix/client/v3", "/user/", userId, "/filter"))
{
    setRequestData(RequestData(toJson(filter)));
    addExpectedKey("filter_id");
}

QUrl GetFilterJob::makeRequestUrl(QUrl baseUrl, const QString& userId,
                                  const QString& filterId)
{
    return BaseJob::makeRequestUrl(std::move(baseUrl),
                                   makePath("/_matrix/client/v3", "/user/",
                                            userId, "/filter/", filterId));
}

GetFilterJob::GetFilterJob(const QString& userId, const QString& filterId)
    : BaseJob(HttpVerb::Get, QStringLiteral("GetFilterJob"),
              makePath("/_matrix/client/v3", "/user/", userId, "/filter/",
                       filterId))
{}