Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Latest commit

 

History

History
103 lines (75 loc) · 4.28 KB

README.md

File metadata and controls

103 lines (75 loc) · 4.28 KB

Covid-19 Vaccine Tracker (India)

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.

Getting started from Source Code

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.

  1. Clone the repository
  2. cd src/VaccineTrackers
  3. dotnet restore
  4. dotnet build
  5. dotnet run -- --help to view the commands available.

To create [self-contained exe files], run these commands (from ./src/VaccineTrackers):

  1. Windows 64-bit compatible: dotnet publish -r win-x64 -p:PublishSingleFile=true --self-contained true
  2. Linux 64-bit compatible: dotnet publish -r linux-x64 -p:PublishSingleFile=true --self-contained true

Samples

Check available commands

  1. dotnet run -- --help
    • show details of all available commands
  2. dotnet run -- checkvaccineslots byDistrict --help
    • show help on checkvaccineslots byDistrict command
  3. dotnet run -- getdistrictid byState --help
    • show help on getdistrictid command
  4. dotnet run -- checkvaccineslots byPin --help
    • show help on checkvaccineslots byPin command
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:

  1. 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.
  2. 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).

Check vaccine availability by PIN Code:

  1. 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 presses ctrl+c).

Get names and IDs of all the districts in a state:

  1. dotnet run -- getdistrictid bystate -s "West Bengal"

Getting started from pre-built exe file

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.

Samples

Check available commands

  1. .\CowinVaccineTrackers.exe --help
    • show details of all available commands
  2. .\CowinVaccineTrackers.exe checkvaccineslots byDistrict --help
    • show help on checkvaccineslots byDistrict command
  3. .\CowinVaccineTrackers.exe getdistrictid byState --help
    • show help on getdistrictid command
  4. .\CowinVaccineTrackers.exe checkvaccineslots byPin --help
    • show help on checkvaccineslots byPin command

Check vaccine availability in your district:

  1. .\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.
  2. .\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).

Check vaccine availability by PIN Code:

  1. .\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 presses ctrl+c).

Get names and IDs of all the districts in a state:

  1. .\CowinVaccineTrackers.exe getdistrictid bystate -s karnataka