{"id":22963222,"url":"https://github.com/ifokeev/telegraph_api_ruby","last_synced_at":"2025-08-13T07:34:34.183Z","repository":{"id":56896942,"uuid":"148061952","full_name":"ifokeev/telegraph_api_ruby","owner":"ifokeev","description":"A fully working telegra.ph/api ruby http client with DOM to node support and tests","archived":false,"fork":false,"pushed_at":"2018-09-09T21:10:10.000Z","size":9,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-27T17:40:06.244Z","etag":null,"topics":["telegram","telegraph","telegraph-api"],"latest_commit_sha":null,"homepage":"","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/ifokeev.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}},"created_at":"2018-09-09T20:11:39.000Z","updated_at":"2024-02-02T15:18:51.000Z","dependencies_parsed_at":"2022-08-21T02:20:22.088Z","dependency_job_id":null,"html_url":"https://github.com/ifokeev/telegraph_api_ruby","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifokeev%2Ftelegraph_api_ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifokeev%2Ftelegraph_api_ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifokeev%2Ftelegraph_api_ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifokeev%2Ftelegraph_api_ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ifokeev","download_url":"https://codeload.github.com/ifokeev/telegraph_api_ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229747381,"owners_count":18118046,"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":["telegram","telegraph","telegraph-api"],"created_at":"2024-12-14T19:33:16.083Z","updated_at":"2024-12-14T19:33:16.736Z","avatar_url":"https://github.com/ifokeev.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# telegraph_api_ruby\n\nA Ruby interface to [Telegra.ph API](http://telegra.ph/api).\n\n## Installation\n\nAdd following line to your Gemfile:\n\n```ruby\ngem 'telegraph_api_ruby'\n```\n\nAnd then execute:\n\n```shell\n$ bundle\n```\n\nOr install it system-wide:\n\n```shell\n$ gem install telegraph_api_ruby\n```\n\n## Usage\n\n```ruby\nrequire 'telegraph_api_ruby'\n\ntelegraph_access_token = 'YOUR_ACCESS_TOKEN'\n\nhtml = %(\n  \u003cb\u003eHello World\u003c/b\u003e\n)\n\ncontent = TelegraphApi::DomToNode.call(html)\n\ndata = {\n  access_token: telegraph_access_token,\n  title: 'Test page',\n  content: JSON.dump(content),\n  return_content: true\n}\n\nresult = TelegraphApi::Client.create_page(data)\nresult.url\n```\n\nSee [tests](https://github.com/ifokeev/telegraph_api_ruby/blob/master/test/test_telegraph_api.rb) also.\n\n## Methods\n\nSee [Available methods](https://github.com/ifokeev/telegraph_api_ruby/blob/master/lib/telegraph_api_ruby/client.rb#L9-L19) and [Types](https://github.com/ifokeev/telegraph_api_ruby/tree/master/lib/telegraph_api_ruby/types).\n\nYou are able to call any method described on telegra.ph/api page right forward: \n\n```\nTelegraphApi::Client.getAccountInfo(access_token: 'TOKEN')\n\n```\n\nBecause this gem uses [method_missing](https://ruby-doc.org/core-2.1.0/BasicObject.html#method-i-method_missing\u003cPaste\u003e) for unlisted in \n[Available methods](https://github.com/ifokeev/telegraph_api_ruby/blob/master/lib/telegraph_api_ruby/client.rb#L9-L19) list.\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (git checkout -b feature/my-new-feature)\n3. Commit your changes (git commit -am 'Add some feature')\n4. Push to the branch (git push origin feature/my-new-feature)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fifokeev%2Ftelegraph_api_ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fifokeev%2Ftelegraph_api_ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fifokeev%2Ftelegraph_api_ruby/lists"}