livgust / macovidvaccines.com

macovidvaccines.com
MIT License
38 stars 20 forks source link

Read 'totalAvailability' from json #173

Closed harcod closed 3 years ago

harcod commented 3 years ago

Fixes #172

BaystateHealth, HeywoodHealthcare, and CVS ( in the past ) are returning totalAvailability when they can detemine the number of appointments, but not on which day the appointments are on.

Here is a devtest.json file that produces the following location card.

{
  "version": 1,
  "timestamp": "2021-03-12T130557Z",
  "results": [
    {
      "name": "Heywood Healthcare",
      "street": "171 Kendall Pond W",
      "city": "Gardner",
      "state": "MA",
      "zip": "01440",
      "signUpLink": "https://gardnervaccinations.as.me/schedule.php",
      "hasAvailability": true,
      "totalAvailability": 12,
      "timestamp": "2021-03-12T13:05:57.896Z",
      "latitude": 42.5864159,
      "longitude": -71.9870586
    }
  ]
}

image