| Premshree Pillai ( @ 2005-03-04 03:39:00 |
| Current music: | Animals - House Of The Rising Sun |
| Entry tags: | api, hacks, rebol, web services, yahoo, yahoo api, yahoo hacks |
What about REBOL?
Heh, REBOL is fun at times. Somebody asked me that question—What about REBOL?. Um, I don’t think I’m going to find time to write an API or anything. Basically I’m not in any mood to add parse handlers for the various search types.
Well, there you go, a Yahoo! Search Web Services demo for REBOL. That’s about REBOL.
REBOL [
Title: "Yahoo Search Web Services"
File: %amazon.r
Date: 4-Mar-2005
Author: "Premshree Pillai"
Purpose: {
Yahoo! Search Web services demo
}
]
do %xml-parse.r
APP_ID: 'rebol-yahoo'
ImageSearch: func [query app_id] [
return parse-xml+ read rejoin [http://api.search.yahoo.com/ImageSearchService/V1/imageSearch '?query=' query '&appid=' app_id]
]
out: layout [
H3 400 {
Yahoo Search Web Services
demo using REBOL
}
across
query: field
button "Search" [
ImageSearchResults: ImageSearch query/text 'rebol-yahoo' APP_ID
curr_count: 1
img: load to-url ImageSearchResults/:curr_count/3/2
backface/image: img
show backface
]
return
backface: text 400x300 center
return
button "Previous" [
curr_count: curr_count - 1
img: load to-url ImageSearchResults/:curr_count/3/2
backface/image: img
show backface
]
button "Next" [
curr_count: curr_count + 1
img: load to-url ImageSearchResults/:curr_count/3/2
backface/image: img
show backface
]
pad 0x5
]
view out
The screenshot was generated using REBOL itself: save/png %screenshot.png to-image out