libkazv
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 
10 namespace Kazv::Api {
11 
18 class DefineFilterJob : public BaseJob {
19 public:
20 
21 
22 
23 class JobResponse : public Response
24 {
25 
26 public:
28  bool success() const;
29 
30  // Result properties
31 
32 
33 
34 
39 std::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 
92 class GetFilterJob : public BaseJob {
93 public:
94 
95 
96 
97 class JobResponse : public Response
98 {
99 
100 public:
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 
141  static BaseJob::Query buildQuery(
142  );
143 
144  static BaseJob::Body buildBody(std::string userId, std::string filterId);
145 
146 
147 
148 
149 
150  GetFilterJob withData(JsonWrap j) &&;
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
JobResponse(Response r)
Definition: filter.cpp:68
bool success() const
Definition: filter.cpp:71
Upload a new filter.
Definition: filter.hpp:18
static constexpr auto needsAuth()
Definition: filter.hpp:42
DefineFilterJob(std::string serverUrl, std::string _accessToken, std::string userId, Filter filter)
Upload a new filter.
Definition: filter.cpp:34
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
Filter data() const
The filter definition.
Definition: filter.hpp:109
Download a filter.
Definition: filter.hpp:92
static constexpr auto needsAuth()
Definition: filter.hpp:118
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
Definition: location.hpp:27
Definition: sync_filter.hpp:98
Definition: basejob.hpp:50