0.01
No commit activity in last 3 years
No release in over 3 years
Ruby wrapper for RMS Web Service.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.6
~> 10.0
>= 0

Runtime

 Project Readme

RmsWebService

RMS Webservice APIのRubyラッパーです。

Gem Version Build Status Coverage Status Code Climate

ご注意

  • 楽天市場出店者のみが利用できるAPIです。
  • 現在一部機能のみサポートしています。
  • 非公式です。

Installation

Add this line to your application's Gemfile:

gem 'rms_web_service'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rms_web_service

Usage

現在、itemAPIのみサポートしています。パラメータについては公式ドキュメントを参照してください。

サービスIDとライセンスキーを設定したクライアントインスタンスを生成します。各キーはRMSより発行できます。

client = RmsWebService::Client::Item.new(service_secret: "dummy_service_secret", license_key: "dummy_license_key")

RmsWebService::Client::Item

RmsWebService::Client::ItemのインスタンスがAPIの各メソッドを持っています。各メソッドへのパラメータの渡し方は下記の通りです。

item = client.get("ed-60c-w")
# '.item_name'、'.item_price'等のメソッドを持ちます。属性については公式ドキュメントを見てください。

item = client.delete("test001")
# '.success?'で成功したかどうかを判別できます。'.errors'でエラー内容を確認できます。

item = client.update({:item_url => "ed-60c-w", :item_price => 43800})
# '.success?'で成功したかどうかを判別できます。'.errors'でエラー内容を確認できます。

item = client.insert({
  :item_url => "test001",
  :item_name => "test001",
  :item_price => "100000",
  :genre_id => "211889",
})
# '.success?'で成功したかどうかを判別できます。'.errors'でエラー内容を確認できます。

items = client.search(:item_name => "空気清浄機")
# item.getと同じ性質のインスタンスを要素として持つ配列を返します

items = client.items_update([
  {:item_url => "ed-60c-w", :item_price => 43800},
  {:item_url => "noexist", :item_price => 10800}
])
# item.updateと同じ性質のインスタンスを要素として持つ配列を返します

Contributing

  1. Fork it ( https://github.com/[my-github-username]/rms_web_service/fork )
  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 a new Pull Request