#ifndef API_WEBAPI_H #define API_WEBAPI_H #include #include #include #include namespace DataStorage { class DataStorageClient; } // namespace DataStorage namespace DataStorageInterface { namespace DataInterface { class GraphClient; } // namespace DataInterface namespace API { class WebAPI { public: WebAPI(); ~WebAPI(); static std::string ProcessQuery(DataStorage::DataStorageClient* pDataStorageClient, DataInterface::GraphClient* pGraphClient, const std::string& uri, const std::vector& postData); private: static std::string ProcessLogQuery(DataStorage::DataStorageClient* pDataStorageClient, const std::string& uri); static std::string ProcessGraphHeaderQuery(DataInterface::GraphClient* pGraphClient, const std::string& uri); static std::string ProcessGraphQuery(DataInterface::GraphClient* pGraphClient, const std::string& uri); static std::string ProcessSettingsQuery(const std::string& uri); static nlohmann::json GetGraphHeader(DataInterface::GraphClient* pGraphClient, const std::vector& dataIds, const std::string& timespan); static nlohmann::json GetGraphData(DataInterface::GraphClient* pGraphClient, int deviceId, const std::vector& dataIds, const std::string& timespan); }; } // namespace API } // namespace DataStorageInterface #endif // UTIL_API_WEBAPI_H