bakatui/src/net.h
PoliEcho fe9735fe58
Some checks are pending
/ sync-to-origin (push) Waiting to run
add main komes reading
2025-04-09 23:43:00 +02:00

23 lines
476 B
C++

#include <curl/curl.h>
#include <nlohmann/json.hpp>
#include <string>
// header guard
#ifndef _ba_ne_hg_
#define _ba_ne_hg_
// metods
enum metod {
GET,
POST,
};
using nlohmann::json;
extern CURL *curl;
namespace bakaapi {
void login(std::string username, std::string password);
void refresh_access_token();
json get_data_from_endpoint(const std::string &endpoint, metod metod,
std::string additional_data = "");
} // namespace bakaapi
#endif