0.6.0 • Published 6 months ago
intelliprove-sdk-esm v0.6.0
Support
- NodeJS with ESM
Tested and verified
- NodeJS 16.x
- NodeJS 18.x
- NodeJS 19.x
Support is guaranteed for the NodeJS versions mentioned above. Other versions are most likely supported but not tested.
Installation
npm add intelliprove-sdk-esm
Updating
npm update intelliprove-sdk-esm
Documentation
You can find our SDK documentation here.
Release Notes
0.6
New features
Updates
- Refactor of
QualityResponse
class:The following properties for the
QualityResponse
model have been renamed:message
=>prompt
error_type
=>error_code
With the propertyerror_type
now being re-used asstring
value to provide feedback in a more human readable way.
Deprecated features
How to Upgrade
- Ensure you are using the new property names
QualityResponse
model correctly
Example usage
import IntelliProveSDK from 'intelliprove-sdk-esm';
const APIKEY = '';
const IMAGE_PATH = '/path/to/image.jpg';
const VIDEO_PATH = '/path/to/video.mp4';
const intelliprove = new IntelliProveSDK(APIKEY);
try {
// Do a quality check on an image saved to disk
const quality_response = await intelliprove.check(IMAGE_PATH);
// Upload a video for processing
const uuid = await intelliprove.upload(VIDEO_PATH, quality_response);
// Get the results of the uploaded video for the first time
const results = await intelliprove.results(uuid);
console.log(results);
// Get the current user/customer by authentication credentials
const user = await intelliprove.userInfo();
console.log(user);
} catch (error) {
console.error(error);
}
// You can also use 'then' and 'catch'
intelliprove
.results(uuid, false)
.then((biomarkers) => {
console.log(biomarkers);
})
.catch((err) => {
console.error(err);
});