This repository has been archived by the owner on Jul 20, 2023. It is now read-only.
Releases: googleapis/nodejs-vision
Releases · googleapis/nodejs-vision
@google-cloud/vision v0.11.1
@google-cloud/vision v0.11.0
⚠️ Breaking Changes!
Dropped support for Node v0.12.x
We've officially dropped support for Node v0.12.x in all of our APIs. It may still work, but it is not officially supported and may stop working at any time.
@google-cloud/vision v0.10.0
@google-cloud/vision v0.9.0
@google-cloud/vision v0.8.1
@google-cloud/vision v0.8.0
@google-cloud/vision v0.7.0
⚠️ Breaking Changes!
API terminology used in face detection response
Before | After |
---|---|
blurry |
blurred |
dark |
underExposed |
hat |
headwear |
happy |
joy |
sad |
sorrow |
mad |
anger |
surprised |
surprise |
Features
- Auto-detect
projectId
. See Authentication for more. (#1656)
@google-cloud/vision v0.6.0
⚠️ Breaking Changes!
Partial failures are now treated as errors
Previously, if any annotations were not successful, the errors were combined with any successful annotations. We've since introduced a custom error type called PartialFailureError
, which is returned as the first err
argument to your callback.
Before
vision.detect(image, ['faces'], function(err, detections, apiResponse) {
if (err) {
// An API error occurred.
}
if (detections.faces.errors.length > 0) {
// Errors occurred while trying to use this image for a face annotation.
}
});
After
vision.detect(image, ['faces'], function(err, detections, apiResponse) {
if (err) {
// An API error or partial failure occurred.
if (err.name === 'PartialFailureError') {
// Errors occurred while trying to use this image for a face annotation.
// err.errors[].image (original image passed to `detect`)
// err.errors[].errors[].code
// err.errors[].errors[].message
// err.errors[].errors[].type
}
}
// `detections` will contain all of the results that could be annotated.
});
@google-cloud/vision v0.5.0
@google-cloud/vision v0.4.0
⚠️ Breaking Changes!
Promises have arrived!
It's been a long time coming, but we're finally here. We've shipped promise support in the Google Cloud Vision module!
Do I have to use promises?
Nope, carry on.
How do I use promises?
Don't pass a callback:
var vision = require('@google-cloud/vision')();
vision.detectFaces('./image.jpg')
.then(function(data) {
var faces = data[0];
})
.catch(function(err) {});