#ifndef INVAPI_H #define INVAPI_H #include #include #include #include "sqliteinterface.hpp" class InvidiousApi { public: struct instance { std::string url; float health; std::string location; }; InvidiousApi(const std::string& url) : instanceUrl(url) {}; static std::vector getInstancesUrls(); static std::vector getInstances(); static void saveInstancesToDb(SqliteInterface& sqldb); static std::string getInstanceUrlFromDb(SqliteInterface& sqldb); std::string getInstance(); void setInstance(const std::string& newUrl); void test(); private: std::string instanceUrl; cpr::Session session; }; #endif