aboutsummaryrefslogtreecommitdiffstats
path: root/include/dbs/api.h
diff options
context:
space:
mode:
authorturret <turret@duck.com>2025-06-22 19:15:47 -0500
committerturret <turret@duck.com>2025-06-22 19:15:47 -0500
commitabb1c579d29b3fb61e79601518799beca46609c3 (patch)
tree8585a73b78efb5b0b2c52fb0e4b6f46ff134a1e5 /include/dbs/api.h
parent35d7228fb15bc7b262745fef179f79d1ac0b4045 (diff)
downloaddiscord-bot-skeleton-abb1c579d29b3fb61e79601518799beca46609c3.tar.gz
discord-bot-skeleton-abb1c579d29b3fb61e79601518799beca46609c3.tar.bz2
discord-bot-skeleton-abb1c579d29b3fb61e79601518799beca46609c3.zip
net: api changes, data export, ident, an more
Move HELLO IDENT functionality into util/net Add ready event in example/hello, grab app id and print info Change http_request family of functions - Remove bufsiz for response code - Remove post input pipe in exchange for simple writebuf Add heartbeat latency ack tracking Add websocket handle close function (dummy function, to be extended upon) Add message for invalid token
Diffstat (limited to 'include/dbs/api.h')
-rw-r--r--include/dbs/api.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/dbs/api.h b/include/dbs/api.h
index d421f08..5d4d4fc 100644
--- a/include/dbs/api.h
+++ b/include/dbs/api.h
@@ -10,10 +10,12 @@ typedef enum {
} HTTPMethod;
int http_request(HTTPMethod method, char *url,
- struct curl_slist *headers, char *writebuf, size_t bufsiz);
+ struct curl_slist *headers, char *writebuf,
+ long *response_code);
-int api_request(HTTPMethod method, char * url,
- struct curl_slist *headers, char *writebuf, size_t bufsiz);
+int api_request(HTTPMethod method, char *url,
+ struct curl_slist *headers, char *writebuf,
+ long *response_code);
#define http_get(...) http_request(HTTP_GET, __VA_ARGS__)
#define http_post(...) http_request(HTTP_POST, __VA_ARGS__)