libkazv
profile.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 
17 class SetDisplayNameJob : public BaseJob {
18 public:
19 
20 
21 
22 class JobResponse : public Response
23 {
24 
25 public:
27  bool success() const;
28 
29 };
30  static constexpr auto needsAuth() {
31  return true
32  ;
33  }
34 
35 
36 // Construction/destruction
37 
46  explicit SetDisplayNameJob(std::string serverUrl
47  , std::string _accessToken
48  ,
49  std::string userId , std::optional<std::string> displayname = std::nullopt
50  );
51 
52 
54  );
55 
56  static BaseJob::Body buildBody(std::string userId, std::optional<std::string> displayname);
57 
58 
59 
60 
61 
64  };
66  }
67  namespace nlohmann
68  {
69  using namespace Kazv;
70  using namespace Kazv::Api;
71 
72  }
73 
74  namespace Kazv::Api
75  {
76 
83 class GetDisplayNameJob : public BaseJob {
84 public:
85 
86 
87 
88 class JobResponse : public Response
89 {
90 
91 public:
93  bool success() const;
94 
95  // Result properties
96 
97 
98 
99 
101 std::optional<std::string> displayname() const;
102 
103 };
104  static constexpr auto needsAuth() {
105  return
106  false;
107  }
108 
109 
110 // Construction/destruction
111 
117  explicit GetDisplayNameJob(std::string serverUrl
118 
119  ,
120  std::string userId
121  );
122 
123 
124  static BaseJob::Query buildQuery(
125  );
126 
127  static BaseJob::Body buildBody(std::string userId);
128 
129 
130 
131 
132 
133  GetDisplayNameJob withData(JsonWrap j) &&;
134  GetDisplayNameJob withData(JsonWrap j) const &;
135  };
137  }
138  namespace nlohmann
139  {
140  using namespace Kazv;
141  using namespace Kazv::Api;
142 
143  }
144 
145  namespace Kazv::Api
146  {
147 
153 class SetAvatarUrlJob : public BaseJob {
154 public:
155 
156 
157 
158 class JobResponse : public Response
159 {
160 
161 public:
163  bool success() const;
164 
165 };
166  static constexpr auto needsAuth() {
167  return true
168  ;
169  }
170 
171 
172 // Construction/destruction
173 
182  explicit SetAvatarUrlJob(std::string serverUrl
183  , std::string _accessToken
184  ,
185  std::string userId , std::optional<std::string> avatarUrl = std::nullopt
186  );
187 
188 
189  static BaseJob::Query buildQuery(
190  );
191 
192  static BaseJob::Body buildBody(std::string userId, std::optional<std::string> avatarUrl);
193 
194 
195 
196 
197 
198  SetAvatarUrlJob withData(JsonWrap j) &&;
199  SetAvatarUrlJob withData(JsonWrap j) const &;
200  };
202  }
203  namespace nlohmann
204  {
205  using namespace Kazv;
206  using namespace Kazv::Api;
207 
208  }
209 
210  namespace Kazv::Api
211  {
212 
219 class GetAvatarUrlJob : public BaseJob {
220 public:
221 
222 
223 
224 class JobResponse : public Response
225 {
226 
227 public:
229  bool success() const;
230 
231  // Result properties
232 
233 
234 
235 
237 std::optional<std::string> avatarUrl() const;
238 
239 };
240  static constexpr auto needsAuth() {
241  return
242  false;
243  }
244 
245 
246 // Construction/destruction
247 
253  explicit GetAvatarUrlJob(std::string serverUrl
254 
255  ,
256  std::string userId
257  );
258 
259 
260  static BaseJob::Query buildQuery(
261  );
262 
263  static BaseJob::Body buildBody(std::string userId);
264 
265 
266 
267 
268 
269  GetAvatarUrlJob withData(JsonWrap j) &&;
270  GetAvatarUrlJob withData(JsonWrap j) const &;
271  };
273  }
274  namespace nlohmann
275  {
276  using namespace Kazv;
277  using namespace Kazv::Api;
278 
279  }
280 
281  namespace Kazv::Api
282  {
283 
291 class GetUserProfileJob : public BaseJob {
292 public:
293 
294 
295 
296 class JobResponse : public Response
297 {
298 
299 public:
301  bool success() const;
302 
303  // Result properties
304 
305 
306 
307 
309 std::optional<std::string> avatarUrl() const;
310 
311 
313 std::optional<std::string> displayname() const;
314 
315 };
316  static constexpr auto needsAuth() {
317  return
318  false;
319  }
320 
321 
322 // Construction/destruction
323 
329  explicit GetUserProfileJob(std::string serverUrl
330 
331  ,
332  std::string userId
333  );
334 
335 
336  static BaseJob::Query buildQuery(
337  );
338 
339  static BaseJob::Body buildBody(std::string userId);
340 
341 
342 
343 
344 
345  GetUserProfileJob withData(JsonWrap j) &&;
346  GetUserProfileJob withData(JsonWrap j) const &;
347  };
349  }
350  namespace nlohmann
351  {
352  using namespace Kazv;
353  using namespace Kazv::Api;
354 
355  }
356 
357  namespace Kazv::Api
358  {
359 
360 } // namespace Kazv::Api
Definition: profile.hpp:225
Get the user's avatar URL.
Definition: profile.hpp:219
static constexpr auto needsAuth()
Definition: profile.hpp:240
Get the user's display name.
Definition: profile.hpp:83
static constexpr auto needsAuth()
Definition: profile.hpp:104
Get this user's profile information.
Definition: profile.hpp:291
static constexpr auto needsAuth()
Definition: profile.hpp:316
Definition: profile.hpp:159
Set the user's avatar URL.
Definition: profile.hpp:153
static constexpr auto needsAuth()
Definition: profile.hpp:166
bool success() const
Definition: profile.cpp:76
JobResponse(Response r)
Definition: profile.cpp:73
Set the user's display name.
Definition: profile.hpp:17
SetDisplayNameJob(std::string serverUrl, std::string _accessToken, std::string userId, std::optional< std::string > displayname=std::nullopt)
Set the user's display name.
Definition: profile.cpp:39
static BaseJob::Body buildBody(std::string userId, std::optional< std::string > displayname)
Definition: profile.cpp:21
static constexpr auto needsAuth()
Definition: profile.hpp:30
static BaseJob::Query buildQuery()
Definition: profile.cpp:13
SetDisplayNameJob withData(JsonWrap j) &&
Definition: profile.cpp:59
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: basejob.hpp:50