Concord - C Discord API library
A Discord API wrapper library written in C
guild_template.h
Go to the documentation of this file.
1
6#ifndef API_GUILD_TEMPLATE_H
7#define API_GUILD_TEMPLATE_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 Template Datatypes
21 * **************************************************************************/
25 char * code;
27 char * name;
46};
49 struct discord_guild_template *array; int realsize; };
51/*****************************************************************************
52 * Guild Template REST parameters
53 * **************************************************************************/
57 char * name;
60 char * icon;
61
62};
66 char * name;
70
71};
76 char * name;
77
81
82};
83#include <stddef.h>
84#include <stdbool.h>
85#define JSMN_STRICT
86#define JSMN_HEADER
87#include "jsmn.h"
88#include "jsmn-find.h"
89#define JSONB_HEADER
90#include "json-build.h"
91#include <inttypes.h>
92#include "carray.h"
93#include "cog-utils.h"
94#include "types.h"
96
97
98
99
100
101
102
103
104
105
106
107
109
110
112
113
114
115
116
118
119
120
121
122
124
125
126
127
128
129
130
131long discord_guild_template_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_guild_template *self); size_t discord_guild_template_from_json(const char buf[], size_t size, struct discord_guild_template *self);
132
133
134
135
136
137
138
139
140
141
142
143
144long discord_guild_templates_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_guild_templates *self); size_t discord_guild_templates_from_json(const char buf[], size_t size, struct discord_guild_templates *self);
145
146
148
149
150
151
152
153long discord_create_guild_template_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_create_guild_template *self); size_t discord_create_guild_template_from_json(const char buf[], size_t size, struct discord_create_guild_template *self);
154
155
156
157
158
159long discord_modify_guild_template_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_modify_guild_template *self); size_t discord_modify_guild_template_from_json(const char buf[], size_t size, struct discord_modify_guild_template *self);
160
161
162
163
164
165
166
167jsonbcode discord_guild_template_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_guild_template *self); size_t discord_guild_template_to_json(char buf[], size_t size, const struct discord_guild_template *self);
168
169
170
171
172
173
174
175
176
177
178
179
180jsonbcode discord_guild_templates_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_guild_templates *self); size_t discord_guild_templates_to_json(char buf[], size_t size, const struct discord_guild_templates *self);
181
182
184
185
186
187
188
189jsonbcode discord_create_guild_template_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_create_guild_template *self); size_t discord_create_guild_template_to_json(char buf[], size_t size, const struct discord_create_guild_template *self);
190
191
192
193
194
195jsonbcode discord_modify_guild_template_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_modify_guild_template *self); size_t discord_modify_guild_template_to_json(char buf[], size_t size, const struct discord_modify_guild_template *self);
196
197
198
199
200
201
202
203#endif /* API_GUILD_TEMPLATE_H */
long discord_create_guild_template_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_create_guild_template *self)
void discord_create_guild_template_cleanup(struct discord_create_guild_template *self)
size_t discord_modify_guild_template_to_json(char buf[], size_t size, const struct discord_modify_guild_template *self)
void discord_guild_templates_cleanup(struct discord_guild_templates *self)
size_t discord_guild_template_from_json(const char buf[], size_t size, struct discord_guild_template *self)
size_t discord_create_guild_template_from_json(const char buf[], size_t size, struct discord_create_guild_template *self)
jsonbcode discord_guild_template_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_guild_template *self)
void discord_modify_guild_template_init(struct discord_modify_guild_template *self)
jsonbcode discord_create_guild_template_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_create_guild_template *self)
void discord_modify_guild_template_cleanup(struct discord_modify_guild_template *self)
jsonbcode discord_modify_guild_template_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_modify_guild_template *self)
jsonbcode discord_guild_templates_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_guild_templates *self)
long discord_create_guild_from_guild_template_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_create_guild_from_guild_template *self)
size_t discord_create_guild_template_to_json(char buf[], size_t size, const struct discord_create_guild_template *self)
size_t discord_create_guild_from_guild_template_to_json(char buf[], size_t size, const struct discord_create_guild_from_guild_template *self)
size_t discord_create_guild_from_guild_template_from_json(const char buf[], size_t size, struct discord_create_guild_from_guild_template *self)
size_t discord_modify_guild_template_from_json(const char buf[], size_t size, struct discord_modify_guild_template *self)
long discord_guild_template_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_guild_template *self)
size_t discord_guild_templates_to_json(char buf[], size_t size, const struct discord_guild_templates *self)
jsonbcode discord_create_guild_from_guild_template_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_create_guild_from_guild_template *self)
long discord_modify_guild_template_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_modify_guild_template *self)
void discord_create_guild_from_guild_template_cleanup(struct discord_create_guild_from_guild_template *self)
size_t discord_guild_templates_from_json(const char buf[], size_t size, struct discord_guild_templates *self)
size_t discord_guild_template_to_json(char buf[], size_t size, const struct discord_guild_template *self)
long discord_guild_templates_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_guild_templates *self)
void discord_guild_template_init(struct discord_guild_template *self)
void discord_guild_template_cleanup(struct discord_guild_template *self)
void discord_create_guild_from_guild_template_init(struct discord_create_guild_from_guild_template *self)
void discord_create_guild_template_init(struct discord_create_guild_template *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_template.h:55
char * icon
Definition: guild_template.h:60
char * name
Definition: guild_template.h:57
Definition: guild_template.h:64
char * description
Definition: guild_template.h:69
char * name
Definition: guild_template.h:66
Definition: guild_template.h:23
u64snowflake creator_id
Definition: guild_template.h:33
struct discord_guild * serialized_source_guild
Definition: guild_template.h:43
u64unix_ms updated_at
Definition: guild_template.h:39
u64snowflake source_guild_id
Definition: guild_template.h:41
bool is_dirty
Definition: guild_template.h:45
int usage_count
Definition: guild_template.h:31
struct discord_user * creator
Definition: guild_template.h:35
char * code
Definition: guild_template.h:25
char * name
Definition: guild_template.h:27
u64unix_ms created_at
Definition: guild_template.h:37
char * description
Definition: guild_template.h:29
Definition: guild_template.h:48
struct discord_guild_template * array
Definition: guild_template.h:49
int size
Definition: guild_template.h:48
Definition: guild.h:88
Definition: guild_template.h:73
char * description
Definition: guild_template.h:80
char * name
Definition: guild_template.h:76
Definition: user.h:69
Handle for building a JSON string.
Definition: json-build.h:61