generateDocumentWithApiQuery method
Future<void>
generateDocumentWithApiQuery(
- DocumentApiQuery documentApiQuery, {
- required void onSuccess(),
- required void onError(
- SyneriseError error
This function generates a document based on a given slug and context.
Args: slug (DocumentApiQuery): The parameter "documentApiQuery" is an Object for configuration of the query parameters for a specific document.
Implementation
Future<void> generateDocumentWithApiQuery(DocumentApiQuery documentApiQuery,
{required void Function(Document) onSuccess,
required void Function(SyneriseError error) onError}) async {
SyneriseResult<Document> result = await _methods.generateDocumentWithApiQuery(documentApiQuery);
result.onSuccess((result) {
onSuccess(result);
}).onError((error) {
onError(error);
});
}