You can use this tool to validate the payload and make an ajax request to the fenix export server side
Steps to use it:
- Create an instance of FenixExport module
- Call the init method on that instance, specifying the plugin that you want to call (for now, it's possible to call only tableExport and metadataExport )
- Call the exportData( payload, URL, successCallback* , errorCallback* ) method passing as parameters (the parameters with * are facultative)
Example
var fenixExport = new FenixExport;
var payload =
{"input":
{"config":{
"uid":#UID_CHOSEN
}
}
};
var URL = "localhost:8080"
fenixExport.init("metadataExport");
fenixExport.exportData(payload,URL);
You can pass one of these two parameters:
- metadataExport , for export metadata in a PDF file.
- tableExport, for export table in an EXCEL file (.xlsx).
Options ( you can mix them ):
-
Change payload to set the language:
var payload = {"input": {"config":{"uid": #UID_CHOSEN} }, "output":{"config":{"lang":"ES"}};
-
Change name of the file:
var payload = {"input": {"config":{"uid": #UID_CHOSEN} }, "output":{"config":{"fileName": #fileName.pdf}};
....