ä¾¡æ ¼.com API for ruby
ä¾¡æ ¼.com WEBãµã¼ãã¹ API ããã¥ã¢ã«
http://rails2u.com/misc/kakaku_com_api.rb.txt
ä¾¡æ ¼.com WEBãµã¼ãã¹ APIããªãªã¼ã¹ãããï¼ã¨ããããã§ä½ã£ã¦ã¿ã¾ãããã»ã¼ RakuAPI ã©ã¤ãã©ãªã®ã³ããã§ããã ãã¨ããâ¦ãããã¯ãªãã£ã·ã£ã«ãªãµã¼ãã¹ãªã®ã§ãã®ãã¡ rubyforge ã«ä¸ããâ¦ãã(ã³ã)ãã²ãã£ã¨ãããã¤ã³ã¿ã¼ãã§ã¤ã¹å¨ãå¤ãããããid:naoya ãä½ã£ã naoyaã®ã¯ã¦ãªãã¤ã¢ãªã¼ - WebService::KakakuCom ã§ä½¿ã£ã¦ã Data::Page ããªã«ãã便å©ãããªã®ã§ããã£ã½ããã¼ã¸ã£ã¯ã©ã¹ä½ãããã¼ã
使ãæ¹ã¯
require 'kakaku_com_api' require 'pp' $KCODE = 'u' k = KakakuComAPI.new results = k.search 'Sony', 'CategoryGroup' => 'Camera' puts "total_count: #{results.num_of_result}" results.items[0..1].each {|i| pp i }
ãªæãã§ãçµæã¯
total_count: 390 #<struct product_id="20203010268", product_name="HDR-HC3", maker_name="SONY", category_name="ã«ã¡ã©æ¬ä½>ãããªã«ã¡ã©", pv_ranking="1", image_url="http://img.kakaku.com/images/productimage/m/20203010268.jpg", item_page_url="http://kakaku.com/item/20203010268/", bbs_page_url="http://kakaku.com/bbs/Main.asp?PrdKey=20203010268", review_page_url= "http://kakaku.com/prdevaluate/evaluate.asp?PrdKey=20203010268", lowest_price=86699, num_of_bbs=3973> #<struct product_id="00502411015", product_name="ãµã¤ãã¼ã·ã§ãã DSC-T10", maker_name="SONY", category_name="ã«ã¡ã©æ¬ä½>ãã¸ã«ã¡", pv_ranking="11", image_url="http://img.kakaku.com/images/productimage/m/00502411015.jpg", item_page_url="http://kakaku.com/item/00502411015/", bbs_page_url="http://kakaku.com/bbs/Main.asp?PrdKey=00502411015", review_page_url= "http://kakaku.com/prdevaluate/evaluate.asp?PrdKey=00502411015", lowest_price=27290, num_of_bbs=257>