This is a small console application, written in C#, to track availability of Covid-19 vaccines in India.
It uses the Cowin Open APIs, Spec available at this link.
Pre-requisities:
You need to install dotnet core SDK in your machine. For details on how to install and use dotnet core, visit this link.
Please install dotnet core version 3.1 as this is the LTS version.
- Clone the repository
cd src/VaccineTrackers
dotnet restore
dotnet build
dotnet run -- --help
to view the commands available.
To create [self-contained exe files], run these commands (from ./src/VaccineTrackers
):
- Windows 64-bit compatible:
dotnet publish -r win-x64 -p:PublishSingleFile=true --self-contained true
- Linux 64-bit compatible:
dotnet publish -r linux-x64 -p:PublishSingleFile=true --self-contained true
Check available commands
dotnet run -- --help
- show details of all available commands
dotnet run -- checkvaccineslots byDistrict --help
- show help on
checkvaccineslots byDistrict
command
- show help on
dotnet run -- getdistrictid byState --help
- show help on
getdistrictid
command
- show help on
dotnet run -- checkvaccineslots byPin --help
- show help on
checkvaccineslots byPin
command
- show help on
Sample output: Available Commands
❯ dotnet run -- --help
Usage: Cowin.VaccineTrackers <Command>
Commands:
checkvaccineslots byPin Track Vaccine availability by District
checkvaccineslots byDistrict Track Vaccine availability by District
getdistrictid byState Get District IDs in a State
help Display help.
version Display version.
Check vaccine availability in your district:
dotnet run -- checkvaccineslots byDistrict -s karnataka -d bbmp -a 18 -w 4
- here we are checking vaccine availability in BBMP district of Karnataka, for ages 18 and above, in next 4 weeks.
dotnet run -- checkvaccineslots byDistrict -s karnataka -d bbmp -a 18 -w 4 -c
- same as above, but here the command will be continuously checking (until user presses
ctrl+c
).
- same as above, but here the command will be continuously checking (until user presses
Check vaccine availability by PIN Code:
dotnet run -- checkvaccineslots byPin -p 560001 -a 45 -w 4
- here we are checking vaccine availability in Pin Code
560001
, for ages 18 and above, in next 4 weeks. - add
-c
to keep the checks running continuously (until user pressesctrl+c
).
- here we are checking vaccine availability in Pin Code
Get names and IDs of all the districts in a state:
dotnet run -- getdistrictid bystate -s "West Bengal"
I have provided pre-built executable files for Windows and Linux (64-bit) versions in this directory as zipped files. Unzip the files, and start using them as shown below.
Check available commands
.\CowinVaccineTrackers.exe --help
- show details of all available commands
.\CowinVaccineTrackers.exe checkvaccineslots byDistrict --help
- show help on
checkvaccineslots byDistrict
command
- show help on
.\CowinVaccineTrackers.exe getdistrictid byState --help
- show help on
getdistrictid
command
- show help on
.\CowinVaccineTrackers.exe checkvaccineslots byPin --help
- show help on
checkvaccineslots byPin
command
- show help on
Check vaccine availability in your district:
.\CowinVaccineTrackers.exe checkvaccineslots byDistrict -s karnataka -d bbmp -a 18 -w 4
- here we are checking vaccine availability in BBMP district of Karnataka, for ages 18 and above, in next 4 weeks.
.\CowinVaccineTrackers.exe checkvaccineslots byDistrict -s karnataka -d bbmp -a 18 -w 4 -c
- same as above, but here the command will be continuously checking (until user presses
ctrl+c
).
- same as above, but here the command will be continuously checking (until user presses
Check vaccine availability by PIN Code:
.\CowinVaccineTrackers.exe checkvaccineslots byPin -p 560001 -a 45 -w 4
- here we are checking vaccine availability in Pin Code
560001
, for ages 18 and above, in next 4 weeks. - add
-c
to keep the checks running continuously (until user pressesctrl+c
).
- here we are checking vaccine availability in Pin Code
Get names and IDs of all the districts in a state:
.\CowinVaccineTrackers.exe getdistrictid bystate -s karnataka