require 'open-uri'
require 'rexml/document'
uri = "http://shopping.yahooapis.jp/ShoppingWebService/V1/categorySearch?appid=%s&category_id=%s" %
['自分のアプリケーションID',
1
]
open(uri) do |f|
REXML::Document.new(f.read).elements.each('ResultSet/Result/Categories/Children/Child') do |item|
puts item.text('Id')
puts item.text('Title/Long')
end
end
2009年8月12日水曜日
RubyでYahoo Web API(カテゴリID取得)を試してみた
登録:
コメントの投稿 (Atom)
0 件のコメント:
コメントを投稿