This repository contains strict typed wrappers for all [TDLib](https://core.telegram.org/tdlib) (1.4.0) methods and classes.
npm install airgram-apiThis repository contains strict typed wrappers for all TDLib (1.4.0) methods and classes.
- TDLib methods
- TDLib input types
- TDLib output types
Differences from the original API:
- All parameter names are represent in "camelCase".
- Parameter @type renamed to _.
bash
npm
npm install airgram-api
`Basic usage
`typescript
import { apiFactory } from 'airgram-api'function callApi (method, params) {
// some function which sends request to TDLib
return requestToTDLib({
_: method,
...params
})
}
const api = apiFactory(callApi)
// Now you can invoke all TDLib methods
api.getMe().then((response) => {
console.info(response)
})
``The source code is licensed under GPL v3. License is available here.