libkazv
Loading...
Searching...
No Matches
event_context.hpp
Go to the documentation of this file.
1/******************************************************************************
2 * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
3 */
4
5#pragma once
6
7#include "basejob.hpp"
8
9
10namespace Kazv::Api {
11
22public:
23
24
25
26class JobResponse : public Response
27{
28
29public:
31 bool success() const;
32
33 // Result properties
34
35
36
37
39std::optional<std::string> start() const;
40
41
43std::optional<std::string> end() const;
44
45
49
50
52JsonWrap event() const;
53
54
58
59
61EventList state() const;
62
63};
64 static constexpr auto needsAuth() {
65 return true
66 ;
67 }
68
69
70// Construction/destruction
71
92 explicit GetEventContextJob(std::string serverUrl
93 , std::string _accessToken
94 ,
95 std::string roomId , std::string eventId , std::optional<int> limit = std::nullopt, std::optional<std::string> filter = std::nullopt
96 );
97
98
100 std::optional<int> limit, std::optional<std::string> filter);
101
102 static BaseJob::Body buildBody(std::string roomId, std::string eventId, std::optional<int> limit, std::optional<std::string> filter);
103
104
105
106
107
110 };
112 }
113 namespace nlohmann
114 {
115 using namespace Kazv;
116 using namespace Kazv::Api;
117
118 }
119
120 namespace Kazv::Api
121 {
122
123} // namespace Kazv::Api
Definition event_context.hpp:27
std::optional< std::string > end() const
A token that can be used to paginate forwards with.
Definition event_context.cpp:94
EventList state() const
The state of the room at the last event returned.
Definition event_context.cpp:138
bool success() const
Definition event_context.cpp:73
std::optional< std::string > start() const
A token that can be used to paginate backwards with.
Definition event_context.cpp:83
EventList eventsBefore() const
A list of room events that happened just before the requested event, in reverse-chronological order.
Definition event_context.cpp:105
JsonWrap event() const
Details of the requested event.
Definition event_context.cpp:116
EventList eventsAfter() const
A list of room events that happened just after the requested event, in chronological order.
Definition event_context.cpp:127
Get events and state around the specified event.
Definition event_context.hpp:21
GetEventContextJob withData(JsonWrap j) &&
Definition event_context.cpp:56
static BaseJob::Body buildBody(std::string roomId, std::string eventId, std::optional< int > limit, std::optional< std::string > filter)
Definition event_context.cpp:24
static constexpr auto needsAuth()
Definition event_context.hpp:64
static BaseJob::Query buildQuery(std::optional< int > limit, std::optional< std::string > filter)
Definition event_context.cpp:13
Definition basejob.hpp:94
Definition basejob.hpp:68
::Kazv::Body Body
Definition basejob.hpp:103
Definition jsonwrap.hpp:23
Definition location.hpp:10
Definition location.hpp:10
immer::flex_vector< Event > EventList
Definition types.hpp:107
Definition location.hpp:27
Definition basejob.hpp:49