{"id":16517581,"url":"https://github.com/thiamsantos/telegramex","last_synced_at":"2025-04-04T19:17:58.922Z","repository":{"id":57555896,"uuid":"338921003","full_name":"thiamsantos/telegramex","owner":"thiamsantos","description":"Telegram's Bot API ","archived":false,"fork":false,"pushed_at":"2021-02-17T14:49:08.000Z","size":35,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-10T09:18:00.796Z","etag":null,"topics":["elixir","telegram-bot"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/telegramex","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thiamsantos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-14T23:06:47.000Z","updated_at":"2023-03-08T03:32:25.000Z","dependencies_parsed_at":"2022-09-14T11:00:51.876Z","dependency_job_id":null,"html_url":"https://github.com/thiamsantos/telegramex","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiamsantos%2Ftelegramex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiamsantos%2Ftelegramex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiamsantos%2Ftelegramex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiamsantos%2Ftelegramex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thiamsantos","download_url":"https://codeload.github.com/thiamsantos/telegramex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234944,"owners_count":20905855,"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":["elixir","telegram-bot"],"created_at":"2024-10-11T16:32:37.339Z","updated_at":"2025-04-04T19:17:58.898Z","avatar_url":"https://github.com/thiamsantos.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telegramex\n\n\u003c!-- MDOC !--\u003e\n\nTelegram's Bot API wrapper.\n\n[![Hex.pm Version](http://img.shields.io/hexpm/v/telegramex.svg?style=flat)](https://hex.pm/packages/telegramex)\n[![CI](https://github.com/thiamsantos/telegramex/workflows/CI/badge.svg?branch=main)](https://github.com/thiamsantos/telegramex/actions?query=branch%3Amain)\n[![Coverage Status](https://coveralls.io/repos/github/thiamsantos/telegramex/badge.svg?branch=main)](https://coveralls.io/github/thiamsantos/telegramex?branch=main)\n\n## Features\n\n- Support for multiple bots\n- Configurable HTTP client\n- No application configuration\n\n## Usage\n\n1. Add the dependencies\n\n```elixir\ndef deps do\n  [\n    {:finch, \"~\u003e 0.5\"},\n    {:telegramex, \"~\u003e 0.1.1\"}\n  ]\nend\n```\n2. Add the [finch](https://github.com/keathley/finch) client to your supervision tree\n\n```elixir\nchildren = [\n  {Finch, name: Telegramex.HTTPClient}\n]\n```\n\n**Note**: Checkout the `Telegramex.Client` on how to use other HTTP client.\n\n3. Make a request\n\n```elixir\nclient = %Telegramex.Client{token: \"123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11\"}\nTelegramex.get_updates(client)\n```\n\nFull documentation can be found at [https://hexdocs.pm/telegramex](https://hexdocs.pm/telegramex).\n\n## Telemetry\n\nTelegramex executes the following events:\n\n  * `[:telegramex, :call, :start]` - Executed before calling the Telegram Bot API.\n\n    #### Measurements\n    * `:system_time` - The system time\n\n    #### Metadata:\n    * `:method` - The Telegram Bot API method call\n    * `:body` - The body of the API call\n\n  * `[:telegramex, :call, :stop]` - Executed after a API call.\n\n    #### Measurements\n    * `:duration` - Duration of the API call.\n\n    #### Metadata\n    * `:method` - The Telegram Bot API method call\n    * `:body` - The body of the API call\n    * `:response` - (optional) In case of success (status 200), the response of the api as returned by the HTTP client.\n    * `:error` - (optional) In case of a error, returns the error.\n\n  * `[:telegramex, :call, :exception]` - Executed if the API call raises an exception.\n\n    #### Measurements\n    * `:duration` - The time it took before raising an exception\n\n    #### Metadata\n    * `:method` - The Telegram Bot API method call\n    * `:body` - The body of the API call\n    * `:kind` - The type of exception.\n    * `:error` - Error description or error data.\n    * `:stacktrace` - The stacktrace\n\n## Changelog\n\nSee the [changelog](CHANGELOG.md).\n\n\u003c!-- MDOC !--\u003e\n\n## Contributing\n\nSee the [contributing file](CONTRIBUTING.md).\n\n## License\n\n[Apache License, Version 2.0](LICENSE) © [Thiago Santos](https://github.com/thiamsantos)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiamsantos%2Ftelegramex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthiamsantos%2Ftelegramex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiamsantos%2Ftelegramex/lists"}