libkazv
Loading...
Searching...
No Matches
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
10namespace Kazv::Api {
11
17class SetDisplayNameJob : public BaseJob {
18public:
19
20
21
22class JobResponse : public Response
23{
24
25public:
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
83class GetDisplayNameJob : public BaseJob {
84public:
85
86
87
88class JobResponse : public Response
89{
90
91public:
93 bool success() const;
94
95 // Result properties
96
97
98
99
101std::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
125 );
126
127 static BaseJob::Body buildBody(std::string userId);
128
129
130
131
132
135 };
137 }
138 namespace nlohmann
139 {
140 using namespace Kazv;
141 using namespace Kazv::Api;
142
143 }
144
145 namespace Kazv::Api
146 {
147
153class SetAvatarUrlJob : public BaseJob {
154public:
155
156
157
158class JobResponse : public Response
159{
160
161public:
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
190 );
191
192 static BaseJob::Body buildBody(std::string userId, std::optional<std::string> avatarUrl);
193
194
195
196
197
200 };
202 }
203 namespace nlohmann
204 {
205 using namespace Kazv;
206 using namespace Kazv::Api;
207
208 }
209
210 namespace Kazv::Api
211 {
212
219class GetAvatarUrlJob : public BaseJob {
220public:
221
222
223
224class JobResponse : public Response
225{
226
227public:
229 bool success() const;
230
231 // Result properties
232
233
234
235
237std::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
261 );
262
263 static BaseJob::Body buildBody(std::string userId);
264
265
266
267
268
271 };
273 }
274 namespace nlohmann
275 {
276 using namespace Kazv;
277 using namespace Kazv::Api;
278
279 }
280
281 namespace Kazv::Api
282 {
283
292public:
293
294
295
296class JobResponse : public Response
297{
298
299public:
301 bool success() const;
302
303 // Result properties
304
305
306
307
309std::optional<std::string> avatarUrl() const;
310
311
313std::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
337 );
338
339 static BaseJob::Body buildBody(std::string userId);
340
341
342
343
344
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
std::optional< std::string > avatarUrl() const
The user's avatar URL if they have set one, otherwise not present.
Definition profile.cpp:307
bool success() const
Definition profile.cpp:297
Get the user's avatar URL.
Definition profile.hpp:219
static BaseJob::Body buildBody(std::string userId)
Definition profile.cpp:248
static constexpr auto needsAuth()
Definition profile.hpp:240
static BaseJob::Query buildQuery()
Definition profile.cpp:240
GetAvatarUrlJob withData(JsonWrap j) &&
Definition profile.cpp:280
std::optional< std::string > displayname() const
The user's display name if they have set one, otherwise not present.
Definition profile.cpp:154
bool success() const
Definition profile.cpp:144
Get the user's display name.
Definition profile.hpp:83
static BaseJob::Body buildBody(std::string userId)
Definition profile.cpp:95
static constexpr auto needsAuth()
Definition profile.hpp:104
static BaseJob::Query buildQuery()
Definition profile.cpp:87
GetDisplayNameJob withData(JsonWrap j) &&
Definition profile.cpp:127
std::optional< std::string > displayname() const
The user's display name if they have set one, otherwise not present.
Definition profile.cpp:397
bool success() const
Definition profile.cpp:376
std::optional< std::string > avatarUrl() const
The user's avatar URL if they have set one, otherwise not present.
Definition profile.cpp:386
Get this user's profile information.
Definition profile.hpp:291
static BaseJob::Body buildBody(std::string userId)
Definition profile.cpp:327
static BaseJob::Query buildQuery()
Definition profile.cpp:319
static constexpr auto needsAuth()
Definition profile.hpp:316
GetUserProfileJob withData(JsonWrap j) &&
Definition profile.cpp:359
Definition profile.hpp:159
bool success() const
Definition profile.cpp:229
Set the user's avatar URL.
Definition profile.hpp:153
SetAvatarUrlJob withData(JsonWrap j) &&
Definition profile.cpp:212
static BaseJob::Body buildBody(std::string userId, std::optional< std::string > avatarUrl)
Definition profile.cpp:174
static BaseJob::Query buildQuery()
Definition profile.cpp:166
static constexpr auto needsAuth()
Definition profile.hpp:166
bool success() const
Definition profile.cpp:76
Set the user's display name.
Definition profile.hpp:17
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: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 basejob.hpp:49