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 30 31
|
// THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
#include "room_event_by_timestamp.h"
using namespace Quotient;
auto queryToGetEventByTimestamp(int ts, const QString& dir)
{
QUrlQuery _q;
addParam(_q, u"ts"_s, ts);
addParam(_q, u"dir"_s, dir);
return _q;
}
QUrl GetEventByTimestampJob::makeRequestUrl(const HomeserverData& hsData, const QString& roomId,
int ts, const QString& dir)
{
return BaseJob::makeRequestUrl(hsData,
makePath("/_matrix/client/v1", "/rooms/", roomId,
"/timestamp_to_event"),
queryToGetEventByTimestamp(ts, dir));
}
GetEventByTimestampJob::GetEventByTimestampJob(const QString& roomId, int ts, const QString& dir)
: BaseJob(HttpVerb::Get, u"GetEventByTimestampJob"_s,
makePath("/_matrix/client/v1", "/rooms/", roomId, "/timestamp_to_event"),
queryToGetEventByTimestamp(ts, dir))
{
addExpectedKey(u"event_id"_s);
addExpectedKey(u"origin_server_ts"_s);
}
|