README.md in rakuten_web_service-1.12.0 vs README.md in rakuten_web_service-1.13.0
- old
+ new
@@ -6,10 +6,12 @@
[![Code Climate](https://codeclimate.com/github/rakuten-ws/rws-ruby-sdk/badges/gpa.svg)](https://codeclimate.com/github/rakuten-ws/rws-ruby-sdk)
[![Gitter](https://badges.gitter.im/rakuten-ws/rws-ruby-sdk.svg)](https://gitter.im/rakuten-ws/rws-ruby-sdk?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
This gem provides a client for easily accessing [Rakuten Web Service APIs](https://webservice.rakuten.co.jp/).
+日本語のドキュメントは[こちら](http://github.com/rakuten-ws/rws-ruby-sdk/blob/master/README.ja.md)。
+
## Table of Contents
* [Prerequisite](#prerequisite)
* [Installation](#installation)
* [Usage](#usage)
@@ -28,27 +30,31 @@
* [Rakuten Travel APIs](#rakuten-travel-apis)
* [Contributing](#contributing)
## Prerequisite
-* Ruby 2.3 or later
+* Ruby 2.5 or later
## Installation
Add this line to your application's Gemfile:
```ruby
- gem 'rakuten_web_service'
+gem 'rakuten_web_service'
```
And then execute:
- bundle
+```sh
+bundle
+```
Or install it yourself as:
- gem install rakuten_web_service
+```sh
+gem install rakuten_web_service
+```
## Usage
### Prerequisite: Getting Application ID
@@ -141,15 +147,33 @@
```ruby
ranking_by_age = RakutenWebService::Ichiba::Item.ranking(age: 30, sex: 1) # returns the TOP 30 items for Male in 30s
# For attributes other than 'itemName', see: http://webservice.rakuten.co.jp/api/ichibaitemsearch/#outputParameter
ranking_by_age.each do |ranking|
- puts ranking['itemName']
+ puts item.name
end
ranking_by_genre = RakutenWebService::Ichiba::Genre[200162].ranking # the TOP 30 items in "水・ソフトドリンク" genre
ranking_by_genre.each do |ranking|
- puts ranking['itemName']
+ puts item.name
+ end
+```
+
+### Recipe
+
+```ruby
+ categories = RakutenWebService::Recipe.small_categories
+
+ # Search all small recipe categories.
+ categories.each do |category|
+ category.name
+ end
+
+ recipes = categories.first.ranking
+
+ # Search category recipes.
+ recipes.each do |recipe|
+ recipe.title
end
```
## Supported APIs