Reintroduce 'ROOTAPI' so domain and protocol can be configured

eg. setter for api root added as comment in examples/BASIC/BASIC.ino
This commit is contained in:
John
2024-07-21 19:38:50 +12:00
parent a9d9c60dfa
commit 7b9dac756b
3 changed files with 15 additions and 6 deletions

View File

@ -20,6 +20,7 @@ class AgApiClient : public PrintLog {
private:
Configuration &config;
AirGradient *ag;
String apiRoot = "http://hw.airgradient.com";
bool getConfigFailed;
bool postToServerFailed;
@ -37,6 +38,8 @@ public:
bool isNotAvailableOnDashboard(void);
void setAirGradient(AirGradient *ag);
bool sendPing(int rssi, int bootCount);
String getApiRoot() const;
void setApiRoot(const String &apiRoot);
};
#endif /** _AG_API_CLIENT_H_ */