This Twitter bot notifies users who DM their zip codes to @vaccinesignup about available vaccine-appointment Locations in their area. Our current data source only supports LA County.
Follow @vaccinesignup.
DM @vaccinesignup a zip code only:
The bot will DM you available Locations in that zip:
To stop all notifications, DM stop
to @vaccinesignup.
Set your Twitter API keys as environment variables:
export POSTGRES_USER=[postgres user]
export POSTGRES_PASSWORD=[postgres password]
export TWITTER_CONSUMER_KEY=[your key]
export TWITTER_CONSUMER_SECRET=[your secret]
export TWITTER_ACCESS_TOKEN=[your access token]
export TWITTER_ACCESS_SECRET=[your access secret]
Install dependencies with Bundler:
bundle install
$ rake -T|grep vacc
rake vaccinesignup:back_up # Back-up production data and restore to the local environment
rake vaccinesignup:delete_real_users # Delete real (non-test) users from development environment
rake vaccinesignup:read_and_notify # Read DMs and, if there are subscribed zip codes, notify users
rake vaccinesignup:reset_staging # Back-up production, restore locally, and delete real users for testing
rake vaccinesignup:sync_and_notify # Sync Locations and, if there are changes, notify users
When configuring tasks for production, the timing on both should be optimized depending on how often Locations are updated and DMs are tweeted, respectively.
export TWITTER_CONSUMER_KEY=[your key]
export TWITTER_CONSUMER_SECRET=[your secret]
export TWITTER_ACCESS_TOKEN=[your token]
export TWITTER_ACCESS_SECRET=[your access secret]
bundle ex rake db:reset
bundle ex rake vaccinesignup:back_up
bundle ex rake vaccinesignup:reset_staging
bundle ex rake vaccinesignup:sync_and_notify
bundle ex rake vaccinesignup:read_and_notify
Copyright © 2021-2024 Roderick Monje. See LICENSE for further details.