Changed apihelper#convert_markup
Constructed the Jsonable abstract class. All subclasses must override Jsonable#to_json.
Made ReplyKeyboardHide, ReplyKeyboardMarkup and ForceReply a subclass of Jsonable to make things less complicated in convert_markup.
Changed apihelper#convert_markup
Constructed the Jsonable abstract class. All subclasses must override Jsonable#to_json.
Made ReplyKeyboardHide, ReplyKeyboardMarkup and ForceReply a subclass of Jsonable to make things less complicated in convert_markup.
Implemented the offset parameter for the getUpdates API call according to https://core.telegram.org/bots/api#getupdates
In short: the offset is calculated by adding 1 to the id of the last received Update.
Caching messages in a list is now redundant, so the cache is removed. Only the id of the last received Update is kept for future getUpdates calls.
- TeleBot#get_update now makes use of this argument, which improves the efficiency of the method.
- Removed useless req.status_code statement in apihelper.py#send_data