Project

api_bucket

0.0
No commit activity in last 3 years
No release in over 3 years
We can use sevral APIs with common interface.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.8.0

Runtime

 Project Readme

ApiBucket

Gem Version

We can use sevral APIs with common interface.

  • APIs
    • Amazon ECS
    • iTunes
    • Rakuten(楽天)
    • Yahoo Auction

Installation

Add this line to your application's Gemfile:

gem 'api_bucket'

And then execute:

$ bundle

Or install it yourself as:

$ gem install api_bucket

Usage

use Amazon

  • search items
require 'api_bucket'
require 'api_bucket/amazon'

ApiBucket::Amazon.configure do |o|
    o.a_w_s_access_key_id = 'hogehoge'
    o.a_w_s_secret_key    = 'mogemoge'
    o.associate_tag       = 'nakajijapan'
end

service = ApiBucket::Service::instance(:amazon)
res = service.search('ruby')

res.items.each do |item|
  p item.product_code
  p item.title
end
  • lookup item
require 'api_bucket'
require 'api_bucket/amazon'

ApiBucket::Amazon.configure do |o|
    o.a_w_s_access_key_id = 'hogehoge'
    o.a_w_s_secret_key    = 'mogemoge'
    o.associate_tag       = 'nakajijapan'
end

service = ApiBucket::Service::instance(:amazon)
res = service.lookup('p1234567890')

p res.first_item.product_code
p res.first_item.title

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