{"_id":"57e0ed2e2d9d3b1900b5a3e8","category":{"_id":"57e0db616a1c2e0e0081fe64","__v":0,"project":"5703d527bb69fc1700553ce0","version":"5703d527bb69fc1700553ce3","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-09-20T06:46:57.444Z","from_sync":false,"order":2,"slug":"tl-module","title":"TL module"},"__v":0,"parentDoc":null,"user":"5631f962c3b04b0d00ba9bf1","project":"5703d527bb69fc1700553ce0","version":{"_id":"5703d527bb69fc1700553ce3","hasDoc":true,"__v":6,"hasReference":true,"project":"5703d527bb69fc1700553ce0","createdAt":"2016-04-05T15:09:27.620Z","releaseDate":"2016-04-05T15:09:27.620Z","categories":["5703d527bb69fc1700553ce4","5703d8b7aceacc17003ef303","5703e60b6116142000db25f6","57e0db616a1c2e0e0081fe64","57e0f141ff540c22007b45fa","57e0f14b8929550e00f1d9bc"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"0.0.6","version":"0.0.6"},"githubsync":"","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-09-20T08:02:54.334Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"For convenience, the tl-builder module also builds a `TelegramApi` interface, with 1 method for each method described in the schema.\n\n### TelegramApiWrapper\nHaving 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:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"public abstract <T extends TLObject> T executeRpcQuery(TLMethod<T> method) throws RpcErrorException, IOException;\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"telegramapi-interface","type":"basic","title":"TelegramApi interface"}

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: [block:code] { "codes": [ { "code": "public abstract <T extends TLObject> T executeRpcQuery(TLMethod<T> method) throws RpcErrorException, IOException;", "language": "java" } ] } [/block]