{"id":15912851,"url":"https://github.com/abeidahmed/microverse-twitterati","last_synced_at":"2025-04-03T03:15:44.253Z","repository":{"id":55039024,"uuid":"328871036","full_name":"abeidahmed/microverse-twitterati","owner":"abeidahmed","description":"Retweeting tweets that are tagged with #microverse. Spread the word.","archived":false,"fork":false,"pushed_at":"2021-01-13T18:37:05.000Z","size":109,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"development","last_synced_at":"2025-02-08T17:13:57.791Z","etag":null,"topics":["microverse-projects","ruby","twitter-bot"],"latest_commit_sha":null,"homepage":"https://twitter.com/MicroverseB","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/abeidahmed.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":"2021-01-12T04:25:13.000Z","updated_at":"2021-01-13T18:36:41.000Z","dependencies_parsed_at":"2022-08-14T09:50:33.160Z","dependency_job_id":null,"html_url":"https://github.com/abeidahmed/microverse-twitterati","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/abeidahmed%2Fmicroverse-twitterati","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeidahmed%2Fmicroverse-twitterati/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeidahmed%2Fmicroverse-twitterati/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abeidahmed%2Fmicroverse-twitterati/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abeidahmed","download_url":"https://codeload.github.com/abeidahmed/microverse-twitterati/tar.gz/refs/heads/development","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246927843,"owners_count":20856198,"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":["microverse-projects","ruby","twitter-bot"],"created_at":"2024-10-06T16:21:29.918Z","updated_at":"2025-04-03T03:15:44.222Z","avatar_url":"https://github.com/abeidahmed.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Microverse Twitterati\n\n\u003e Retweeting tweets that are tagged with #microverse.\n\n## Video link\n[Loom video](https://www.loom.com/share/c5abb51d0fba4ee6a38114c3751dca23)\n\n## Description\nThis project was done as a part of the `ruby` capstone\nproject. It is a command line bot that when run, iterates through the\ntweets that are hash tagged with `#microverse` and retweets them in\norder. The bot can be found at [twitter](https://twitter.com/MicroverseB).\nPlease follow the bot if possible. Cheers!\n\n## Built with\n![Ruby](https://img.shields.io/badge/ruby-%23CC342D.svg?\u0026style=for-the-badge\u0026logo=ruby\u0026logoColor=white)\n\n## Features\n### Optimizations\n- Since the twitter api does rate limiting, I had to be cautious when\nrequesting for the tweets. It seems that, when I request for more than\n100 tweets at once, the api crashes. So a rate limiting of 50 is done in\nthis project, which I believe is pretty reasonable.\n\n### Blocking users\n- I wanted an app which is usable in real world scenarios, and wanted to\n  build it not just for the sake of completing the project. So here we\ngo. Blocking users is possible.\n- If the user is blocked, their tweets won't get retweeted. As simple as\n  that. Unblocking the user will retweet their tweet, but will avoid\nretweeting the previous tweets since the user was blocked.\n- This feature had to be optimized because of twitter's rate limiting. For\n  example, if the block list is 5000, we cannot request the `api` 5000\ntimes, everytime we try to run the app. So I had to store the blocked\nusers in a `yml` file and check if the user is blocked or not from the file\nitself. By making this optimization, the bot ran within 3 seconds.\n\n### Retweets\n- Tweets that are tagged with `#microverse` are retweeted.\n- Tweets are only fetched from the last retweeted tweet to optimize\n  performance.\n\n## Usage\n- Clone the repo `https://github.com/abeidahmed/microverse-twitterati.git`\n- `cd` into the directory\n- Run `git checkout -b feature-retweet`\n- Run `git pull origin feature-retweet`\n- Run `bundle install`\n- Make sure you get your `.env` files configured. The app will not work\n  without it.\n```json\nTWITTER_API_KEY=your_api_key\nTWITTER_SECRET_KEY=your_secret_key\nTWITTER_BEARER_TOKEN=your_bearer_token\nTWITTER_ACCESS_TOKEN=your_access_token\nTWITTER_TOKEN_SECRET=your_token_secret\n```\nThe keys can be found [here](https://developer.twitter.com)\n\nAfter cloning the repo and setting up, please go to your twitter account\nand tweet anything that you'd like, but please make sure to hashtag the\ntweet with `#microverse`.\nThen you can run the bot using the step:\n- Run `bin/main.rb` or run `rake bot`\nAfter that check out the tweets retweets section, it will automatically\nbe retweeted.\n\n\n## Test\n- Run `bundle exec guard` to run the test automatically when the file\n  changes or run `bundle exec rspec` to run all the tests.\n\n## Author\n👤 **abeidahmed**\n\n- GitHub: [@abeidahmed](https://github.com/abeidahmed)\n- Twitter: [@iamhawaabi](https://twitter.com/iamhawaabi)\n- LinkedIn: [Abeid Ahmed](https://www.linkedin.com/in/abeid-ahmed-b21882172/)\n\n## Contributing\nContributions are welcome, and any new features should be built in a\nseparate branch.\n\n## Acknowledgements\nTo all the awesome `ruby` gems out there that have made our lives\neasier.\n\n## License\nCopyright 2021 Abeid Ahmed. Licensed under [MIT](https://opensource.org/licenses/MIT)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabeidahmed%2Fmicroverse-twitterati","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabeidahmed%2Fmicroverse-twitterati","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabeidahmed%2Fmicroverse-twitterati/lists"}