Telegram Bot Api Client  0.6.1
Client_for_accessing_Telegram's_Bot_API
Classes | Macros | Enumerations
TelegramBotClient.h File Reference

Header of a simple client sending and receiving message via Telegram's Bot API. Uses one or two underlying objects implementing the 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>
#include "JsonWebClient.h"

Go to the source code of this file.

Classes

struct  Message
 
struct  TBCKeyBoardRow
 
class  TBCKeyBoard
 
class  TelegramBotClient
 

Macros

#define TelegramBotClient_h
 
#define TELEGRAMHOST   F("api.telegram.org")
 
#define TELEGRAMPORT   443
 
#define POLLINGTIMEOUT   600
 
#define USERAGENTSTRING   F("telegrambotclient /0.1")
 
#define TBC_CALLBACK_RECEIVE_SIGNATURE   void (*callbackReceive)(TelegramProcessError, JwcProcessError, Message*)
 
#define TBC_CALLBACK_ERROR_SIGNATURE   void (*callbackError)(TelegramProcessError, JwcProcessError)
 

Enumerations

enum  TelegramProcessError : int {
  TelegramProcessError::Ok = 0, TelegramProcessError::JcwPollErr = -1, TelegramProcessError::JcwPostErr = -2, TelegramProcessError::RetPollErr = -3,
  TelegramProcessError::RetPostErr = -4
}
 

Detailed Description

Header of a simple client sending and receiving message via Telegram's Bot API. Uses one or two underlying objects implementing the Client interface. It implements a pseudo background behavior by providing a loop() method that can be polled and calls callback on receiving valid data.

Telegram Bot Client.

Class to represent a keyboard used in Telegram chat.

Row in a keyboard.

Telegram Message.

TelegramProcessError state = TelegramProcessError::Ok;.

Part of TelegramBotClient (https://github.com/schlingensiepen/TelegramBotClient) Jörn Schlingensiepen joern.nosp@m.@sch.nosp@m.linge.nosp@m.nsie.nosp@m.pen.c.nosp@m.om

Enumeration to indicate error or success of processing by TelegramBotClient.

Note
Should only be used as a part of TelegramBotClient (https://github.com/schlingensiepen/TelegramBotClient)
Author
Jörn Schlingensiepen joern.nosp@m.@sch.nosp@m.linge.nosp@m.nsie.nosp@m.pen.c.nosp@m.om

Struct to store elements of a Telegram Message (https://core.telegram.org/bots/api#message) and the update_id provided by each callback (https://core.telegram.org/bots/api#getting-updates)

Note
Should only be used as a part of TelegramBotClient (https://github.com/schlingensiepen/TelegramBotClient)
Author
Jörn Schlingensiepen joern.nosp@m.@sch.nosp@m.linge.nosp@m.nsie.nosp@m.pen.c.nosp@m.om

Struct to store elements of a Telegram key board

Note
Should only be used as a part of TelegramBotClient (https://github.com/schlingensiepen/TelegramBotClient)
Author
Jörn Schlingensiepen joern.nosp@m.@sch.nosp@m.linge.nosp@m.nsie.nosp@m.pen.c.nosp@m.om

This class represents a keyboard that can be displayed in a Telegram chat. Keyboards can be assembled by Rows including buttons. To add a row to a keyboard use push().

Note
Should only be used as a part of TelegramBotClient (https://github.com/schlingensiepen/TelegramBotClient)
Author
Jörn Schlingensiepen joern.nosp@m.@sch.nosp@m.linge.nosp@m.nsie.nosp@m.pen.c.nosp@m.om

Client to access Telegram's Bot API

Note
Should only be used as a part of TelegramBotClient (https://github.com/schlingensiepen/TelegramBotClient)
Author
Jörn Schlingensiepen joern.nosp@m.@sch.nosp@m.linge.nosp@m.nsie.nosp@m.pen.c.nosp@m.om

Enumeration Type Documentation

◆ TelegramProcessError

enum TelegramProcessError : int
strong
Enumerator
Ok 

Everything Ok, no error

JcwPollErr 

JSONWebClient host returns error while polling

JcwPostErr 

JSONWebClient host returns error while posting

RetPollErr 

Telegram host returns error while polling

RetPostErr 

Telegram host returns error while posting