Renamed koalageddon mode to store mode

This commit is contained in:
acidicoala
2023-01-13 03:49:07 +03:00
parent dfbce391a7
commit 4f93515bac
50 changed files with 582 additions and 438 deletions

View File

@@ -0,0 +1,19 @@
#include <store_mode/store_api.hpp>
#include <koalabox/http_client.hpp>
namespace store::api {
std::optional<StoreConfig> fetch_store_config() noexcept {
try {
const String url =
"https://raw.githubusercontent.com/acidicoala/public-entitlements/main/steam/v2/store_config.json";
const auto kg_config_json = koalabox::http_client::fetch_json(url);
return kg_config_json.get<StoreConfig>();
} catch (const Exception& e) {
LOG_ERROR("Failed to fetch Store config from GitHub: {}", e.what())
return std::nullopt;
}
}
}