{"id":17102180,"url":"https://github.com/wilk/twitter-relay-telegram","last_synced_at":"2025-06-29T12:33:41.081Z","repository":{"id":140249006,"uuid":"129632481","full_name":"wilk/twitter-relay-telegram","owner":"wilk","description":"A Twitter-to-Telegram relay","archived":false,"fork":false,"pushed_at":"2018-05-30T15:10:59.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T19:23:55.022Z","etag":null,"topics":["elixir","telegram","telegram-bot","tutorial","twitter"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/wilk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-04-15T17:09:34.000Z","updated_at":"2018-05-30T15:11:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"9c7be4e5-fc80-45c9-bcf5-bb74ad459c8a","html_url":"https://github.com/wilk/twitter-relay-telegram","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wilk/twitter-relay-telegram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilk%2Ftwitter-relay-telegram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilk%2Ftwitter-relay-telegram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilk%2Ftwitter-relay-telegram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilk%2Ftwitter-relay-telegram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wilk","download_url":"https://codeload.github.com/wilk/twitter-relay-telegram/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilk%2Ftwitter-relay-telegram/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262594656,"owners_count":23334251,"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","telegram-bot","tutorial","twitter"],"created_at":"2024-10-14T15:28:27.323Z","updated_at":"2025-06-29T12:33:41.056Z","avatar_url":"https://github.com/wilk.png","language":"Elixir","readme":"# Tweetrelay\nThis is an application implemented by myself to learn and understand Elixir.\nIt's meant to be used as a tutorial for beginners.\nFeel free to improve source code and docs.\n\n## Setup\nFirst, rename `.env.default` in `.env`:\n\n```bash\n$ mv .env.default .env\n```\n\nThen, replace the default vars with your credentials (Twitter and Telegram)\n\n## Running\nJust use `docker-compose` to run it:\n\n```bash\n$ docker-compose up\n```\n\n## Tutorial\nFirstly, I've used `mix` to setup the project structure:\n\n```bash\n$ mix new tweetrelay\n```\n\n[mix](https://hexdocs.pm/mix/Mix.html) is the official build tool of Elixir.\nWith `mix new` you're able to create a new Elixir app scaffolder.\n\nThen, I've configured the application using the `config/config.exs` file, that is used from the main application to load specific configurations.\nInside I've used `System.get_env()` function to retrieve the environment variables from the `.env` file:\n\n```elixir\nconfig :extwitter, :oauth, [\n   consumer_key: System.get_env(\"TWITTER_CONSUMER_KEY\"),\n   consumer_secret: System.get_env(\"TWITTER_CONSUMER_SECRET\"),\n   access_token: System.get_env(\"TWITTER_ACCESS_TOKEN\"),\n   access_token_secret: System.get_env(\"TWITTER_ACCESS_SECRET\")\n]\n```\n\nThose configurations are used to configure the [ExTwitter](https://github.com/parroty/extwitter) library, used to search tweets inside Twitter's network.\n\n```elixir\nconfig :nadia, token: System.get_env(\"TELEGRAM_BOT_TOKEN\")\n```\n\nWhile this configuration is used to configure [Nadia](https://github.com/zhyu/nadia), a library for interacting with Telegram's API.\n\n### Adding dependencies\nIt's time to add some dependencies to the project, exactly those expressed above.\nIt can be done by adding the following list to the `deps` method of the `MixProject` located inside `mix.exs` file:\n\n```elixir\n[\n  {:extwitter, \"~\u003e 0.9.2\"},\n  {:nadia, \"~\u003e 0.4.3\"}\n]\n```\n\n`mix` can be used to install the dependencies list:\n\n```bash\n\n$ mix deps.get\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilk%2Ftwitter-relay-telegram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilk%2Ftwitter-relay-telegram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilk%2Ftwitter-relay-telegram/lists"}