Shopping Service : Accessing Yahoo's Shopping API from JavaFX
Shopping Service
Powered by Yahoo! Shopping
Shopping Service is a JavaFX application that search and displays
products using Yahoo! Shopping Web Services API.
It can search for product offerings using text string queries.
![]() |
![]() |
![]() |
|
Enter product to search (Ex: ipod, boombox) in text box and press enter key or click on button.
|
A list of products matching products will be shown. Click on a product to view its details. |
Detailed information of product along with image is shown. Use and ![]() to scroll through list. |
![]() |
![]() |
![]() |
|
Click on thumbnail will zoom the image and will be displayed in its default size. |
Move pointer over or click to viewproduct URL. |
Key Bindings: - Left Arrow - Right Arrow - Enter [Textbox] - Enter Key |
Don't use the api-key used in this sample. Obtain your own key from http://developer.yahoo.com/shopping/
The response contains an XML document that has a list of products including the following information about each one:
- Url
- ProductName
- PriceFrom
- PriceTo
- Thumbnail
- Description
- UserRating
- Summmary
At the top of the Main.fx file, a constant appid is declared that is initialized with value returned by FX argument "yahoo_appid". Go to http://developer.yahoo.com/shopping/ to register and receive the App ID. Use the App ID to initialize the constant appid before running the program. The App ID can be passed as argument to application.
// appid from http://developer.yahoo.com/shopping/
def appid = FX.getArgument("yahoo_appid");
You can also directly assign the app-id string as shown below and rebuild the application
def appid = "<your yahoo app id>";
If you are using proxy-server for connecting to internet, please follow setup as specified in "Java Networking and Proxies".
Rakesh MenonStaff Engineer,
Sun Microsystems




button.
and 



or click to view
- Enter Key