gc-vision-api
v0.1.0
Published
Simple service for Google Cloud Vision API. ([Vision API Documentation](https://cloud.google.com/vision))
Downloads
4
Maintainers
Readme
gc-vision-api
Simple service for Google Cloud Vision API. (Vision API Documentation)
How to install
npm install gc-vision-api
Example
import {VisionApi, Image, Feature} from 'gc-vision-api';
const client = VisionApi.init({
keyFilename: '/path/to/file/with/keys.json'
});
const request = client.request();
const image = Image.bucket('your-google-storage-bucket-name/and/nice/path/to/image.jpg');
request
.image(image)
.feature(Feature.LabelDetection, 2)
.subscribe(result => {
console.log(result)
});
API Reference
VisionApi.init(settings)
VisionApi.prototype.request()
Request.prototype.image(image)
Request.prototype.feature(featureType, [maxResults])
Request.prototype.subscribe(subscriber)
Image.bucket(source)
Image.local(source)
Image.remote(source)
Feature.TypeUnspecified
Feature.FaceDetection
Feature.LandmarkDetection
Feature.LogoDetection
Feature.LabelDetection
Feature.TextDetection
Feature.SafeSearchDetection
Feature.ImageProperties