Skip to content

Instantly share code, notes, and snippets.

@emwdx
Created February 27, 2021 11:17
Show Gist options
  • Save emwdx/a38b0b2a313ba91e0bd840fba0e823ed to your computer and use it in GitHub Desktop.
Save emwdx/a38b0b2a313ba91e0bd840fba0e823ed to your computer and use it in GitHub Desktop.
quick way to find rite aid locations with vaccines in NE Ohio
//Put the store numbers for stores near you in this list
var nearbyStores = [3041,3163,7939,3131,3043,3011,2665,2654,4071,2640,3157,2665,3486]
var dataURLs = [];
var responseURLS = [];
var response;
for(var i = 0;i<nearbyStores.length;i++){
var dataURL = "https://www.riteaid.com/services/ext/v2/vaccine/checkSlots?storeNumber=" + nearbyStores[i];
dataURLs.push(dataURL)
}
for (var i = 0;i<dataURLs.length;i++){
response = await fetch(dataURLs[i])
responseJSON = await response.json()
if(responseJSON.Data.slots["0"] | responseJSON.Data.slots["1"] ){
console.log(dataURLs[i])
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment