28 immer::array<std::string>
types;
40 if (! jo.is_object()) { jo = json::object(); }
57 if (jo.contains(
"limit"s)) {
58 result.
limit = jo.at(
"limit"s);
60 if (jo.contains(
"not_senders"s)) {
63 if (jo.contains(
"not_types"s)) {
64 result.
notTypes = jo.at(
"not_types"s);
66 if (jo.contains(
"senders"s)) {
67 result.
senders = jo.at(
"senders"s);
69 if (jo.contains(
"types"s)) {
70 result.
types = jo.at(
"types"s);
Definition: location.hpp:10
Definition: location.hpp:10
void addToJsonIfNeeded(json &j, std::string name, T &&arg)
Definition: types.hpp:80
nlohmann::json json
Definition: jsonwrap.hpp:20
Definition: location.hpp:27
Definition: event_filter.hpp:13
immer::array< std::string > senders
A list of senders IDs to include. If this list is absent then all senders are included.
Definition: event_filter.hpp:25
immer::array< std::string > notSenders
A list of sender IDs to exclude. If this list is absent then no senders are excluded....
Definition: event_filter.hpp:19
std::optional< int > limit
The maximum number of events to return.
Definition: event_filter.hpp:16
immer::array< std::string > notTypes
A list of event types to exclude. If this list is absent then no event types are excluded....
Definition: event_filter.hpp:22
immer::array< std::string > types
A list of event types to include. If this list is absent then all event types are included....
Definition: event_filter.hpp:28
static void from_json(const json &jo, EventFilter &result)
Definition: event_filter.hpp:54
static void to_json(json &jo, const EventFilter &pod)
Definition: event_filter.hpp:38