Concord - C Discord API library
A Discord API wrapper library written in C
sticker.h
Go to the documentation of this file.
1
6#ifndef API_STICKER_H
7#define API_STICKER_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 * Sticker Datatypes
21 * **************************************************************************/
28};
33};
41
43 char * name;
47 char * tags;
51
55
62
66
69};
72 struct discord_sticker *array; int realsize; };
78 char * name;
82
83};
85 struct discord_sticker_item *array; int realsize; };
93
95 char * name;
101
107
108};
111 struct discord_sticker_pack *array; int realsize; };
113/*****************************************************************************
114 * Sticker REST parameters
115 * **************************************************************************/
120};
123 char * reason;
125 char * name;
129 char * tags;
133};
137 char * name;
141 char * tags;
142};
145 char * reason;
146};
147#include <stddef.h>
148#include <stdbool.h>
149#define JSMN_STRICT
150#define JSMN_HEADER
151#include "jsmn.h"
152#include "jsmn-find.h"
153#define JSONB_HEADER
154#include "json-build.h"
155#include <inttypes.h>
156#include "carray.h"
157#include "cog-utils.h"
158#include "types.h"
159
160
161
162
163
164
165
166
167
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
220
221
223
224
225
226
227
228
229
230
231
233
234
235
236
237
238
239
240long discord_sticker_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_sticker *self); size_t discord_sticker_from_json(const char buf[], size_t size, struct discord_sticker *self);
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263long discord_stickers_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_stickers *self); size_t discord_stickers_from_json(const char buf[], size_t size, struct discord_stickers *self);
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291long discord_sticker_packs_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_sticker_packs *self); size_t discord_sticker_packs_from_json(const char buf[], size_t size, struct discord_sticker_packs *self);
292
293
294long discord_list_nitro_sticker_packs_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_list_nitro_sticker_packs *self); size_t discord_list_nitro_sticker_packs_from_json(const char buf[], size_t size, struct discord_list_nitro_sticker_packs *self);
295
296
297long discord_modify_guild_sticker_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_modify_guild_sticker *self); size_t discord_modify_guild_sticker_from_json(const char buf[], size_t size, struct discord_modify_guild_sticker *self);
298
299
300
301
302jsonbcode discord_sticker_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_sticker *self); size_t discord_sticker_to_json(char buf[], size_t size, const struct discord_sticker *self);
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325jsonbcode discord_stickers_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_stickers *self); size_t discord_stickers_to_json(char buf[], size_t size, const struct discord_stickers *self);
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
353jsonbcode discord_sticker_packs_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_sticker_packs *self); size_t discord_sticker_packs_to_json(char buf[], size_t size, const struct discord_sticker_packs *self);
354
355
356jsonbcode discord_modify_guild_sticker_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_modify_guild_sticker *self); size_t discord_modify_guild_sticker_to_json(char buf[], size_t size, const struct discord_modify_guild_sticker *self);
357
358
359
360
361#endif /* API_STICKER_H */
jsonbcode discord_modify_guild_sticker_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_modify_guild_sticker *self)
void discord_stickers_cleanup(struct discord_stickers *self)
void discord_modify_guild_sticker_init(struct discord_modify_guild_sticker *self)
void discord_sticker_packs_cleanup(struct discord_sticker_packs *self)
void discord_modify_guild_sticker_cleanup(struct discord_modify_guild_sticker *self)
long discord_stickers_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_stickers *self)
discord_sticker_format_types
Definition: sticker.h:29
@ DISCORD_STICKER_FORMAT_LOTTIE
Definition: sticker.h:32
@ DISCORD_STICKER_FORMAT_PNG
Definition: sticker.h:30
@ DISCORD_STICKER_FORMAT_APNG
Definition: sticker.h:31
long discord_list_nitro_sticker_packs_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_list_nitro_sticker_packs *self)
void discord_sticker_cleanup(struct discord_sticker *self)
long discord_modify_guild_sticker_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_modify_guild_sticker *self)
void discord_list_nitro_sticker_packs_init(struct discord_list_nitro_sticker_packs *self)
size_t discord_sticker_packs_to_json(char buf[], size_t size, const struct discord_sticker_packs *self)
jsonbcode discord_stickers_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_stickers *self)
size_t discord_list_nitro_sticker_packs_from_json(const char buf[], size_t size, struct discord_list_nitro_sticker_packs *self)
size_t discord_modify_guild_sticker_to_json(char buf[], size_t size, const struct discord_modify_guild_sticker *self)
size_t discord_sticker_to_json(char buf[], size_t size, const struct discord_sticker *self)
long discord_sticker_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_sticker *self)
size_t discord_stickers_from_json(const char buf[], size_t size, struct discord_stickers *self)
size_t discord_stickers_to_json(char buf[], size_t size, const struct discord_stickers *self)
void discord_sticker_init(struct discord_sticker *self)
jsonbcode discord_sticker_packs_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_sticker_packs *self)
size_t discord_modify_guild_sticker_from_json(const char buf[], size_t size, struct discord_modify_guild_sticker *self)
discord_sticker_types
Definition: sticker.h:22
@ DISCORD_STICKER_STANDARD
Definition: sticker.h:25
@ DISCORD_STICKER_GUILD
Definition: sticker.h:27
jsonbcode discord_sticker_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_sticker *self)
size_t discord_sticker_packs_from_json(const char buf[], size_t size, struct discord_sticker_packs *self)
long discord_sticker_packs_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_sticker_packs *self)
size_t discord_sticker_from_json(const char buf[], size_t size, struct discord_sticker *self)
void discord_list_nitro_sticker_packs_cleanup(struct discord_list_nitro_sticker_packs *self)
uint64_t u64snowflake
Snowflake datatype.
Definition: types.h:28
jsonbcode
json-builder return codes
Definition: json-build.h:34
Definition: channel.h:352
Definition: sticker.h:121
char * description
Definition: sticker.h:127
char * reason
Definition: sticker.h:123
char * tags
Definition: sticker.h:129
char * name
Definition: sticker.h:125
struct discord_attachment * file
Definition: sticker.h:132
Definition: sticker.h:143
char * reason
Definition: sticker.h:145
Definition: sticker.h:117
struct discord_sticker_packs * sticker_packs
Definition: sticker.h:119
Definition: sticker.h:135
char * name
Definition: sticker.h:137
char * tags
Definition: sticker.h:141
char * description
Definition: sticker.h:139
Definition: sticker.h:74
char * name
Definition: sticker.h:78
enum discord_sticker_format_types format_type
Definition: sticker.h:81
u64snowflake id
Definition: sticker.h:76
Definition: sticker.h:84
struct discord_sticker_item * array
Definition: sticker.h:85
int size
Definition: sticker.h:84
Definition: sticker.h:87
u64snowflake banner_asset_id
Definition: sticker.h:106
u64snowflake id
Definition: sticker.h:89
char * description
Definition: sticker.h:103
u64snowflake cover_sticker_id
Definition: sticker.h:100
struct discord_stickers * stickers
Definition: sticker.h:92
char * name
Definition: sticker.h:95
u64snowflake sku_id
Definition: sticker.h:97
Definition: sticker.h:110
struct discord_sticker_pack * array
Definition: sticker.h:111
int size
Definition: sticker.h:110
Definition: sticker.h:35
char * name
Definition: sticker.h:43
struct discord_user * user
Definition: sticker.h:65
enum discord_sticker_types type
Definition: sticker.h:50
char * tags
Definition: sticker.h:47
u64snowflake id
Definition: sticker.h:37
int sort_value
Definition: sticker.h:68
char * description
Definition: sticker.h:45
enum discord_sticker_format_types format_type
Definition: sticker.h:54
bool available
Definition: sticker.h:58
u64snowflake guild_id
Definition: sticker.h:61
u64snowflake pack_id
Definition: sticker.h:40
Definition: sticker.h:71
struct discord_sticker * array
Definition: sticker.h:72
int size
Definition: sticker.h:71
Definition: user.h:69
Handle for building a JSON string.
Definition: json-build.h:61