libkazv
Loading...
Searching...
No Matches
filter.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"
9
10namespace Kazv::Api {
11
18class DefineFilterJob : public BaseJob {
19public:
20
21
22
23class JobResponse : public Response
24{
25
26public:
28 bool success() const;
29
30 // Result properties
31
32
33
34
39std::string filterId() const;
40
41};
42 static constexpr auto needsAuth() {
43 return true
44 ;
45 }
46
47
48// Construction/destruction
49
58 explicit DefineFilterJob(std::string serverUrl
59 , std::string _accessToken
60 ,
61 std::string userId , Filter filter
62 );
63
64
66 );
67
68 static BaseJob::Body buildBody(std::string userId, Filter filter);
69
70
71
72
73
76 };
78 }
79 namespace nlohmann
80 {
81 using namespace Kazv;
82 using namespace Kazv::Api;
83
84 }
85
86 namespace Kazv::Api
87 {
88
92class GetFilterJob : public BaseJob {
93public:
94
95
96
97class JobResponse : public Response
98{
99
100public:
102 bool success() const;
103
104 // Result properties
105
106
108
109 Filter data() const
110 {
111 return
112 std::move(jsonBody().get()).get<Filter>()
113 ;
114 }
115
116
117};
118 static constexpr auto needsAuth() {
119 return true
120 ;
121 }
122
123
124// Construction/destruction
125
134 explicit GetFilterJob(std::string serverUrl
135 , std::string _accessToken
136 ,
137 std::string userId , std::string filterId
138 );
139
140
142 );
143
144 static BaseJob::Body buildBody(std::string userId, std::string filterId);
145
146
147
148
149
151 GetFilterJob withData(JsonWrap j) const &;
152 };
154 }
155 namespace nlohmann
156 {
157 using namespace Kazv;
158 using namespace Kazv::Api;
159
160 }
161
162 namespace Kazv::Api
163 {
164
165} // namespace Kazv::Api
std::string filterId() const
The ID of the filter that was created.
Definition filter.cpp:82
bool success() const
Definition filter.cpp:71
Upload a new filter.
Definition filter.hpp:18
static constexpr auto needsAuth()
Definition filter.hpp:42
static BaseJob::Query buildQuery()
Definition filter.cpp:13
static BaseJob::Body buildBody(std::string userId, Filter filter)
Definition filter.cpp:21
DefineFilterJob withData(JsonWrap j) &&
Definition filter.cpp:54
Definition filter.hpp:98
bool success() const
Definition filter.cpp:151
Filter data() const
The filter definition.
Definition filter.hpp:109
Download a filter.
Definition filter.hpp:92
static BaseJob::Body buildBody(std::string userId, std::string filterId)
Definition filter.cpp:102
static constexpr auto needsAuth()
Definition filter.hpp:118
static BaseJob::Query buildQuery()
Definition filter.cpp:94
GetFilterJob withData(JsonWrap j) &&
Definition filter.cpp:134
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
Definition location.hpp:27
Definition sync_filter.hpp:98
Definition basejob.hpp:49
JsonWrap jsonBody() const
Definition basejob.cpp:141