{"id":16944974,"url":"https://github.com/mattetti/twitter_game_bot","last_synced_at":"2026-08-15T17:31:27.160Z","repository":{"id":66365943,"uuid":"485865","full_name":"mattetti/twitter_game_bot","owner":"mattetti","description":"A twitter bot","archived":false,"fork":false,"pushed_at":"2010-01-24T03:20:50.000Z","size":80,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-11T17:48:11.165Z","etag":null,"topics":[],"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/mattetti.png","metadata":{"files":{"readme":"README.rdoc","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":"2010-01-24T03:06:11.000Z","updated_at":"2016-08-10T21:48:29.000Z","dependencies_parsed_at":"2023-02-20T02:45:18.437Z","dependency_job_id":null,"html_url":"https://github.com/mattetti/twitter_game_bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mattetti/twitter_game_bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattetti%2Ftwitter_game_bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattetti%2Ftwitter_game_bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattetti%2Ftwitter_game_bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattetti%2Ftwitter_game_bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattetti","download_url":"https://codeload.github.com/mattetti/twitter_game_bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattetti%2Ftwitter_game_bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36694190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-08-06T04:43:03.162Z","status":"online","status_checked_at":"2026-08-15T02:00:05.847Z","response_time":94,"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":[],"created_at":"2024-10-13T21:19:32.159Z","updated_at":"2026-08-15T17:31:27.145Z","avatar_url":"https://github.com/mattetti.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Twitter Game Bot\n\nJust a simple bot skeleton which can be used by game developers to post content to twitter on a regular basis.\n\n\nImplementation example:\n\n    require 'twitter_game_bot'\n    require 'CGI'\n\n    class MyGame \u003c SCEA::TweetBot\n  \n      trigger_hourly        :tweet_top_player_changes\n      trigger_daily         :tweet_top_5, \"14:00 - PST\"\n      trigger_weekly        :tweet_weekly_stats, \"Monday - 15:00 - PST\"\n  \n      twitter_credentials   :login =\u003e 'mnr', :password =\u003e 'sekrit'\n      game_api_credentials  :login =\u003e 'mnr', :password =\u003e 'sekrit'\n      game_api_url          'http://mnr.com/beatit/'\n  \n      def tweet_top_player_changes\n        last_top_5 = load_data[:last_top_5]\n        top_5      = game_api.top_5.to_hash # expected -\u003e {1 =\u003e 'James', 2 =\u003e 'Peter', 3 =\u003e 'Louisa'}\n        save_data(:last_top_5, top_5)\n        diff       = top_5.diff(last_top_5)\n        diff.each do |position, name|\n          tweet \"#{CGI.escape(name)} is now #{position.ordinalize}\"\n        end\n      end\n  \n      def tweet_top_5\n        # let's convert {2 =\u003e 'Peter', 1 =\u003e 'James', 3 =\u003e 'Louisa'} to\n        #               [[1,'James'], [2,'Peter'], [3,'Louisa']]\n        sorted_top_5 = game_api.top_5.sort\n        msg = sorted_top_5.map do |position, name|\n          \"#{position.ordinalize}: #{CGI.escape(name)}\"\n        end.join(' ')\n        tweet msg\n      end\n  \n      def tweet_weekly_stats\n        # TODO\n      end\n  \n    end\n\n\n\n\n== Note on Patches/Pull Requests\n \n* Fork the project.\n* Make your feature addition or bug fix.\n* Add tests for it. This is important so I don't break it in a\n  future version unintentionally.\n* Commit, do not mess with rakefile, version, or history.\n  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)\n* Send me a pull request. Bonus points for topic branches.\n\n== Copyright\n\nCopyright (c) 2010 Matt Aimonetti. See LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattetti%2Ftwitter_game_bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattetti%2Ftwitter_game_bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattetti%2Ftwitter_game_bot/lists"}