Cloudkibo / KiboPush

0 stars 1 forks source link

Create covid vaccine website #11038

Open AnishaChhatwani opened 3 years ago

AnishaChhatwani commented 3 years ago

As discussed in the meeting, this task is to create a website that would ask for zip code and show all the pharmacies that have the covid vacccine available.

https://gist.github.com/theimpostor/3b5d096feafa16464441de429c6fa69a https://www.kroger.com/rx/guest/get-vaccinated

AnishaChhatwani commented 3 years ago

Status Update:

  1. Understood the javascript code in the github link https://gist.github.com/theimpostor/3b5d096feafa16464441de429c6fa69a
  2. Setup a new project and made it running
  3. created the UI to enter the zip code
  4. When user presses the button search, I'm using the same javascript code you provided. I tried to call the kroger api to fetch pharmacies but it seems kroger server is blocking/not allowing other clients and servers to access their APIs.
    • This is the response I'm getting when I'm calling their API directly from client. Screenshot 2021-02-04 at 3 47 21 PM
    • To bypass cors, I tried to use this library (https://cors-anywhere.herokuapp.com) but krogger server blocked it as well and gave this response. Screenshot 2021-02-04 at 3 47 05 PM
    • Then, I tried to call it from our kibochat server but it did not give me any response.
    • I even tried using curl and got the following response. Screenshot 2021-02-04 at 3 51 50 PM

Discussed this with @sojharo as well and he also tried to call the APIs on his end. But he got the above responses as well.

jekram commented 3 years ago

have you run the script from the browser?

what is the next step?

jekram commented 3 years ago

Have you looked at

https://developer.kroger.com/reference

AnishaChhatwani commented 3 years ago

Yes, I have run the script from browser. It is running from the browser as we are adding it in a snippet in developer tools. So, when that script calls the APIs, the request goes from kroger server and therefore, it works from there.

I have looked at the developer documentation overall. They have exposed the following APIs. In order to do that, we'll have to create an app with kroger and get authentication token etc. Also, the script won't be used and I'll have to write my own logic as the API calls would be different. They have not exposed the APIs that are being called in the script. I haven't looked into the following APIs in detail.

  1. Identity
  2. Carts
  3. Products
  4. Locations
AnishaChhatwani commented 3 years ago

As discussed in meeting, we will put this issue on hold