The Airport Demo Data
In the US Airport Demo Data example a Lua script, using the esi-lcurl-http-client library, calls a free web service on the internet, in this case information from the United States Federal Aviation Agency. The data is retrieved in XML format, which will then be parsed into objects in the I/O Model.
To create the US Airport Data example automatically, just run the Lua script in the Console Display.
local exm = require('esi-examples')
|In Lua Security Mode Restrictive, for the installation script as well as the actual example to work, additional configuration of Lua permissions is required. See Lua Security for background information and examples.
On installation of this example, the Lua script for the 'DataProcessing' Generic Item is executed immediately, creating a folder structure 'Examples/LUA/HTTP Access/US Airport Data' underneath the Core object in I/O Model. This will take a few seconds. When the script has finished, the new branch in the I/O Model looks like this:
Then the script in the 'Create Airport KPI Model' Action Item automatically generates the corresponding objects in the KPI Model. When the script is finished, the Action Item is disabled. The KPI Model shows the newly generated objects:
This example will be used in the Lua HTTP Example in the Jumpstart for Using Lua Scripting.