Coder Social home page Coder Social logo

akshayitzme / cowinalerter-node Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 61 KB

Heroku Ready to Deploy Express.js app to check Slot Availability every 15 secs, sends telegram alerts when there is a Slot Available.

License: MIT License

JavaScript 99.89% Procfile 0.11%
cowin express nodejs cowin-alerts telegram vaccine heroku

cowinalerter-node's Introduction

CowinAlerter-Node GitHub package.json version

covid banner

contributions welcome GitHub Workflow Status GitHub top language Lines of code Deploy

Automatically checks for available slots every 15 seconds, sends Alerts via Telegram.

Features

  • Heroku Ready.
  • Checks Slot Availability of 5 days.
  • Supports Finding Slots by Pin Code & District Code.
  • Personalized Alerts.. Alerts based on Users Age Group, Dose, FirstDose..etc
  • Checks Slot Availability in background.

Set Up

Heroku

  • Fork this Repository
  • Add Users in Users.json refer this gist
  • Connect Forked GitHub repo to Heroku.
  • Set Telegram Bot Id in Heroku Config Vars. see guide also see env.example
  • Add NodeJs Buildpack.
  • Deploy App

LocalHost

  • Clone this Repository
  • Add Users in Users.json refer this gist
  • Set Telegram Bot Id in .env file. see env.example
  • Install Dependencies yarn install or npm i
  • Run Server
     node index

Works well in all other Hosting Platforms.

Notes

  • to find district ID, use this API

References

APISetu

Licence

GitHub

cowinalerter-node's People

Contributors

akshayitzme avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

atikjaz

cowinalerter-node's Issues

Repeated duplicate Alerts

Issue: Sends Duplicated Alerts.

Reason:

Cowin DB holds data for 4 minutes. Hence if we send API request within that 4 minutes, we might get cached data. so actually the db is only updated after 4 minutes. since the program checks slot availability every 15 seconds.. each 15 seconds in 4 minute, it gets cached data. that's why the program sends duplicate alerts. within that time that slot maybe expired or the available dose count must have changed.

Duplicate alerts will flood the chat with unwanted messages. eventually becomes a problem ๐Ÿ˜ž

Solution

create an effective method to find duplicate alerts. session_id might be a helpful. ensure one session_id is alerted only once.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.