2 messages in com.googlegroups.google-enterprise-developerCreating a Simple OneBox Module to Hi...
FromSent OnAttachments
Tim K25 Jun 2008 07:51 
Pablo Solera26 Jun 2008 09:23 
Subject:Creating a Simple OneBox Module to Hits an API
From:Tim K (clu@gmail.com)
Date:06/25/2008 07:51:33 AM
List:com.googlegroups.google-enterprise-developer

I'd like to create a simple OneBox Module that grabs a zip code (XXXXX or XXXXX-XXXX) and then passes that Zip code along to an API which returns an XML result and validates the zip.

The API URL accepts the 5 digit zip XXXXX parameter within the URL like this:

http://mysite.com/API.dll?API=AllCitiesInAZipCode&XML=<AllCitiesInAZipCodeRequest>Zip5>XXXXX</Zip5></AllCitiesInAZipCodeRequest>

When you enter that URL into your browser, you are returned an XML like so: <?xml version="1.0" ?> <AllCitiesInAZipCodeResponse> <Zip5>XXXXX</Zip5> <ZipStatus>INVALID-ZIP CODE</ZipStatus> </AllCitiesInAZipCodeResponse>

I'd like to have the OneBox module be able to validate if the zip code is valid (by looking at the ZipStatus returned above). If the Zip is valid, I'd like to present them with a link to a URL which passes the searched 5 digit Zip to a separate URL.

Any information on getting this accomplished would be helpful!

Thanks!