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 {
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;
};

View File

@ -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(){