Concord - C Discord API library
A Discord API wrapper library written in C
teams.h
Go to the documentation of this file.
1
6#ifndef API_TEAMS_H
7#define API_TEAMS_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 * Teams Datatypes
21 * **************************************************************************/
25};
29 char * icon;
35
37 char * name;
40};
47
53
54};
56 struct discord_team_member *array; int realsize; };
58#include <stddef.h>
59#include <stdbool.h>
60#define JSMN_STRICT
61#define JSMN_HEADER
62#include "jsmn.h"
63#include "jsmn-find.h"
64#define JSONB_HEADER
65#include "json-build.h"
66#include <inttypes.h>
67#include "carray.h"
68#include "cog-utils.h"
69#include "types.h"
70
71
72
73
74void discord_team_init(struct discord_team *self); void discord_team_cleanup(struct discord_team *self);
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96long discord_team_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_team *self); size_t discord_team_from_json(const char buf[], size_t size, struct discord_team *self);
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118jsonbcode discord_team_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_team *self); size_t discord_team_to_json(char buf[], size_t size, const struct discord_team *self);
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140#endif /* API_TEAMS_H */
uint64_t u64snowflake
Snowflake datatype.
Definition: types.h:28
jsonbcode
json-builder return codes
Definition: json-build.h:34
Definition: custom.h:32
Definition: teams.h:41
enum discord_membership_state membership_state
Definition: teams.h:43
struct bitmasks * permissions
Definition: teams.h:46
struct discord_user * user
Definition: teams.h:52
u64snowflake team_id
Definition: teams.h:49
Definition: teams.h:55
int size
Definition: teams.h:55
struct discord_team_member * array
Definition: teams.h:56
Definition: teams.h:27
u64snowflake owner_user_id
Definition: teams.h:39
char * name
Definition: teams.h:37
struct discord_team_members * members
Definition: teams.h:34
u64snowflake id
Definition: teams.h:31
char * icon
Definition: teams.h:29
Definition: user.h:69
Handle for building a JSON string.
Definition: json-build.h:61
void discord_team_cleanup(struct discord_team *self)
jsonbcode discord_team_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_team *self)
long discord_team_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_team *self)
size_t discord_team_to_json(char buf[], size_t size, const struct discord_team *self)
size_t discord_team_from_json(const char buf[], size_t size, struct discord_team *self)
void discord_team_init(struct discord_team *self)
discord_membership_state
Definition: teams.h:22
@ DISCORD_MEMBERSHIP_INVITED
Definition: teams.h:23
@ DISCORD_MEMBERSHIP_ACCEPTED
Definition: teams.h:24