@vitiacare/vitiacare_sdk_js
v2.2.4
Published
SDK to connect js-based apps to Vitia's Health API
Downloads
25
Readme
This library allows you to quickly and easily use the VITiaCare API v1 via NodeJS.
Table of Contents
Installation
Prerequisites
- VITiaCare API Key (contact [email protected] for more info)
Dependencies
- NodeJS - last tested on v14
Install Package
npm install @vitiacare/vitiacare_sdk_js
Quick Start
Test EP
The following is the minimum needed code initiate a Vitia Object and call the testing endpoint:
const Module = require( '../index');
let test_obj = new Module.vitiaObject('https://services.vitiacare.com', <YOUR-API-KEY>, obj_type="", user_token="", user_id="", search_params="", file_type="");
test_obj.prepare().then(async (res) => {
if(res) {
let test = await test_obj.test();
console.log(test.res);
} else {
console.log('Prepare error');
}
},
() => {
console.log('Unexpected error');
});