To use this demo, you can simply include the html below in the head of your application and call the functions however you like.
You'll need to write your own function to handle the data returned by the server. The structure of this data is visible in the demo above.
<!-- The location of our demo server and the remote api javascript file on it -->
<script src="http://147.75.97.163:3030/ebase/javascript/xiRemoteApi511.js"> // Xi remote API library</script>
<script>
// set up connection to Xi app
$eb.startForm(null, null, "ebExternalAPI", "http://147.75.97.163:3030/ebase");
// get all medals
function getAllMedals() {$eb.executeFunctionAsynchronously(writeData, error, "getMedals", null);}
// the following functions take a string value and search for data containing that string
// get medals by athlete name
function getMedalsByName(value) {$eb.executeFunctionAsynchronously(writeData, error, "getMedalsByName", value);}
// get medals by medal
function getMedalsByMedal(value) {$eb.executeFunctionAsynchronously(writeData, error, "getMedalsByMedal", value);}
// get medals by discipline
function getMedalsByDiscipline(value) {$eb.executeFunctionAsynchronously(writeData, error, "getMedalsByDiscipline", value);}
// get medals by event
function getMedalsByEvent(value) {$eb.executeFunctionAsynchronously(writeData, error, "getMedalsByEvent", value);}
var writeData = function(data) {
// Your data handling function here
}
var error = function(errMsg) {
// Your error handling function here
}
</script>