diff --git a/IOT/lib/API/include/API.h b/IOT/lib/API/include/API.h index 29b15c6..d2823f1 100644 --- a/IOT/lib/API/include/API.h +++ b/IOT/lib/API/include/API.h @@ -6,8 +6,21 @@ class API { public: - API(); + + + API(String user, String password, String host, bool https = true); + + bool sendValute(String val, String poubelleID); + JSONVar* connect(); + +private: + + String user; + String password; + String serveurHost; + bool https; + String token; }; diff --git a/IOT/lib/API/src/API.cpp b/IOT/lib/API/src/API.cpp index f921507..7cefa69 100644 --- a/IOT/lib/API/src/API.cpp +++ b/IOT/lib/API/src/API.cpp @@ -1,8 +1,12 @@ #include "../include/API.h" -API::API(){ - //TODO: implement API constructor +API::API(String user, String password, String host, bool https = true){ + this->user = user; + this->password = password; + this->serveurHost = host; + this->https = https; + this->token = ""; } JSONVar* API::connect(){