Picture of Peter Stock (innovaphone)
Moderator Registered 1 year 114 days
Peter Stock (innovaphone) Tuesday, 23 April 2024, 03:11 PM in response to mla
Re: Add gateway to phonesearch
Hi Miriam,

in the config.json you need to add the searchApi.

In my case, the app is called "innovaphone-example"...

"apis": {
"innovaphone-example": {
"com.innovaphone.search": {
"info": {}
},
"com.innovaphone.phonelookup": {
"info": {}
},
"hidden": true
}
}


In your clientcode "innovaphone-example.js" (in my case) you can simply
do this :

var phonelookupApi = start.provideApi("com.innovaphone.phonelookup");

phonelookupApi.onmessage.attach(function (sender, phonelookupApiRequest) {
console.log(phonelookupApiRequest.msg);
});

var searchApi = start.provideApi("com.innovaphone.search");

searchApi.onmessage.attach(function (sender, searchApiRequest) {
console.log(searchApiRequest.msg);
});

Now you see your search Request in the Console and you can do what you want with this request ;)

For the Structure, you can have a look on :

← You can define your color theme preference here