#ifndef DISCORD_DISCORD_H #define DISCORD_DISCORD_H #include "error.h" // @TODO: use opaque pointer #include #define DISCORD_BASE_URL "https://discord.com/api" #define DISCORD_API_VERSION "10" #define DISCORD_MAX_API_URL 256 #define DISCORD_MAX_TOKEN_VALUE 128 typedef struct discord_client { // char *token_type; // Bot or Bearer char token_value[DISCORD_MAX_TOKEN_VALUE]; char api_url[DISCORD_MAX_API_URL]; CURL *curl; } discord_client; // remember to call curl_global_cleanup() discord_error discord_init(discord_client *client, const char *token); #endif