mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-15 08:56:34 +02:00
[temporary commit]
This commit is contained in:
38
src/AgApiClient.h
Normal file
38
src/AgApiClient.h
Normal file
@ -0,0 +1,38 @@
|
||||
/**
|
||||
* @file AgApiClient.h
|
||||
* @brief HTTP client connect post data to Aigradient cloud.
|
||||
* @version 0.1
|
||||
* @date 2024-Apr-02
|
||||
*
|
||||
* @copyright Copyright (c) 2024
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _AG_API_CLIENT_H_
|
||||
#define _AG_API_CLIENT_H_
|
||||
|
||||
#include "AgConfigure.h"
|
||||
#include <Arduino.h>
|
||||
|
||||
class AgApiClient {
|
||||
private:
|
||||
Stream &debugLog;
|
||||
AgConfigure &config;
|
||||
|
||||
bool getConfigFailed;;
|
||||
bool postToServerFailed;
|
||||
|
||||
void printLog(String log);
|
||||
|
||||
public:
|
||||
AgApiClient(Stream &stream, AgConfigure &config);
|
||||
~AgApiClient();
|
||||
|
||||
void begin(void);
|
||||
bool fetchServerConfiguration(String deviceId);
|
||||
bool postToServer(String deviceId, String data);
|
||||
bool isFetchConfigureFailed(void);
|
||||
bool isPostToServerFailed(void);
|
||||
};
|
||||
|
||||
#endif /** _AG_API_CLIENT_H_ */
|
Reference in New Issue
Block a user