1/******************************************************************************
2 * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
3 */
4
5#include "notifications.h"
6
7using namespace Quotient;
8
9auto queryToGetNotifications(const QString& from, Omittable<int> limit,
10 const QString& only)
11{
12 QUrlQuery _q;
13 addParam<IfNotEmpty>(container&: _q, QStringLiteral("from"), value: from);
14 addParam<IfNotEmpty>(container&: _q, QStringLiteral("limit"), value&: limit);
15 addParam<IfNotEmpty>(container&: _q, QStringLiteral("only"), value: only);
16 return _q;
17}
18
19QUrl GetNotificationsJob::makeRequestUrl(QUrl baseUrl, const QString& from,
20 Omittable<int> limit,
21 const QString& only)
22{
23 return BaseJob::makeRequestUrl(baseUrl: std::move(baseUrl),
24 encodedPath: makePath(parts: "/_matrix/client/v3",
25 parts: "/notifications"),
26 query: queryToGetNotifications(from, limit, only));
27}
28
29GetNotificationsJob::GetNotificationsJob(const QString& from,
30 Omittable<int> limit,
31 const QString& only)
32 : BaseJob(HttpVerb::Get, QStringLiteral("GetNotificationsJob"),
33 makePath(parts: "/_matrix/client/v3", parts: "/notifications"),
34 queryToGetNotifications(from, limit, only))
35{
36 addExpectedKey(key: "notifications");
37}
38