Concord - C Discord API library
A Discord API wrapper library written in C
guild_scheduled_event.h
Go to the documentation of this file.
1
6#ifndef API_GUILD_SCHEDULED_EVENT_H
7#define API_GUILD_SCHEDULED_EVENT_H
8/* Allow symbols usage without GENCODECS_ prefix */
9#include <stddef.h>
10#include <stdbool.h>
11#include <inttypes.h>
12#include "carray.h"
13#include "cog-utils.h"
14#include "types.h"
15/* Custom JSON encoding macros */
16/* Custom JSON decoding macros */
17/* Custom field macros */
18/* if GENCODECS_READ is not specified then generate for all files */
19/*****************************************************************************
20 * Guild Scheduled Event Datatypes
21 * **************************************************************************/
25};
30};
36};
49 char * name;
60
64
68
74
78
82 char * image;
83};
87 char * location;
88
89};
92 struct discord_guild_scheduled_event *array; int realsize; };
100
105
106};
111/*****************************************************************************
112 * Guild Scheduled Event REST parameters
113 * **************************************************************************/
117};
121 char * reason;
125
129
131 char * name;
135
139
143
147
151
154 char * image;
155
156};
160};
164 char * reason;
168
172
174 char * name;
178
182
186
190
194
197 char * image;
198
199};
202 int limit;
208
212
213};
214#include <stddef.h>
215#include <stdbool.h>
216#define JSMN_STRICT
217#define JSMN_HEADER
218#include "jsmn.h"
219#include "jsmn-find.h"
220#define JSONB_HEADER
221#include "json-build.h"
222#include <inttypes.h>
223#include "carray.h"
224#include "cog-utils.h"
225#include "types.h"
226
227
228
229
230
231
232
233
234
235
236
237
238
239
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
274
275
276
277
278
279
280
281
282
283
284
286
287
288
289
290
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360long discord_guild_scheduled_event_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_guild_scheduled_event *self); size_t discord_guild_scheduled_event_from_json(const char buf[], size_t size, struct discord_guild_scheduled_event *self);
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393long discord_guild_scheduled_events_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_guild_scheduled_events *self); size_t discord_guild_scheduled_events_from_json(const char buf[], size_t size, struct discord_guild_scheduled_events *self);
394
395
396
397
398
399
400
401
402
403
404
405long discord_guild_scheduled_event_users_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_guild_scheduled_event_users *self); size_t discord_guild_scheduled_event_users_from_json(const char buf[], size_t size, struct discord_guild_scheduled_event_users *self);
406
407
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462jsonbcode discord_guild_scheduled_event_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_guild_scheduled_event *self); size_t discord_guild_scheduled_event_to_json(char buf[], size_t size, const struct discord_guild_scheduled_event *self);
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495jsonbcode discord_guild_scheduled_events_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_guild_scheduled_events *self); size_t discord_guild_scheduled_events_to_json(char buf[], size_t size, const struct discord_guild_scheduled_events *self);
496
497
498
499
500
501
502
503
504
505
506
508
509
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564#endif /* API_GUILD_SCHEDULED_EVENT_H */
size_t discord_modify_guild_scheduled_event_from_json(const char buf[], size_t size, struct discord_modify_guild_scheduled_event *self)
size_t discord_guild_scheduled_event_from_json(const char buf[], size_t size, struct discord_guild_scheduled_event *self)
void discord_guild_scheduled_event_cleanup(struct discord_guild_scheduled_event *self)
size_t discord_modify_guild_scheduled_event_to_json(char buf[], size_t size, const struct discord_modify_guild_scheduled_event *self)
void discord_modify_guild_scheduled_event_cleanup(struct discord_modify_guild_scheduled_event *self)
long discord_guild_scheduled_event_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_guild_scheduled_event *self)
void discord_create_guild_scheduled_event_cleanup(struct discord_create_guild_scheduled_event *self)
jsonbcode discord_modify_guild_scheduled_event_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_modify_guild_scheduled_event *self)
jsonbcode discord_guild_scheduled_event_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_guild_scheduled_event *self)
size_t discord_guild_scheduled_event_users_from_json(const char buf[], size_t size, struct discord_guild_scheduled_event_users *self)
void discord_guild_scheduled_events_cleanup(struct discord_guild_scheduled_events *self)
void discord_create_guild_scheduled_event_init(struct discord_create_guild_scheduled_event *self)
size_t discord_guild_scheduled_event_users_to_json(char buf[], size_t size, const struct discord_guild_scheduled_event_users *self)
discord_guild_scheduled_event_status
Definition: guild_scheduled_event.h:31
@ DISCORD_GUILD_SCHEDULED_EVENT_SCHEDULED
Definition: guild_scheduled_event.h:32
@ DISCORD_GUILD_SCHEDULED_EVENT_COMPLETED
Definition: guild_scheduled_event.h:34
@ DISCORD_GUILD_SCHEDULED_EVENT_CANCELED
Definition: guild_scheduled_event.h:35
@ DISCORD_GUILD_SCHEDULED_EVENT_ACTIVE
Definition: guild_scheduled_event.h:33
long discord_guild_scheduled_event_users_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_guild_scheduled_event_users *self)
jsonbcode discord_guild_scheduled_events_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_guild_scheduled_events *self)
long discord_create_guild_scheduled_event_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_create_guild_scheduled_event *self)
void discord_guild_scheduled_event_users_cleanup(struct discord_guild_scheduled_event_users *self)
jsonbcode discord_guild_scheduled_event_users_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_guild_scheduled_event_users *self)
size_t discord_create_guild_scheduled_event_from_json(const char buf[], size_t size, struct discord_create_guild_scheduled_event *self)
void discord_guild_scheduled_event_init(struct discord_guild_scheduled_event *self)
discord_guild_scheduled_event_entity_types
Definition: guild_scheduled_event.h:26
@ DISCORD_GUILD_SCHEDULED_EVENT_ENTITY_VOICE
Definition: guild_scheduled_event.h:28
@ DISCORD_GUILD_SCHEDULED_EVENT_ENTITY_EXTERNAL
Definition: guild_scheduled_event.h:29
@ DISCORD_GUILD_SCHEDULED_EVENT_ENTITY_STAGE_INSTANCE
Definition: guild_scheduled_event.h:27
size_t discord_create_guild_scheduled_event_to_json(char buf[], size_t size, const struct discord_create_guild_scheduled_event *self)
discord_guild_scheduled_event_privacy_level
Definition: guild_scheduled_event.h:22
@ DISCORD_GUILD_SCHEDULED_EVENT_GUILD_ONLY
Definition: guild_scheduled_event.h:24
void discord_modify_guild_scheduled_event_init(struct discord_modify_guild_scheduled_event *self)
jsonbcode discord_create_guild_scheduled_event_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_create_guild_scheduled_event *self)
long discord_modify_guild_scheduled_event_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_modify_guild_scheduled_event *self)
size_t discord_guild_scheduled_events_to_json(char buf[], size_t size, const struct discord_guild_scheduled_events *self)
size_t discord_guild_scheduled_events_from_json(const char buf[], size_t size, struct discord_guild_scheduled_events *self)
long discord_guild_scheduled_events_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_guild_scheduled_events *self)
size_t discord_guild_scheduled_event_to_json(char buf[], size_t size, const struct discord_guild_scheduled_event *self)
uint64_t u64snowflake
Snowflake datatype.
Definition: types.h:28
uint64_t u64unix_ms
Unix time in milliseconds.
Definition: types.h:22
jsonbcode
json-builder return codes
Definition: json-build.h:34
Definition: guild_scheduled_event.h:119
struct discord_guild_scheduled_event_entity_metadata * entity_metadata
Definition: guild_scheduled_event.h:128
u64unix_ms scheduled_start_time
Definition: guild_scheduled_event.h:138
u64snowflake channel_id
Definition: guild_scheduled_event.h:124
enum discord_guild_scheduled_event_privacy_level privacy_level
Definition: guild_scheduled_event.h:134
u64unix_ms scheduled_end_time
Definition: guild_scheduled_event.h:142
char * description
Definition: guild_scheduled_event.h:146
char * reason
Definition: guild_scheduled_event.h:121
char * name
Definition: guild_scheduled_event.h:131
char * image
Definition: guild_scheduled_event.h:154
enum discord_guild_scheduled_event_entity_types entity_type
Definition: guild_scheduled_event.h:150
Definition: guild_scheduled_event.h:200
u64snowflake before
Definition: guild_scheduled_event.h:207
u64snowflake after
Definition: guild_scheduled_event.h:211
bool with_member
Definition: guild_scheduled_event.h:204
int limit
Definition: guild_scheduled_event.h:202
Definition: guild_scheduled_event.h:157
bool with_user_count
Definition: guild_scheduled_event.h:159
Definition: guild.h:290
Definition: guild_scheduled_event.h:84
char * location
Definition: guild_scheduled_event.h:87
Definition: guild_scheduled_event.h:94
struct discord_user * user
Definition: guild_scheduled_event.h:99
u64snowflake guild_scheduled_event_id
Definition: guild_scheduled_event.h:96
struct discord_guild_member * member
Definition: guild_scheduled_event.h:104
Definition: guild_scheduled_event.h:108
struct discord_guild_scheduled_event_user * array
Definition: guild_scheduled_event.h:109
int size
Definition: guild_scheduled_event.h:108
Definition: guild_scheduled_event.h:38
enum discord_guild_scheduled_event_status status
Definition: guild_scheduled_event.h:63
u64snowflake channel_id
Definition: guild_scheduled_event.h:45
struct discord_guild_scheduled_event_entity_metadata * entity_metadata
Definition: guild_scheduled_event.h:73
enum discord_guild_scheduled_event_privacy_level privacy_level
Definition: guild_scheduled_event.h:59
u64snowflake entity_id
Definition: guild_scheduled_event.h:70
enum discord_guild_scheduled_event_entity_types entity_type
Definition: guild_scheduled_event.h:67
u64unix_ms scheduled_start_time
Definition: guild_scheduled_event.h:53
u64snowflake guild_id
Definition: guild_scheduled_event.h:42
struct discord_user * creator
Definition: guild_scheduled_event.h:77
u64snowflake creator_id
Definition: guild_scheduled_event.h:47
char * image
Definition: guild_scheduled_event.h:82
char * name
Definition: guild_scheduled_event.h:49
u64snowflake id
Definition: guild_scheduled_event.h:40
int user_count
Definition: guild_scheduled_event.h:80
char * description
Definition: guild_scheduled_event.h:51
u64unix_ms scheduled_end_time
Definition: guild_scheduled_event.h:56
Definition: guild_scheduled_event.h:91
struct discord_guild_scheduled_event * array
Definition: guild_scheduled_event.h:92
int size
Definition: guild_scheduled_event.h:91
Definition: guild_scheduled_event.h:114
bool with_user_count
Definition: guild_scheduled_event.h:116
Definition: guild_scheduled_event.h:162
char * image
Definition: guild_scheduled_event.h:197
char * description
Definition: guild_scheduled_event.h:185
enum discord_guild_scheduled_event_status status
Definition: guild_scheduled_event.h:193
u64unix_ms scheduled_start_time
Definition: guild_scheduled_event.h:177
u64snowflake channel_id
Definition: guild_scheduled_event.h:167
u64unix_ms scheduled_end_time
Definition: guild_scheduled_event.h:181
char * name
Definition: guild_scheduled_event.h:174
enum discord_guild_scheduled_event_entity_types entity_type
Definition: guild_scheduled_event.h:189
char * reason
Definition: guild_scheduled_event.h:164
struct discord_guild_scheduled_event_entity_metadata * entity_metadata
Definition: guild_scheduled_event.h:171
Definition: user.h:69
Handle for building a JSON string.
Definition: json-build.h:61