summaryrefslogtreecommitdiffstats
path: root/tcllib/modules/rest/yweather
blob: 95e47baea29f58d2608a3a6b6be14446ed0d8f07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package require rest

set yweather(forecast) {
   url http://weather.yahooapis.com/forecastrss
   req_args { p: }
   opt_args { u: }
}

set yweather(forecast_async) {
   copy forecast
   callback ::yweather::callback
}

rest::create_interface yweather

proc yweather::callback {call status result} {
    puts "callback from $call $status"
    puts $result
}