From 1c07fcd81bcbdc7f9964504301c47d3b19660728 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Sun, 29 Oct 2023 14:22:45 +0100 Subject: [PATCH] Created the config.h --- src/api/config.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/api/config.h diff --git a/src/api/config.h b/src/api/config.h new file mode 100644 index 0000000..0ca0f19 --- /dev/null +++ b/src/api/config.h @@ -0,0 +1,25 @@ +#ifndef BOT_CONFIG_H +#define BOT_CONFIG_H + +#include + +using json = nlohmann::json; + +class config { +public: + /** + * Reads the config file and returns a json object. + * @return json object + */ + static json read_config(); + + /** + * Checks if the config file is valid. + * @param config json object + * @return true if valid, false if not + */ + static bool is_valid_config(const json& config); +}; + + +#endif //BOT_CONFIG_H