VoiceGuide IVR Software Main Page
Jump to content

Google Api

Recommended Posts

Would someone be able to provide an example of how to send a request and parse out multiple returned results form the google api?

 

http://api.google.com/GoogleSearch.wsdl

 

I want to allow a caller to search google and TTS one result then ask the user if they want to hear the next result and keep going until the results list is complete. I have seen the examples of one result on the weather example but this has multiple results and I need to keep looping through the results???

 

Thanks for any assistance.

Share this post


Link to post

Just store the multiple returned results in Result Variables which as one of the components of their name have a numeric index. ie: create vars like these:

 

$RV[MyValue_1]

$RV[MyValue_2]

$RV[MyValue_3]

$RV[MyValue_4]

etc...

 

And when it comes the time to read the information back to caller have a loop in the script which in each iteration of the loop increases some counter (say $RV[MyCounter]) by one and use the counter to retrieve the current information element, like this:

 

$RV[MyValue_$RV[MyCounter]]

 

One of the examples in the help file's entry on Evaluate Expression module has an example of how to increment a counter in a loop, see: http://www.voiceguide.com/vghelp/html/modEvalExpr.htm

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×