{"id":17992895,"url":"https://github.com/leostera/switchboard.rb","last_synced_at":"2025-08-07T09:23:05.698Z","repository":{"id":29922106,"uuid":"33468079","full_name":"leostera/switchboard.rb","owner":"leostera","description":"Ruby client for switchboard.spatch.co","archived":false,"fork":false,"pushed_at":"2015-05-04T16:12:06.000Z","size":220,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T04:45:56.310Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leostera.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-06T05:25:27.000Z","updated_at":"2016-05-10T09:38:37.000Z","dependencies_parsed_at":"2022-09-09T04:23:38.018Z","dependency_job_id":null,"html_url":"https://github.com/leostera/switchboard.rb","commit_stats":null,"previous_names":["leostera/switchboard.rb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leostera/switchboard.rb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fswitchboard.rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fswitchboard.rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fswitchboard.rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fswitchboard.rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leostera","download_url":"https://codeload.github.com/leostera/switchboard.rb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fswitchboard.rb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269231787,"owners_count":24382438,"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","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"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-29T20:09:35.873Z","updated_at":"2025-08-07T09:23:05.675Z","avatar_url":"https://github.com/leostera.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Switchboard with your Ruby!\n\u003e Necessary alpha quality disclaimer: This is just a hack. Feel free to contribute\nthough! Feature requests in form of issues are more than welcome :)\n\n## Installation\nAdd `gem 'switchboard', github: 'ostera/switchboard.rb'` to your `Gemfile`.\n\n## Usage\nA code snippet speaks for a thousand words\n\n```ruby\n# Create a worker\nswitchboard = Switchboard::Worker.new\n\n# Register an open callback\nswitchboard.on_open do\n  p [:open, \"Connection opened\"]\nend\n\n# Register a message callback\nswitchboard.on_mail do |message|\n  p [:message, message]\nend\n\n# Connect an oauth account\nswitchboard.add_account(:oauth2, {\n  email: 'your@email.com',\n  token: 'yourToken',\n  token_type: 'refresh' #or 'access',\n  provider: 'google' #or others\n})\n\n# Connect a plain account\nswitchboard.add_account(:simple, {\n  email: 'email@your.com',\n  password: 'yourpassword'\n})\n\n# Watch a single account\nswitchboard.watch_mailboxes 'your@email.com', [\"INBOX\", \"SENT\"]\n\n# or if it's only INBOX, just pass an email\nswitchboard.watch_mailboxes 'your@email.com'\n\n# Watch all accounts! Yays!\nswitchboard.watch_all\n\n# Close the connection if you're done with it\nswitchboard.close\n```\n\n## Credits and License\nInspired by [jtmoulia/switchboard-python](https://github.com/jtmoulia/switchboard-python), \ndeveloped by [@ostera](https://github.com/ostera): use at your own risk!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleostera%2Fswitchboard.rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleostera%2Fswitchboard.rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleostera%2Fswitchboard.rb/lists"}