https://github.com/swapnilsoni1999/cowin-wrapper
Cowin API Wrapper Library. Written in Node.js
https://github.com/swapnilsoni1999/cowin-wrapper
cowin cowin-api wrapper-library
Last synced: 4 months ago
JSON representation
Cowin API Wrapper Library. Written in Node.js
- Host: GitHub
- URL: https://github.com/swapnilsoni1999/cowin-wrapper
- Owner: SwapnilSoni1999
- Created: 2021-05-24T16:29:35.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-07T11:52:29.000Z (almost 5 years ago)
- Last Synced: 2025-04-11T02:07:52.114Z (about 1 year ago)
- Topics: cowin, cowin-api, wrapper-library
- Language: JavaScript
- Homepage:
- Size: 42 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```sh
git clone https://github.com/SwapnilSoni1999/cowin-wrapper.git
```
2. Include the lib in your js file
```js
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()
})()
```
3. Run the file
You can use test file to check if the api is working or not.
#### License
Swapnil Soni ©