libkazv
message_pagination.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 
10 namespace Kazv::Api {
11 
20 class GetRoomEventsJob : public BaseJob {
21 public:
22 
23 
24 
25 class JobResponse : public Response
26 {
27 
28 public:
30  bool success() const;
31 
32  // Result properties
33 
34 
35 
36 
39 std::string start() const;
40 
41 
49 std::optional<std::string> end() const;
50 
51 
60 EventList chunk() const;
61 
62 
71 EventList state() const;
72 
73 };
74  static constexpr auto needsAuth() {
75  return true
76  ;
77  }
78 
79 
80 // Construction/destruction
81 
117  explicit GetRoomEventsJob(std::string serverUrl
118  , std::string _accessToken
119  ,
120  std::string roomId , std::string dir , std::optional<std::string> from = std::nullopt, std::optional<std::string> to = std::nullopt, std::optional<int> limit = std::nullopt, std::optional<std::string> filter = std::nullopt
121  );
122 
123 
124  static BaseJob::Query buildQuery(
125  std::optional<std::string> from, std::optional<std::string> to, std::string dir, std::optional<int> limit, std::optional<std::string> filter);
126 
127  static BaseJob::Body buildBody(std::string roomId, std::string dir, std::optional<std::string> from, std::optional<std::string> to, std::optional<int> limit, std::optional<std::string> filter);
128 
129 
130 
131 
132 
135  };
137  }
138  namespace nlohmann
139  {
140  using namespace Kazv;
141  using namespace Kazv::Api;
142 
143  }
144 
145  namespace Kazv::Api
146  {
147 
148 } // namespace Kazv::Api
Definition: message_pagination.hpp:26
std::optional< std::string > end() const
A token corresponding to the end of chunk.
Definition: message_pagination.cpp:102
EventList state() const
A list of state events relevant to showing the chunk.
Definition: message_pagination.cpp:124
JobResponse(Response r)
Definition: message_pagination.cpp:76
bool success() const
Definition: message_pagination.cpp:79
std::string start() const
A token corresponding to the start of chunk.
Definition: message_pagination.cpp:91
EventList chunk() const
A list of room events.
Definition: message_pagination.cpp:113
Get a list of events for this room.
Definition: message_pagination.hpp:20
static BaseJob::Query buildQuery(std::optional< std::string > from, std::optional< std::string > to, std::string dir, std::optional< int > limit, std::optional< std::string > filter)
Definition: message_pagination.cpp:13
GetRoomEventsJob(std::string serverUrl, std::string _accessToken, std::string roomId, std::string dir, std::optional< std::string > from=std::nullopt, std::optional< std::string > to=std::nullopt, std::optional< int > limit=std::nullopt, std::optional< std::string > filter=std::nullopt)
Get a list of events for this room.
Definition: message_pagination.cpp:42
static constexpr auto needsAuth()
Definition: message_pagination.hpp:74
static BaseJob::Body buildBody(std::string roomId, std::string dir, std::optional< std::string > from, std::optional< std::string > to, std::optional< int > limit, std::optional< std::string > filter)
Definition: message_pagination.cpp:30
GetRoomEventsJob withData(JsonWrap j) &&
Definition: message_pagination.cpp:62
Definition: basejob.hpp:91
Definition: basejob.hpp:77
::Kazv::Body Body
Definition: basejob.hpp:100
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:50