From 12df82c1a90208a822ebdf3d5f4994d55ef7cbea Mon Sep 17 00:00:00 2001 From: ComradeCrow Date: Wed, 30 Aug 2023 19:12:22 -0700 Subject: update --- include/invapi.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'include/invapi.hpp') diff --git a/include/invapi.hpp b/include/invapi.hpp index 3fb4c05..bcd5eef 100644 --- a/include/invapi.hpp +++ b/include/invapi.hpp @@ -9,10 +9,18 @@ class InvidiousApi { public: + struct instance { - InvidiousApi(const std::string& url); - static std::vector getInstances(); + 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); -- cgit 1.4.1-2-gfad0