feat(iot): constructeur API

This commit is contained in:
Clement 2023-03-28 16:05:36 +02:00
parent e8ebe48128
commit 98e0342fe1
2 changed files with 20 additions and 3 deletions

View File

@ -6,8 +6,21 @@
class API { class API {
public: public:
API();
API(String user, String password, String host, bool https = true);
bool sendValute(String val, String poubelleID);
JSONVar* connect(); JSONVar* connect();
private:
String user;
String password;
String serveurHost;
bool https;
String token;
}; };

View File

@ -1,8 +1,12 @@
#include "../include/API.h" #include "../include/API.h"
API::API(){ API::API(String user, String password, String host, bool https = true){
//TODO: implement API constructor this->user = user;
this->password = password;
this->serveurHost = host;
this->https = https;
this->token = "";
} }
JSONVar* API::connect(){ JSONVar* API::connect(){