dhyan / vaccine_slot_finder

At present booking a vaccine slot is very difficult for the folks in 18 to 44 age group. This gem just automates the checks using cowin open api's and can push notification to teams channel etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VaccineSlotFinder(for 18-44 age group)

Install this gem and add cronjobs(using whenever gem). Every 10 minutes it will check for vaccine availability in your pincode area and also surrounding 5 pincodes. These pincodes are picked from open source and available in lib/vaccine_slot_finder/bengaluru_pincodes.yaml.

PLEASE DOWNLOAD AND COPY THIS TO YOUR DESKTOP.

For example my current pincode is 560067, hence i get results for: 560065 560066 560067 560068 560070

Because of API throttling, searching more pincodes is difficult at this moment.

Installation

Add this line to your application's Gemfile:

gem 'vaccine_slot_finder'

And then execute:

$ bundle

Or install it yourself as:

$ gem install vaccine_slot_finder

Usage

###Pincode must be of 6 digits ###Example(Run it from your terminal)

$ vaccine_slot_finder 560067

Send notifications to teams channel?

$ // Add TEAMS_WEBHOOK as an environment variable to your favourite shell. You will get notifcations, only if there are any slots available for age group 18-44.     

Need a cron job?

$ // Add cronjob to your crontab file. Or this gem also has whenever gem installed as dev dependency.
$ // Please refer https://github.com/javan/whenever to learn more. Makes adding cron jobs very easy.
$ // If ading crons manually, below is how my crontab file looks. Please edit the pincode(ie 560067) of your location.
$  0,20,40 * * * * /bin/bash -l -c 'vaccine_slot_finder '\''560067'\'' >> /Users/nakumar/learnings/vaccine_slot_finder/config/cron_log.log 2>&1'

Credits

License

The gem is available as open source under the terms of the MIT License.

About

At present booking a vaccine slot is very difficult for the folks in 18 to 44 age group. This gem just automates the checks using cowin open api's and can push notification to teams channel etc.

License:MIT License


Languages

Language:Ruby 98.2%Language:Shell 1.8%