onymosDocKnow.captureImage
To select an image from your device’s album or capture a new image. Returns this image in a format ready to be analyzed by OnymosDocKnow.analyzeForm().
OnymosDocKnow.captureImage(
(mediaURLsArray) => {
/* ------
mediaURLsArray = [
Array of WebviewURLs,
];
------ */
},
(error) => {
console.log(error);
}
);
onymosDocKnow.analyzeForm
To initiate OCR and retrieve an object representing the analysis processes. Pass this object to OnymosDocKnow.getAnalyzeResults().
OnymosDocKnow.analyzeForm(
formType,
appVersion,
imageURIs,
(processObject) => {
/* ------
processObject = [{
formType: Type of form being analyzed,
appVersion: The current version of the app,
analyzeID: The ID used to identify and retrieve this process' results,
transactionID: The ID used to track this process within the Onymos ecosystem
}];
------ */
},
(error) => {
console.log(error);
},
options
);
String
Type of form being analyzed.
String
The current version of the app (e.g., “1.0.0”).
Array
Array of image URIs. If multiple images are included, the current implementation of analyzeForm() will only analyze the last image.
String
Type of form being analyzed.
String
The ID used to identify and retrieve this process’ results.
String
The ID used to track this process within the Onymos ecosystem.
String
Specify the specific version of the form to be analyzed. Defaults to the latest version if not provided.
onymosDocKnow.getAnalyzeResults
To retrieve the results of the previous analyzeForm() call.
OnymosDocKnow.getAnalyzeResults(
processObject,
transactionID,
(results) => {
/* ------
results = {
status: One of three status messages,
transactionID: The ID used to track this process within the Onymos ecosystem
data: A JSON object with the results of the analysis.
};
------ */
},
(error) => {
console.log(error);
},
options
);
Object
The object returned from ‘analyzeForm()’ that contains the necessary data to retrieve the process’ results.
String
The ID used to track this process within the Onymos ecosystem.
String
One of “processing,” “succeeded,” or “failed.”
JSON Object
If the result’s status is “processing” or “succeeded,” the result will contain a data object with the results from the analysis.
onymosDocKnow.getAvailableFormTypes
To return a list of documents associated with your Onymos account.
const availableFormTypes = OnymosDocKnow.getAvailableFormTypes(
appVersion
);
/* ------
availableFormTypes = [
formType,
];
------ */