Project

yahoo-api

0.01
No release in over 3 years
Low commit activity in last 3 years
Ruby Yahoo Japan Web API ( Shopping,Auction,News )
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0
>= 0
= 1.11.0

Runtime

 Project Readme

Yahoo::Api

Gem Version 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'

# configure
Yahoo::Api.configure do |options|
  options[:appid] = 'your api id'
  options[:affiliate_type] = "vc or yid"
  options[:affiliate_id] = "your affiliate id"
end

# Item Search API v1
res = Yahoo::Api.get(Yahoo::Api::Shopping::ItemSearch,{:category_id => "13457"})
res.code # 200
res.message # "OK"
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 Shopping Web API
Yahoo::Api::Shopping::ItemSearch          # Item Search API v1
Yahoo::Api::Shopping::CategoryRanking     # Category Ranking API v1
Yahoo::Api::Shopping::CategorySearch      # Category Search API v1
Yahoo::Api::Shopping::ItemLookup          # Item Lookup API v1 
Yahoo::Api::Shopping::QueryRanking        # Query Ranking API v1
Yahoo::Api::Shopping::ContentMatchItem    # Content Match Item API v1 
Yahoo::Api::Shopping::ContentMatchRanking # Content Match Ranking API v1
Yahoo::Api::Shopping::GetModule           # Get Module API v1
Yahoo::Api::Shopping::EventSearch         # Event Search API v1
Yahoo::Api::Shopping::ReviewSearch        # Review Search API v1
# Yahoo Auction Web API
Yahoo::Api::Auction::CategoryTree     # Category Tree API v2
Yahoo::Api::Auction::CategoryLeaf     # Category Leaf API v2
Yahoo::Api::Auction::SellingList      # Selling List API v2
Yahoo::Api::Auction::Search           # Search API v2
Yahoo::Api::Auction::Item             # Item API v2
Yahoo::Api::Auction::BidHistory       # Bid History API v1
Yahoo::Api::Auction::BidHistoryDetail # Bid History Detail API v1
Yahoo::Api::Auction::ShowQAndA        # Show Q & A API v1
Yahoo::Api::Auction::ShowRating       # Show Rating API v1
# Yahoo News Web API
Yahoo::Api::News::Topics   # Topics API v2

Refer to Shopping Web API documentation,Auction Web API documentation,News Web API documentation for more infomation.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request