Concord - C Discord API library
A Discord API wrapper library written in C
oauth2.h
Go to the documentation of this file.
1
6#ifndef API_OAUTH2_H
7#define API_OAUTH2_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 * OAuth2 Datatypes
21 * **************************************************************************/
27 struct strings * scopes;
33};
34#include <stddef.h>
35#include <stdbool.h>
36#define JSMN_STRICT
37#define JSMN_HEADER
38#include "jsmn.h"
39#include "jsmn-find.h"
40#define JSONB_HEADER
41#include "json-build.h"
42#include <inttypes.h>
43#include "carray.h"
44#include "cog-utils.h"
45#include "types.h"
47
48
49
50
51
52long discord_auth_response_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_auth_response *self); size_t discord_auth_response_from_json(const char buf[], size_t size, struct discord_auth_response *self);
53
54
55
56
57
58jsonbcode discord_auth_response_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_auth_response *self); size_t discord_auth_response_to_json(char buf[], size_t size, const struct discord_auth_response *self);
59
60
61
62
63
64#endif /* API_OAUTH2_H */
size_t discord_auth_response_from_json(const char buf[], size_t size, struct discord_auth_response *self)
size_t discord_auth_response_to_json(char buf[], size_t size, const struct discord_auth_response *self)
void discord_auth_response_init(struct discord_auth_response *self)
long discord_auth_response_from_jsmnf(jsmnf_pair *root, const char *js, struct discord_auth_response *self)
void discord_auth_response_cleanup(struct discord_auth_response *self)
jsonbcode discord_auth_response_to_jsonb(jsonb *b, char buf[], size_t size, const struct discord_auth_response *self)
uint64_t u64unix_ms
Unix time in milliseconds.
Definition: types.h:22
jsonbcode
json-builder return codes
Definition: json-build.h:34
Definition: application.h:35
Definition: oauth2.h:23
struct discord_application * application
Definition: oauth2.h:25
struct strings * scopes
Definition: oauth2.h:27
u64unix_ms expires
Definition: oauth2.h:29
struct discord_user * user
Definition: oauth2.h:32
Definition: user.h:69
Handle for building a JSON string.
Definition: json-build.h:61
Definition: custom.h:20