{"id":22085655,"url":"https://github.com/nexmo/ruby-sms-headcount-demo","last_synced_at":"2025-10-05T02:33:42.173Z","repository":{"id":66173068,"uuid":"170513715","full_name":"Nexmo/ruby-sms-headcount-demo","owner":"Nexmo","description":"Take a headcount for an event with Nexmo SMS API and Sinatra (Ruby)","archived":false,"fork":false,"pushed_at":"2021-02-02T13:33:37.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-01-29T05:25:11.458Z","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/Nexmo.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-13T13:35:30.000Z","updated_at":"2020-11-16T14:19:45.000Z","dependencies_parsed_at":"2023-02-20T23:15:25.880Z","dependency_job_id":null,"html_url":"https://github.com/Nexmo/ruby-sms-headcount-demo","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/Nexmo%2Fruby-sms-headcount-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nexmo%2Fruby-sms-headcount-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nexmo%2Fruby-sms-headcount-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nexmo%2Fruby-sms-headcount-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nexmo","download_url":"https://codeload.github.com/Nexmo/ruby-sms-headcount-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245175482,"owners_count":20572787,"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":[],"created_at":"2024-12-01T01:15:47.931Z","updated_at":"2025-10-05T02:33:42.085Z","avatar_url":"https://github.com/Nexmo.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Taking a Headcount with Nexmo SMS API and Ruby\n\nA Sinatra and Ruby app showing how you can take attendance for an event with SMS and the Nexmo SMS API.\n\n## Prerequisites\n\n* [A Nexmo account](https://dashboard.nexmo.com/sign-up)\n* [Ruby 2.5+](https://www.ruby-lang.org/)\n* [Sinatra 2.0.5+](http://sinatrarb.com/)\n\n## Getting Started\n\n```sh\n# clone this repository\ngit clone git@github.com:Nexmo/ruby-headcount-sms-demo\n# change to folder\ncd ruby-headcount-sms-demo\n# install dependencies\nbundle install\n# copy example .env to actual .env\ncp .env.sample .env\n```\n\nNext you will need to sign up for a Nexmo account, grabv your API credentials from the API dashboard, register a phone number and put all those details in your `.env` file.\n\nFinally, make sure to link the callback URL for your number to your app. This needs to be a publicly accessible URL. Tools like [ngrok](https://ngrok.com/) give you a URL that can be accessed externally. You can link your callback URL to your Nexmo phone number by using the Nexmo CLI:\n\n```sh\n\u003e nexmo link:sms [your number] http://your-ngrok-domain/inbound\nNumber updated\n```\n\n## Usage\n\nTo start your server execute `ruby headcount.rb` from the command line and then go visit [localhost:4567](localhost:4567) from your web browser. \n\nYou can put in as many phone numbers as you like, seperated by a comma. Each number you send to will receive a message asking them to confirm their attendance. Receipients can respond with either \"1\" for yes or \"2\" for no.\n\nOnce you send the confirmation SMS, you will be redirected to a page that will display in realtime the number of confirmed attendees. When the number hits the minimum required for the event, a confirmation message will be sent to all those who responded affirmatively that the event is on. \n\nAs this is a simple starter app, this app does not validate or store the responses.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexmo%2Fruby-sms-headcount-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnexmo%2Fruby-sms-headcount-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexmo%2Fruby-sms-headcount-demo/lists"}