Yahoo::Api
Ruby Yahoo Japan Web API ( Shopping,Auction,News supported )
Installation
Add this line to your application's Gemfile:
gem 'yahoo-api'
And then execute:
$ bundle
Or install it yourself as:
$ gem install yahoo-api
Usage
require 'yahoo/api'
Yahoo::Api.configure do |options|
options[:appid] = 'your api id'
options[:affiliate_type] = "vc or yid"
options[:affiliate_id] = "your affiliate id"
end
res = Yahoo::Api.get(Yahoo::Api::Shopping::ItemSearch,{:category_id => "13457"})
res.code
res.message
res["ResultSet"]["totalResultsReturned"].times do |i|
code = res["ResultSet"]["0"]["Result"]["#{i}"]["Code"]
...
end
or
res["ResultSet"]["0"]["Result"].each do |i,v|
next unless i =~ /\d+/
code = v["Code"]
...
end
See the examples directory for more usage.
Yahoo::Api::Shopping::ItemSearch
Yahoo::Api::Shopping::CategoryRanking
Yahoo::Api::Shopping::CategorySearch
Yahoo::Api::Shopping::ItemLookup
Yahoo::Api::Shopping::QueryRanking
Yahoo::Api::Shopping::ContentMatchItem
Yahoo::Api::Shopping::ContentMatchRanking
Yahoo::Api::Shopping::GetModule
Yahoo::Api::Shopping::EventSearch
Yahoo::Api::Shopping::ReviewSearch
Yahoo::Api::Auction::CategoryTree
Yahoo::Api::Auction::CategoryLeaf
Yahoo::Api::Auction::SellingList
Yahoo::Api::Auction::Search
Yahoo::Api::Auction::Item
Yahoo::Api::Auction::BidHistory
Yahoo::Api::Auction::BidHistoryDetail
Yahoo::Api::Auction::ShowQAndA
Yahoo::Api::Auction::ShowRating
Yahoo::Api::News::Topics
Refer to Shopping Web API documentation,Auction Web API documentation,News Web API documentation for more infomation.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request