API
API instance is used to make telegram bot api requests.
It is derived from API which guarantees implementation of request and request_raw methods.
telegrinder.API instance is fully typed and implements all the methods provided by telegram bot api.
Initialization:
Using typed methods
All methods are in snake case and return a result of model or APIError.
More about results here.
.request
Makes a request with request_raw, returns result with parsed data (list, dict or boolean) or APIError.
.request_raw
Makes a request to telegram instance serving at .request_url.
Returns result with msgspec.Raw data or APIError.
APIError
telegrinder.APIError contains code and error