feat(IOT): LibAPI #21
@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -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(){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user