|
Telegram Bot Api Client
0.6.1
Client_for_accessing_Telegram's_Bot_API
|
Header of a simple web client receiving json uses an underlying implementation of Client interface. It implements a pseudo background behavior by providing a loop() method that can be polled and calls callback on receiving valid data. More...
#include "TBCDebug.h"#include "Arduino.h"#include <Client.h>#include <ArduinoJson.h>Go to the source code of this file.
Classes | |
| class | JsonWebClient |
Macros | |
| #define | JsonWebClient_h |
| #define | JWC_BUFF_SIZE 10000 |
| #define | JWC_CALLBACK_MESSAGE_SIGNATURE void (*callbackSuccess)(void*, JwcProcessError, JsonObject&) |
| #define | JWC_CALLBACK_ERROR_SIGNATURE void (*callbackError)(void*, JwcProcessError, Client*) |
Enumerations | |
| enum | JwcProcessError : int { JwcProcessError::Ok = 0, JwcProcessError::HttpErr = -1, JwcProcessError::MsgTooBig = -2, JwcProcessError::MsgJsonErr = -3 } |
| enum | JwcClientState : int { JwcClientState::Unconnected = 0, JwcClientState::Connected = 1, JwcClientState::Waiting = 2, JwcClientState::Headers = 3, JwcClientState::Json = 4 } |
Header of a simple web client receiving json uses an underlying implementation of Client interface. It implements a pseudo background behavior by providing a loop() method that can be polled and calls callback on receiving valid data.
JSONWebClient (netClient, "www.example.com", 80, CallBackObject, callBackMessage, callBackError);.
JwcClientState state = JwcClientState::Unconnected;.
JwcProcessError state = JwcProcessError::Ok;.
Part of TelegramBotClient (https://github.com/schlingensiepen/TelegramBotClient) Jörn Schlingensiepen joern@schlingensiepen.com
Enumeration to indicate internal process state of JsonWebClient.
This class implements a minimum http client to receive json data from a host. It uses an underlying implementation of Client interface and can be used with raw client or ssl client.
|
strong |
|
strong |
| Enumerator | |
|---|---|
| Ok | Everything Ok, no error |
| HttpErr | Not found HTTP 200 Header –> Server Error |
| MsgTooBig | Message bigger than JWC_BUFF_SIZE adjust JWC_BUFF_SIZE to avoid this, beware ArduinoJSON still needs to fit to your device's memory |
| MsgJsonErr | ArduinoJSON was not able to parse the message |
1.8.14