processDocumentFromURL method Null safety
Process document from url.
Returns a Map
containing the processed document information
from the fileUrl
or fileUrls
using the desired or default options.
Implementation
Future<Map<String, dynamic>> processDocumentFromURL(
{String? fileUrl,
List<String>? fileUrls,
List<String>? categories,
bool deleteAfterProcessing = false,
int boostMode = 0,
String? externalId,
int maxPagesToProcess = 1}) {
final Map<String, dynamic> body = {
"auto_delete": deleteAfterProcessing,
"boost_mode": boostMode,
"categories": categories ?? [],
"external_id": externalId,
"file_url": fileUrl,
"file_urls": fileUrls,
"max_pages_to_process": maxPagesToProcess
};
return request(HTTPMethod.post, 'documents', body: body);
}