{"id":13461898,"url":"https://github.com/4ndv/rubogram","last_synced_at":"2026-06-09T06:31:48.266Z","repository":{"id":56893195,"uuid":"77769716","full_name":"4ndv/rubogram","owner":"4ndv","description":"Rubogram is a small Faraday-based library to communicate with Telegram Bot API","archived":false,"fork":false,"pushed_at":"2019-04-22T06:51:08.000Z","size":17,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-04T19:51:09.783Z","etag":null,"topics":["bot","faraday","telegram","telegram-bot-api"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/4ndv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-01T07:22:24.000Z","updated_at":"2019-04-22T06:42:52.000Z","dependencies_parsed_at":"2022-08-20T16:10:38.146Z","dependency_job_id":null,"html_url":"https://github.com/4ndv/rubogram","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/4ndv/rubogram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4ndv%2Frubogram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4ndv%2Frubogram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4ndv%2Frubogram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4ndv%2Frubogram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/4ndv","download_url":"https://codeload.github.com/4ndv/rubogram/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4ndv%2Frubogram/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34095243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bot","faraday","telegram","telegram-bot-api"],"created_at":"2024-07-31T12:00:26.916Z","updated_at":"2026-06-09T06:31:48.245Z","avatar_url":"https://github.com/4ndv.png","language":"Ruby","funding_links":[],"categories":["Libraries"],"sub_categories":["Ruby"],"readme":"# Rubogram\n\n[![Build Status](https://travis-ci.org/4ndv/rubogram.svg?branch=master)](https://travis-ci.org/4ndv/rubogram)\n[![Coverage Status](https://coveralls.io/repos/github/4ndv/rubogram/badge.svg?branch=master)](https://coveralls.io/github/4ndv/rubogram?branch=master)\n\nRubogram is a small Faraday-based library to communicate with Telegram Bot API\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'rubogram'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install rubogram\n\n## Usage\n\nAt first, require rubogram in your application like this:\n\n```ruby\nrequire 'rubogram'\n```\n\nCreate client with your token (you can obtain one [here](https://telegram.me/BotFather)):\n\n```ruby\nclient = Rubogram::Client.new 'TOKENHERE'\n```\n\nAnd then make your requests like this:\n\n```ruby\nresp = client.send_message chat_id: '123', text: 'hello, machine world!'\n```\n\nSo, as you can see `sendMessage` became `send_message` because of ruby guidelines(tm). But you can also use it like `client.sendMessage`, just like in the telegram docs.\n\nAlso you can use `call` method:\n\n```ruby\nresp = client.call 'sendMessage', chat_id: '123', text: 'Hello!'\n```\n\nYou can see parsed response of all requests like this. Resp contains full Faraday response:\n\n```ruby\nresp.body\n```\n\nNote that in case of errors, exception will be raised, so don't forget to handle it\n\n## Options\n\nRubogram Client has some options you can set, here's full list:\n\n```ruby\nclient = Rubogram::Client.new 'TOKENHERE', adapter: Faraday.default_adapter, logging: true, raise_errors: true\n```\n\nWhere:\n\n`adapter` - faraday adapter, look into faraday docs for more of them\n\n`logging` - true/false, enables/disables logging\n\n`raise_errors` - true/false, enables/disables error raising. If you disable this, you can check successfullness of request by verifying `ok` field in the parsed body\n\n## TODO\n\n* Write specs\n* Write examples\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies.\nTo run tests you must specify two environment variables: `TOKEN` with your bot token and `CHATID` with YOUR id.\nThen, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/4ndv/rubogram. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4ndv%2Frubogram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F4ndv%2Frubogram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4ndv%2Frubogram/lists"}