dotfiles/vim/bundle/webapi-vim/example/weather.vim

4 lines
238 B
VimL
Raw Normal View History

2013-07-07 21:25:47 +00:00
let loc = 'Osaka'
let dom = webapi#xml#parseURL(printf('http://www.google.com/ig/api?weather=%s', webapi#http#encodeURIComponent(loc)))
echo loc.'''s current weather is '.dom.find('current_conditions').childNode('condition').attr['data']