abhinavdc / cowin-pinger

Get notified on your phone when there is a vaccine slot available at your location, by running a script on your computer. Uses Cowin portal's public API.
106 stars 45 forks source link

Suggestions #9

Closed dinkan-z11 closed 3 years ago

dinkan-z11 commented 3 years ago

Suggestion:

abhinavdc commented 3 years ago
dinkan-z11 commented 3 years ago

No offence, but in my opinion, lets not worry about the cowin's handling capacity as of now and give the user a chance to stay alive :)

abhinavdc commented 3 years ago

Thanks, I didn't know the Protected API's didn't have authentication. Just tested it now and I'm getting a response from the API. If this API isn't cached this would be really helpful. I'll update the API urls.

None token, I completely agree with you, staying alive is more important right now than worrying about server loads. I thought I'll open an Issue asking about the interval and see how people respond to it.

abhinavdc commented 3 years ago

As I mentioned in the previous comment, I have opened a new Issue - https://github.com/abhinavdc/cowin-pinger/issues/14 to ask everyone what they feel. Feel free to post your thoughts as well there.

I have updated the code to use the new API endpoints like you suggested and have reduced the time interval to 1 min as of now. Have updated the npm library as well with these new changes.

kira-heisenberg commented 3 years ago

Hey I am new to JS, I have changed manually the time 60000 to time 10000 and executed but why does it ping only at 1min? @abhinavdc

abhinavdc commented 3 years ago

If you have cloned the repo you should run node app.js run --age=30... like this and shouldn't use npx cowin-pinger run ....

If you change 60000 to 10000 and pass --interval=1, the script should run every 10 seconds,