Socket
Socket
Sign inDemoInstall

node-cowin-api

Package Overview
Dependencies
2
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-cowin-api

``` npm install node-cowin-api ```


Version published
Weekly downloads
19
increased by1800%
Maintainers
1
Install size
399 kB
Created
Weekly downloads
 

Readme

Source

🔗 Installation

npm install node-cowin-api

Available methods:

  • getStates - Get all states in India
  • getDistricts - Get get all the districts of state based on stateId
  • getByAppointmentListByPin - Get planned vaccination sessions on a specific date in a given pin

⚡️ Usage:

I have added all the Co-WIN public API methods except Authentication. Will be adding them ASAP, Maybe you can contribute too.

const { 
  getStates, 
  getDistricts, 
  getByAppointmentListByPin 
  } = require('node-cowin-api')
  • Write asynchronous function
async function getData() {
    const allStates = await getStates()
    console.log(allStates)
    const districts = await getDistricts(11)
    console.log(districts)
    const appointments = await getByAppointmentListByPin(360001, '30-07-2021')
    console.log(appointments)
}

getData()

Keywords

FAQs

Last updated on 30 Jul 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc