@airgram/api
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

Wrappers for TDLib API

This repository contains strict typed wrappers for all TDLib (1.4.0) methods and classes.

Differences from the original API:

  • All parameter names are represent in "camelCase".
  • Parameter @type renamed to _.

Installation

# npm
npm install airgram-api

Basic usage

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)
})

License

The source code is licensed under GPL v3. License is available here.

Package Sidebar

Install

npm i @airgram/api

Homepage

airgram.io

Weekly Downloads

5

Version

1.2.0

License

GPL-3.0

Unpacked Size

1.79 MB

Total Files

1837

Last publish

Collaborators

  • esindger