mirror of
https://github.com/acidicoala/SmokeAPI.git
synced 2026-01-25 14:02:55 -05:00
Renamed koalageddon mode to store mode
This commit is contained in:
19
src/store_mode/store_api.cpp
Normal file
19
src/store_mode/store_api.cpp
Normal 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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user