add test call
This commit is contained in:
37
lib/DiscordAPI/include/DiscordAPI.h
Normal file
37
lib/DiscordAPI/include/DiscordAPI.h
Normal file
@ -0,0 +1,37 @@
|
||||
#ifndef DISCORD_API_H
|
||||
#define DISCORD_API_H
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <ESP8266HTTPClient.h>
|
||||
#include <WiFiClient.h>
|
||||
#include <WiFiClientSecureBearSSL.h>
|
||||
|
||||
class DiscordAPI{
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a new Discord API object
|
||||
* @param hookUrl url of the discord webhook
|
||||
*/
|
||||
DiscordAPI(String hookUrl);
|
||||
|
||||
bool sendMessage(String message);
|
||||
private:
|
||||
|
||||
/**
|
||||
* @brief webhook URL
|
||||
*/
|
||||
String hookUrl;
|
||||
|
||||
/**
|
||||
* @brief http client
|
||||
*
|
||||
*/
|
||||
HTTPClient* httpClient;
|
||||
|
||||
//WiFiClient* wifiClient;
|
||||
|
||||
BearSSL::WiFiClientSecure* wifiClient;
|
||||
};
|
||||
|
||||
|
||||
#endif //DISCORD_API_H
|
Reference in New Issue
Block a user