Foyer Insight
Additional documentation at Docs
Listed below is example usage of the insight-sdk
import { ClassifyResult, Insight } from '@foyer-inc/insight-sdk'
const insight = new Insight() or new Insight(options)
const options = {
authorization: string,
force: boolean,
includeSegmentations: boolean,
includeTagpoints: boolean,
detectionsRequested: string[]
}
const authorization = await insight.login('email', 'password')
const url = 'https://myfakewebsite.com/myfakeimage.jpg'
const file =
const result: ClassifyResult = await insight.classify(url)
const anotherResult: ClassifyResult = await insight.classify(url, options)
const bulkResult: ClassifyResult[] = await insight.bulkClassify([url, url, url], options)
insight.classify(url)
.then( (result: ClassifyResult) => {
});
}
const blurredImage = await result.blurDetection('detectionName')
const extractedImage = await result.extractDetection('detectionName')
const color = await result.getDetectionColor('detectionName')
const anotherColor = await result.getDetectionColor(extractedImage)
const found = result.checkDetection('detectionName')
const multipleFound = result.checkDetection(['detectionName', 'anotherDetectionName'])