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
Kazv::Api::DefineFilterJob::JobResponse::JobResponse
JobResponse(Response r)
Definition: filter.cpp:70
Kazv::Api::GetFilterJob::JobResponse
Definition: filter.hpp:97
Kazv::Api::DefineFilterJob::JobResponse::filterId
std::string filterId() const
The ID of the filter that was created.
Definition: filter.cpp:84
nlohmann
Definition: location.hpp:26
Kazv::Api::DefineFilterJob::JobResponse::success
bool success() const
Definition: filter.cpp:73
Kazv::Api::DefineFilterJob::withData
DefineFilterJob withData(JsonWrap j) &&
Definition: filter.cpp:56
Kazv
Definition: location.hpp:10
Kazv::Api::Filter
Definition: sync_filter.hpp:97
Kazv::Api::DefineFilterJob::needsAuth
static constexpr auto needsAuth()
Definition: filter.hpp:46
Kazv::BaseJob::Query
Definition: basejob.hpp:90
Kazv::Api
Definition: location.hpp:10
Kazv::Api::GetFilterJob::JobResponse::data
Filter data() const
The filter definition.
Definition: filter.hpp:109
Kazv::Api::DefineFilterJob::DefineFilterJob
DefineFilterJob(std::string serverUrl, std::string _accessToken, std::string userId, Filter filter)
Upload a new filter.
Definition: filter.cpp:36
basejob.hpp
Kazv::Api::DefineFilterJob::JobResponse
Definition: filter.hpp:27
Kazv::JsonWrap
Definition: jsonwrap.hpp:22
Kazv::Api::DefineFilterJob
Upload a new filter.
Definition: filter.hpp:20
Kazv::Api::DefineFilterJob::buildBody
static BaseJob::Body buildBody(std::string userId, Filter filter)
Definition: filter.cpp:23
sync_filter.hpp
Kazv::BaseJob
Definition: basejob.hpp:76
Kazv::BaseJob::Body
::Kazv::Body Body
Definition: basejob.hpp:100
Kazv::Api::GetFilterJob
Download a filter.
Definition: filter.hpp:92
Kazv::Api::GetFilterJob::needsAuth
static constexpr auto needsAuth()
Definition: filter.hpp:118
Kazv::Response
Definition: basejob.hpp:50
Kazv::Api::DefineFilterJob::buildQuery
static BaseJob::Query buildQuery()
Definition: filter.cpp:15