{"id":21553134,"url":"https://github.com/airgram/airgram","last_synced_at":"2025-05-16T06:02:42.494Z","repository":{"id":33138933,"uuid":"152963503","full_name":"airgram/airgram","owner":"airgram","description":"Strict typed library to create Telegram apps with Typescript/JavaScript (based on TDLib 1.8)","archived":false,"fork":false,"pushed_at":"2023-03-14T19:13:58.000Z","size":4728,"stargazers_count":575,"open_issues_count":83,"forks_count":49,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-10T06:41:23.425Z","etag":null,"topics":["javascript","tdlib","tdweb","telegram","typescript"],"latest_commit_sha":null,"homepage":"https://airgram.netlify.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/airgram.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-14T10:40:49.000Z","updated_at":"2025-05-07T16:13:17.000Z","dependencies_parsed_at":"2024-06-18T15:46:20.046Z","dependency_job_id":null,"html_url":"https://github.com/airgram/airgram","commit_stats":{"total_commits":290,"total_committers":9,"mean_commits":32.22222222222222,"dds":0.09999999999999998,"last_synced_commit":"1309e4a748d802a06637a5cfbf898d5c3c29c25f"},"previous_names":[],"tags_count":170,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airgram%2Fairgram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airgram%2Fairgram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airgram%2Fairgram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airgram%2Fairgram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/airgram","download_url":"https://codeload.github.com/airgram/airgram/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254478160,"owners_count":22077675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","tdlib","tdweb","telegram","typescript"],"created_at":"2024-11-24T07:09:37.604Z","updated_at":"2025-05-16T06:02:42.443Z","avatar_url":"https://github.com/airgram.png","language":"TypeScript","readme":"# Airgram\n\nThis is a wrapper for [Telegram Database library](https://github.com/tdlib/td) written in TypeScript.\n\n![Airgram](readme-banner.svg)\n\n\n- **Code style.** TDLib follows a different coding convention than best practices in TypeScript or JavaScript. Airgram fixes it.\n- **Methods.** Each API method has convenient wrapper with description and JSDoc documentation.\n- **Type checking.** Airgram is a true TypeScript library. Everything has strict typings, so take full advantage of type checking and code completion. \n- **Flexibility.** Airgram relies on middleware. This gives a high degree of freedom. You can modify requests, save responses, perform any actions in the data flow. \n- **Data models.** You can extend standard TDLib objects and add some computed properties or whatever you want. \n- **Use everywhere.** Airgram is an environment agnostic library. It will work in the browser as well as in Node.js. You can write Telegram client or use it for a Telegram bot backend. \n\n___\n\n[![NPM Version](https://img.shields.io/npm/v/airgram.svg?style=flat-square)](https://www.npmjs.com/package/airgram)\n[![TDLib](https://img.shields.io/badge/tdlib-v1.8.0-%2335ADE1)](https://github.com/tdlib/td)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](http://standardjs.com/)\n[![NPM](https://img.shields.io/npm/l/airgram)](https://github.com/airgram/airgram/blob/master/LICENSE)\n\u003c!-- [![node](https://img.shields.io/node/v/airgram.svg?style=flat-square)](https://www.npmjs.com/package/airgram) --\u003e\n\n## Installation\n**Node.js**\n1. Build TDLib library according the [instruction](https://github.com/tdlib/td#building).\n2. Install [node-gyp](https://github.com/nodejs/node-gyp#installation)\n3. Install Airgram:\n```bash\n# TDLib 1.8.0:\nnpm install airgram\n\n# TDLib 1.7.2:\nnpm install airgram@tdlib-1.7.2\n```\n**Web**\n```bash\n# TDLib 1.8.0:\nnpm install @airgram/web\n\n# TDLib 1.7.2:\nnpm install @airgram/web@tdlib-1.7.2\n```\n\nCheck out [webpack config](https://github.com/airgram/airgram/tree/master/examples/webpack-config) example.\n\n## Getting started\n```typescript\nimport { Airgram, Auth, prompt, toObject } from 'airgram'\n\nconst airgram = new Airgram({\n  apiId: process.env.APP_ID,\n  apiHash: process.env.APP_HASH\n})\n\nairgram.use(new Auth({\n  code: () =\u003e prompt(`Please enter the secret code:\\n`),\n  phoneNumber: () =\u003e prompt(`Please enter your phone number:\\n`)\n}))\n\nvoid (async () =\u003e {\n  const me = toObject(await airgram.api.getMe())\n  console.log(`[me]`, me)\n})\n\n// Getting all updates\nairgram.use((ctx, next) =\u003e {\n  if ('update' in ctx) {\n    console.log(`[all updates][${ctx._}]`, JSON.stringify(ctx.update))\n  }\n  return next()\n})\n\n// Getting new messages\nairgram.on('updateNewMessage', async ({ update }, next) =\u003e {\n  const { message } = update\n  console.log('[new message]', message)\n  return next()\n})\n```\n\n## Documentation\nGuides and API-reference are available [here](https://airgram.netlify.app).\n\n## Old version\nIf you are interested in `v1.*`, follow to corresponding [branch](https://github.com/airgram/airgram/tree/v1).\n\n## License\n\nThe source code is licensed under GPL v3. License is available [here](/LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fairgram%2Fairgram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fairgram%2Fairgram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fairgram%2Fairgram/lists"}