photools.com Community

IMatch Discussion Boards => IMatch Scripting and Apps => Topic started by: ben on June 12, 2017, 10:45:35 PM

Title: Return values of a promise
Post by: ben on June 12, 2017, 10:45:35 PM
Hello,

how do i know which values a promise returns?

Example:
The parameters of "IMatch.appInfo" are explained in the documentation (https://www.photools.com/dev-center/doc/imatch/IMatch.html#appInfo (https://www.photools.com/dev-center/doc/imatch/IMatch.html#appInfo)).
If i look into the sample app "My App" then is uses the following return values:
"response.app.localName"


Where can i find this in the documentation?

Thanks for your help,
Ben
Title: Re: Return values of a promise
Post by: Mario on June 13, 2017, 08:32:54 AM
1. You can see the full response in the NET panel of your browser.
2. You can dump the full response via this statement:

console.log(JSON.stringify(response,null,2))

to the IMatch Output Panel or the console of your browser.

I did not make the effort to list each response member in the documentation. They are usually self-explanatory by name.