about summary refs log tree commit diff stats
path: root/include/invapi.hpp
diff options
context:
space:
mode:
authorComradeCrow <comradecrow@vivaldi.net>2023-08-30 19:12:22 -0700
committerComradeCrow <comradecrow@vivaldi.net>2023-08-30 19:12:22 -0700
commit12df82c1a90208a822ebdf3d5f4994d55ef7cbea (patch)
treef4e55f053778a637803dd492ae1ac0dcd21ec309 /include/invapi.hpp
parentfd350c39ce8dab1ebb6bca94abf25e2e782086b3 (diff)
downloadytcpp-12df82c1a90208a822ebdf3d5f4994d55ef7cbea.tar.gz
update
Diffstat (limited to 'include/invapi.hpp')
-rw-r--r--include/invapi.hpp12
1 files changed, 10 insertions, 2 deletions
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<std::string> getInstances();
+            std::string url;
+            float health;
+            std::string location;
+        };
+
+        InvidiousApi(const std::string& url) : instanceUrl(url) {};
+        static std::vector<std::string> getInstancesUrls();
+        static std::vector<instance> getInstances();
         static void saveInstancesToDb(SqliteInterface& sqldb);
+        static std::string getInstanceUrlFromDb(SqliteInterface& sqldb);
         std::string getInstance();
         void setInstance(const std::string& newUrl);