Skip to content

SwapnilSoni1999/cowin-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cowin API Wrapper Library

  • A Node.js Cowin Wrapper library to manage vaccination.

Features

  • Access to all endpoints
  • Can use both Private/Public APIs
  • With JSDoc

How to use

  1. Firstly clone the repo
git clone https://github.com/SwapnilSoni1999/cowin-wrapper.git
  1. Include the lib in your js file
const cowin = require('./cowin-wrapper')

(async () => {
    const number = "Your 10 digit number"
    const txnId = await cowin.sendOtp(number)

    const otp = "Your otp"
    const otp = await scanf('Enter OTP:')
    const token = await cowin.verifyOtp(txnId, otp)
    const benef = await cowin.getBeneficiaries(token)
    console.log('Token', token)
    console.log('Beneficiaries', benef)
    process.exit()
})()
  1. Run the file

You can use test file to check if the api is working or not.


License

Swapnil Soni ©

About

Cowin API Wrapper Library. Written in Node.js

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published