TelegramApi interface

For convenience, the tl-builder module also builds a TelegramApi interface, with 1 method for each method described in the schema.

TelegramApiWrapper

Having to implement each method (a lot) can be really tedious, especially when you'll probably have one common entry point (since in the end, your method will be serialized as a bytes and send on the network after extra-processing). So to help us with that, the class TelegramApiWrapper implements all the methods and delegate the implementation to an extra method:

public abstract <T extends TLObject> T executeRpcQuery(TLMethod<T> method) throws RpcErrorException, IOException;

Did this page help you?