rakuten_web_service 1.13.1 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +6 -5
- data/.vscode/extensions.json +16 -0
- data/.vscode/launch.json +8 -23
- data/.vscode/tasks.json +46 -21
- data/CHANGELOG.md +12 -0
- data/Gemfile +0 -5
- data/README.ja.md +32 -28
- data/README.md +28 -28
- data/lib/rakuten_web_service/version.rb +1 -1
- data/rakuten_web_service.gemspec +5 -1
- data/spec/rakuten_web_service/books/genre_spec.rb +7 -7
- data/spec/rakuten_web_service/ichiba/genre_spec.rb +3 -3
- data/spec/rakuten_web_service/kobo/genre_spec.rb +2 -2
- data/spec/rakuten_web_service/travel/area_class_spec.rb +4 -4
- data/spec/rakuten_web_service/travel/search_result_spec.rb +1 -1
- metadata +47 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46ec77e5fefa6eb6f99db57352236b5317f93636320547475e80b6d693a226ec
|
4
|
+
data.tar.gz: ae715c5d998a04ad5ebff437d5782f44ab3212b35464679b2a456c18a262182c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66773e478cc94ebc3b692b61f4cdc269ea9faacd88e085e4ca0be86ce39209c097a90a795de7977e408bf3e5c545cf9c97f3fd5f4d84ad91883e139f169173f7
|
7
|
+
data.tar.gz: 96e2e34affcc1b4790d5a4d58851a39a0bbde8f66288fb3a1df00796476ca04aa1be6a2417c247829a2cfdf6cdbedb53096db29ec2a4002ee9d24f4cbbad6a38
|
data/.github/workflows/ci.yml
CHANGED
@@ -13,13 +13,14 @@ jobs:
|
|
13
13
|
strategy:
|
14
14
|
matrix:
|
15
15
|
ruby-version:
|
16
|
-
-
|
17
|
-
- 2
|
18
|
-
-
|
19
|
-
-
|
16
|
+
- 3.1
|
17
|
+
- 3.2
|
18
|
+
- 3.3
|
19
|
+
- 3.4
|
20
|
+
- head
|
20
21
|
|
21
22
|
steps:
|
22
|
-
- uses: actions/checkout@
|
23
|
+
- uses: actions/checkout@v4
|
23
24
|
- uses: ruby/setup-ruby@v1
|
24
25
|
env:
|
25
26
|
BUNDLE_WITHOUT: vscode
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
|
3
|
+
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
|
4
|
+
|
5
|
+
// List of extensions which should be recommended for users of this workspace.
|
6
|
+
"recommendations": [
|
7
|
+
"rebornix.ruby",
|
8
|
+
"hbenl.vscode-test-explorer",
|
9
|
+
"connorshea.vscode-ruby-test-adapter",
|
10
|
+
"KoichiSasada.vscode-rdbg"
|
11
|
+
],
|
12
|
+
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
|
13
|
+
"unwantedRecommendations": [
|
14
|
+
|
15
|
+
]
|
16
|
+
}
|
data/.vscode/launch.json
CHANGED
@@ -3,35 +3,20 @@
|
|
3
3
|
"configurations": [
|
4
4
|
{
|
5
5
|
"name": "Debug Local File",
|
6
|
-
"type": "
|
6
|
+
"type": "rdbg",
|
7
7
|
"request": "launch",
|
8
8
|
"cwd": "${workspaceRoot}",
|
9
|
-
"
|
9
|
+
"script": "${file}",
|
10
|
+
"useBundler": true,
|
11
|
+
"askParameters": true
|
10
12
|
},
|
11
13
|
{
|
12
|
-
"name": "RSpec -
|
13
|
-
"type": "
|
14
|
+
"name": "Debug with RSpec - active spec line only",
|
15
|
+
"type": "rdbg",
|
14
16
|
"request": "launch",
|
15
17
|
"cwd": "${workspaceRoot}",
|
16
|
-
"
|
17
|
-
"
|
18
|
-
},
|
19
|
-
{
|
20
|
-
"name": "RSpec - active spec file only",
|
21
|
-
"type": "Ruby",
|
22
|
-
"request": "launch",
|
23
|
-
"cwd": "${workspaceRoot}",
|
24
|
-
"program": "${workspaceRoot}/bin/rspec",
|
25
|
-
"args": [
|
26
|
-
"${file}"
|
27
|
-
]
|
28
|
-
},
|
29
|
-
{
|
30
|
-
"name": "RSpec - active spec line only",
|
31
|
-
"type": "Ruby",
|
32
|
-
"request": "launch",
|
33
|
-
"cwd": "${workspaceRoot}",
|
34
|
-
"program": "${workspaceRoot}/bin/rspec",
|
18
|
+
"script": "${workspaceRoot}/bin/rspec",
|
19
|
+
"useBundler": true,
|
35
20
|
"args": [
|
36
21
|
"${file}:${lineNumber}"
|
37
22
|
]
|
data/.vscode/tasks.json
CHANGED
@@ -1,55 +1,79 @@
|
|
1
1
|
{
|
2
2
|
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
3
3
|
// for the documentation about the tasks.json format
|
4
|
-
"version": "0.
|
4
|
+
"version": "2.0.0",
|
5
5
|
"command": "${workspaceRoot}/bin/rake",
|
6
|
-
"isShellCommand": true,
|
7
6
|
"tasks": [
|
8
7
|
{
|
9
|
-
"
|
10
|
-
"
|
8
|
+
"label": "build",
|
9
|
+
"type": "shell",
|
10
|
+
"command": "${workspaceRoot}/bin/rake",
|
11
|
+
"args": [
|
12
|
+
"build"
|
13
|
+
],
|
14
|
+
"problemMatcher": [],
|
15
|
+
"group": {
|
16
|
+
"_id": "build",
|
17
|
+
"isDefault": false
|
18
|
+
}
|
11
19
|
},
|
12
20
|
{
|
13
|
-
"
|
21
|
+
"label": "release",
|
22
|
+
"type": "shell",
|
23
|
+
"command": "${workspaceRoot}/bin/rake",
|
14
24
|
"args": [
|
25
|
+
"release",
|
15
26
|
"--trace"
|
16
|
-
]
|
27
|
+
],
|
28
|
+
"problemMatcher": []
|
17
29
|
},
|
18
30
|
{
|
19
|
-
"
|
20
|
-
"
|
21
|
-
"
|
22
|
-
"
|
23
|
-
|
31
|
+
"label": "spec",
|
32
|
+
"type": "shell",
|
33
|
+
"command": "${workspaceRoot}/bin/rake",
|
34
|
+
"args": [
|
35
|
+
"spec"
|
36
|
+
],
|
24
37
|
"problemMatcher": {
|
25
38
|
"owner": "ruby",
|
26
|
-
"fileLocation": [
|
39
|
+
"fileLocation": [
|
40
|
+
"relative",
|
41
|
+
"${workspaceRoot}"
|
42
|
+
],
|
27
43
|
"pattern": {
|
28
44
|
"regexp": "^rspec\\s+([\\./\\w]+):(\\d+)\\s+#\\s+(.+)$",
|
29
45
|
"file": 1,
|
30
46
|
"line": 2,
|
31
47
|
"message": 3
|
32
48
|
}
|
49
|
+
},
|
50
|
+
"group": {
|
51
|
+
"_id": "test",
|
52
|
+
"isDefault": false
|
33
53
|
}
|
34
54
|
},
|
35
55
|
{
|
36
|
-
"
|
37
|
-
"
|
56
|
+
"label": "Nearest Spec",
|
57
|
+
"type": "shell",
|
38
58
|
"command": "${workspaceRoot}/bin/rspec",
|
39
59
|
"args": [
|
40
60
|
"${file}:${lineNumber}"
|
41
|
-
]
|
61
|
+
],
|
62
|
+
"problemMatcher": []
|
42
63
|
},
|
43
64
|
{
|
44
|
-
"
|
45
|
-
"
|
65
|
+
"label": "Current Spec",
|
66
|
+
"type": "shell",
|
46
67
|
"command": "${workspaceRoot}/bin/rspec",
|
47
68
|
"args": [
|
48
69
|
"${file}"
|
49
70
|
],
|
50
71
|
"problemMatcher": {
|
51
72
|
"owner": "ruby",
|
52
|
-
"fileLocation": [
|
73
|
+
"fileLocation": [
|
74
|
+
"relative",
|
75
|
+
"${workspaceRoot}"
|
76
|
+
],
|
53
77
|
"pattern": {
|
54
78
|
"regexp": "^rspec\\s+([\\./\\w]+):(\\d+)\\s+#\\s+(.+)$",
|
55
79
|
"file": 1,
|
@@ -59,12 +83,13 @@
|
|
59
83
|
}
|
60
84
|
},
|
61
85
|
{
|
62
|
-
"
|
63
|
-
"
|
86
|
+
"label": "bunlde install",
|
87
|
+
"type": "shell",
|
64
88
|
"command": "bundle",
|
65
89
|
"args": [
|
66
90
|
"install"
|
67
|
-
]
|
91
|
+
],
|
92
|
+
"problemMatcher": []
|
68
93
|
}
|
69
94
|
]
|
70
95
|
}
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## v1.13.2 (2023/03/26)
|
4
|
+
|
5
|
+
### Improvements
|
6
|
+
|
7
|
+
- Fixes broken links in README for Japanese [#140](https://github.com/rakuten-ws/rws-ruby-sdk/pull/140)
|
8
|
+
- Fixes broken links in README [#141](https://github.com/rakuten-ws/rws-ruby-sdk/pull/141)
|
9
|
+
|
10
|
+
### Thanks
|
11
|
+
|
12
|
+
@ryosuke-endo gave the pull-request #140. This realized me that some links in README had been broken.
|
13
|
+
Thanks :tada:
|
14
|
+
|
3
15
|
## v1.13.1 (2021/09/02)
|
4
16
|
|
5
17
|
### Improvements
|
data/Gemfile
CHANGED
data/README.ja.md
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# RakutenWebService
|
2
2
|
|
3
|
-
[](https://travis-ci.org/rakuten-ws/rws-ruby-sdk)
|
4
3
|
[](http://badge.fury.io/rb/rakuten_web_service)
|
5
4
|
[](https://coveralls.io/github/rakuten-ws/rws-ruby-sdk?branch=master)
|
6
5
|
|
@@ -10,7 +9,7 @@ English version is [here](http://github.com/rakuten-ws/rws-ruby-sdk/blob/master/
|
|
10
9
|
|
11
10
|
## 前提条件
|
12
11
|
|
13
|
-
* Ruby
|
12
|
+
* Ruby 3.1 またはそれ以上のバージョンであること
|
14
13
|
|
15
14
|
## インストール方法
|
16
15
|
|
@@ -71,7 +70,7 @@ gem install rakuten_web_service
|
|
71
70
|
|
72
71
|
#### 環境変数
|
73
72
|
|
74
|
-
`application_id` と `affiliate_id` はそれぞれ、環境変数`RWS_APPLICATION_ID`と`
|
73
|
+
`application_id` と `affiliate_id` はそれぞれ、環境変数`RWS_APPLICATION_ID`と`RWS_AFFILIATE_ID`を定義することでも設定できる。
|
75
74
|
|
76
75
|
### 市場商品の検索
|
77
76
|
|
@@ -126,15 +125,15 @@ Genreクラスは、`children`や`parent`といったジャンル階層を辿る
|
|
126
125
|
### 市場商品ランキング
|
127
126
|
|
128
127
|
```ruby
|
129
|
-
ranking_by_age = RakutenWebService::Ichiba::Item.ranking(:age => 30, :sex => 1) # 30
|
128
|
+
ranking_by_age = RakutenWebService::Ichiba::Item.ranking(:age => 30, :sex => 1) # 30代女性 のランキングTOP 30
|
130
129
|
ranking_by_age.each do |ranking|
|
131
|
-
# 'itemName'以外の属性については右記を参照
|
132
|
-
puts
|
130
|
+
# 'itemName'以外の属性については右記を参照 https://webservice.rakuten.co.jp/documentation/ichiba-item-ranking#outputParameter
|
131
|
+
puts ranking.name
|
133
132
|
end
|
134
133
|
|
135
134
|
ranking_by_genre = RakutenWebService::Ichiba::Genre[200162].ranking # "水・ソフトドリンク" ジャンルのTOP 30
|
136
135
|
ranking_by_genre.each do |ranking|
|
137
|
-
puts
|
136
|
+
puts ranking.name
|
138
137
|
end
|
139
138
|
```
|
140
139
|
|
@@ -160,39 +159,44 @@ Genreクラスは、`children`や`parent`といったジャンル階層を辿る
|
|
160
159
|
|
161
160
|
### 楽天市場API
|
162
161
|
|
163
|
-
* [Rakuten Ichiba Item Search API](
|
164
|
-
* [Rakuten Ichiba Genre Search API](
|
165
|
-
* [Rakuten Ichiba Ranking API](
|
166
|
-
* [Rakuten Product API](
|
167
|
-
* [Rakuten Ichiba Tag Search API](https://webservice.rakuten.co.jp/
|
162
|
+
* [Rakuten Ichiba Item Search API](https://webservice.rakuten.co.jp/documentation/ichiba-item-search/)
|
163
|
+
* [Rakuten Ichiba Genre Search API](https://webservice.rakuten.co.jp/documentation/ichiba-genre-search/)
|
164
|
+
* [Rakuten Ichiba Ranking API](https://webservice.rakuten.co.jp/documentation/ichiba-item-ranking/)
|
165
|
+
* [Rakuten Product API](https://webservice.rakuten.co.jp/documentation/ichiba-product-search/)
|
166
|
+
* [Rakuten Ichiba Tag Search API](https://webservice.rakuten.co.jp/documentation/ichiba-tag-search/)
|
168
167
|
|
169
168
|
### 楽天ブックス系API
|
170
169
|
|
171
|
-
* [Rakuten Books Total Search API](
|
172
|
-
* [Rakuten Books Book Search API](
|
173
|
-
* [Rakuten Books CD Search API](
|
174
|
-
* [Rakuten Books DVD/Blu-ray Search API](
|
175
|
-
* [Rakuten Books ForeignBook Search API](
|
176
|
-
* [Rakuten Books Magazine Search API](
|
177
|
-
* [Rakuten Books Game Search API](
|
178
|
-
* [Rakuten Books Software Search API](
|
179
|
-
* [Rakuten Books Genre Search API](
|
170
|
+
* [Rakuten Books Total Search API](https://webservice.rakuten.co.jp/documentation/books-total-search/)
|
171
|
+
* [Rakuten Books Book Search API](https://webservice.rakuten.co.jp/documentation/books-book-search/)
|
172
|
+
* [Rakuten Books CD Search API](https://webservice.rakuten.co.jp/documentation/books-cd-search/)
|
173
|
+
* [Rakuten Books DVD/Blu-ray Search API](https://webservice.rakuten.co.jp/documentation/books-dvd-search/)
|
174
|
+
* [Rakuten Books ForeignBook Search API](https://webservice.rakuten.co.jp/documentation/books-foreign-search/)
|
175
|
+
* [Rakuten Books Magazine Search API](https://webservice.rakuten.co.jp/documentation/books-magazine-search/)
|
176
|
+
* [Rakuten Books Game Search API](https://webservice.rakuten.co.jp/documentation/books-game-search/)
|
177
|
+
* [Rakuten Books Software Search API](https://webservice.rakuten.co.jp/documentation/books-software-search/)
|
178
|
+
* [Rakuten Books Genre Search API](https://webservice.rakuten.co.jp/documentation/books-genre-search/)
|
180
179
|
|
181
180
|
### 楽天Kobo系API
|
182
181
|
|
183
|
-
* [楽天Kobo電子書籍検索API](
|
184
|
-
* [楽天Koboジャンル検索API](
|
182
|
+
* [楽天Kobo電子書籍検索API](https://webservice.rakuten.co.jp/documentation/kobo-ebook-search/)
|
183
|
+
* [楽天Koboジャンル検索API](https://webservice.rakuten.co.jp/documentation/kobo-genre-search/)
|
185
184
|
|
186
185
|
### 楽天レシピ系API
|
187
186
|
|
188
|
-
* [楽天レシピカテゴリ一覧API](https://webservice.rakuten.co.jp/
|
189
|
-
* [楽天レシピカテゴリ別ランキングAPI](https://webservice.rakuten.co.jp/
|
187
|
+
* [楽天レシピカテゴリ一覧API](https://webservice.rakuten.co.jp/documentation/recipe-category-list/)
|
188
|
+
* [楽天レシピカテゴリ別ランキングAPI](https://webservice.rakuten.co.jp/documentation/recipe-category-ranking/)
|
190
189
|
|
191
190
|
### 楽天GORA系API
|
192
191
|
|
193
|
-
* [楽天GORAゴルフ場検索API](https://webservice.rakuten.co.jp/
|
194
|
-
* [楽天GORAゴルフ場詳細API](https://webservice.rakuten.co.jp/
|
195
|
-
* [楽天GORAプラン検索API](https://webservice.rakuten.co.jp/
|
192
|
+
* [楽天GORAゴルフ場検索API](https://webservice.rakuten.co.jp/documentation/gora-golf-course-search/)
|
193
|
+
* [楽天GORAゴルフ場詳細API](https://webservice.rakuten.co.jp/documentation/gora-golf-course-detail/)
|
194
|
+
* [楽天GORAプラン検索API](https://webservice.rakuten.co.jp/documentation/gora-plan-search/)
|
195
|
+
|
196
|
+
### 楽天トラベル系APIs
|
197
|
+
|
198
|
+
* [楽天トラベル施設検索API](https://webservice.rakuten.co.jp/documentation/simple-hotel-search/)
|
199
|
+
* [楽天トラベル地区コードAPI](https://webservice.rakuten.co.jp/documentation/get-area-class/)
|
196
200
|
|
197
201
|
## Contributing
|
198
202
|
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# RakutenWebService
|
2
|
+
|
2
3
|
[](https://github.com/rakuten-ws/rws-ruby-sdk/actions?query=workflow%3ACI+branch%3Amaster)
|
3
|
-
[](https://travis-ci.org/rakuten-ws/rws-ruby-sdk)
|
4
4
|
[](https://badge.fury.io/rb/rakuten_web_service)
|
5
5
|
[](https://codeclimate.com/github/rakuten-ws/rws-ruby-sdk/coverage)
|
6
6
|
[](https://codeclimate.com/github/rakuten-ws/rws-ruby-sdk)
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
This gem provides a client for easily accessing [Rakuten Web Service APIs](https://webservice.rakuten.co.jp/).
|
10
10
|
|
11
|
-
日本語のドキュメントは[こちら](
|
11
|
+
日本語のドキュメントは[こちら](https://github.com/rakuten-ws/rws-ruby-sdk/blob/master/README.ja.md)。
|
12
12
|
|
13
13
|
## Table of Contents
|
14
14
|
|
@@ -32,7 +32,7 @@ This gem provides a client for easily accessing [Rakuten Web Service APIs](https
|
|
32
32
|
|
33
33
|
## Prerequisite
|
34
34
|
|
35
|
-
* Ruby
|
35
|
+
* Ruby 3.1 or later
|
36
36
|
|
37
37
|
## Installation
|
38
38
|
|
@@ -91,7 +91,7 @@ Please note that you need to replace `'YOUR_APPLICATION_ID'` and `'YOUR_AFFILIAT
|
|
91
91
|
|
92
92
|
#### Environment Variables
|
93
93
|
|
94
|
-
You can configure `application_id` and `affiliate_id` by defining environment variables `RWS_APPLICATION_ID` and `
|
94
|
+
You can configure `application_id` and `affiliate_id` by defining environment variables `RWS_APPLICATION_ID` and `RWS_AFFILIATE_ID`.
|
95
95
|
|
96
96
|
### Search Ichiba Items
|
97
97
|
|
@@ -147,7 +147,7 @@ Genre class provides an interface to traverse sub genres.
|
|
147
147
|
|
148
148
|
```ruby
|
149
149
|
ranking_by_age = RakutenWebService::Ichiba::Item.ranking(age: 30, sex: 1) # returns the TOP 30 items for Male in 30s
|
150
|
-
# For attributes other than 'itemName', see:
|
150
|
+
# For attributes other than 'itemName', see: https://webservice.rakuten.co.jp/documentation/ichibaitemsearch/#outputParameter
|
151
151
|
ranking_by_age.each do |ranking|
|
152
152
|
puts item.name
|
153
153
|
end
|
@@ -182,44 +182,44 @@ Now rakuten\_web\_service is supporting the following APIs:
|
|
182
182
|
|
183
183
|
### Rakuten Ichiba APIs
|
184
184
|
|
185
|
-
* [Rakuten Ichiba Item Search API](
|
186
|
-
* [Rakuten Ichiba Genre Search API](
|
187
|
-
* [Rakuten Ichiba Ranking API](
|
188
|
-
* [Rakuten Product API](
|
189
|
-
* [Rakuten Ichiba Tag Search API](https://webservice.rakuten.co.jp/
|
185
|
+
* [Rakuten Ichiba Item Search API](https://webservice.rakuten.co.jp/documentation/ichiba-item-search/)
|
186
|
+
* [Rakuten Ichiba Genre Search API](https://webservice.rakuten.co.jp/documentation/ichiba-genre-search/)
|
187
|
+
* [Rakuten Ichiba Ranking API](https://webservice.rakuten.co.jp/documentation/ichiba-item-ranking/)
|
188
|
+
* [Rakuten Product API](https://webservice.rakuten.co.jp/documentation/ichiba-product-search/)
|
189
|
+
* [Rakuten Ichiba Tag Search API](https://webservice.rakuten.co.jp/documentation/ichiba-tag-search/)
|
190
190
|
|
191
191
|
### Rakuten Books APIs
|
192
192
|
|
193
|
-
* [Rakuten Books Total Search API](
|
194
|
-
* [Rakuten Books Book Search API](
|
195
|
-
* [Rakuten Books CD Search API](
|
196
|
-
* [Rakuten Books DVD/Blu-ray Search API](
|
197
|
-
* [Rakuten Books ForeignBook Search API](
|
198
|
-
* [Rakuten Books Magazine Search API](
|
199
|
-
* [Rakuten Books Game Search API](
|
200
|
-
* [Rakuten Books Software Search API](
|
201
|
-
* [Rakuten Books Genre Search API](
|
193
|
+
* [Rakuten Books Total Search API](https://webservice.rakuten.co.jp/documentation/books-total-search/)
|
194
|
+
* [Rakuten Books Book Search API](https://webservice.rakuten.co.jp/documentation/books-book-search/)
|
195
|
+
* [Rakuten Books CD Search API](https://webservice.rakuten.co.jp/documentation/books-cd-search/)
|
196
|
+
* [Rakuten Books DVD/Blu-ray Search API](https://webservice.rakuten.co.jp/documentation/books-dvd-search/)
|
197
|
+
* [Rakuten Books ForeignBook Search API](https://webservice.rakuten.co.jp/documentation/books-foreign-search/)
|
198
|
+
* [Rakuten Books Magazine Search API](https://webservice.rakuten.co.jp/documentation/books-magazine-search/)
|
199
|
+
* [Rakuten Books Game Search API](https://webservice.rakuten.co.jp/documentation/books-game-search/)
|
200
|
+
* [Rakuten Books Software Search API](https://webservice.rakuten.co.jp/documentation/books-software-search/)
|
201
|
+
* [Rakuten Books Genre Search API](https://webservice.rakuten.co.jp/documentation/books-genre-search/)
|
202
202
|
|
203
203
|
### Rakuten Kobo APIs
|
204
204
|
|
205
|
-
* [Rakuten Kobo Ebook Search API](
|
206
|
-
* [Rakuten Kobo Genre Search API](
|
205
|
+
* [Rakuten Kobo Ebook Search API](https://webservice.rakuten.co.jp/documentation/kobo-ebook-search/)
|
206
|
+
* [Rakuten Kobo Genre Search API](https://webservice.rakuten.co.jp/documentation/kobo-genre-search/)
|
207
207
|
|
208
208
|
### Rakuten Recipe APIs
|
209
209
|
|
210
|
-
* [Rakuten Recipe Category List API](https://webservice.rakuten.co.jp/
|
211
|
-
* [Rakuten Recipe Category Ranking API](https://webservice.rakuten.co.jp/
|
210
|
+
* [Rakuten Recipe Category List API](https://webservice.rakuten.co.jp/documentation/recipe-category-list/)
|
211
|
+
* [Rakuten Recipe Category Ranking API](https://webservice.rakuten.co.jp/documentation/recipe-category-ranking/)
|
212
212
|
|
213
213
|
### Rakuten GORA APIs
|
214
214
|
|
215
|
-
* [Rakuten GORA Golf Course Search API](https://webservice.rakuten.co.jp/
|
216
|
-
* [Rakuten GORA Golf Course Detail Search API](https://webservice.rakuten.co.jp/
|
217
|
-
* [Rakuten GORA Plan Search API](https://webservice.rakuten.co.jp/
|
215
|
+
* [Rakuten GORA Golf Course Search API](https://webservice.rakuten.co.jp/documentation/gora-golf-course-search/)
|
216
|
+
* [Rakuten GORA Golf Course Detail Search API](https://webservice.rakuten.co.jp/documentation/gora-golf-course-detail/)
|
217
|
+
* [Rakuten GORA Plan Search API](https://webservice.rakuten.co.jp/documentation/gora-plan-search/)
|
218
218
|
|
219
219
|
### Rakuten Travel APIs
|
220
220
|
|
221
|
-
* [Rakuten Travel Simple Hotel API](https://webservice.rakuten.co.jp/
|
222
|
-
* [Rakuten Travel Get Area Class API](https://webservice.rakuten.co.jp/
|
221
|
+
* [Rakuten Travel Simple Hotel API](https://webservice.rakuten.co.jp/documentation/simple-hotel-search/)
|
222
|
+
* [Rakuten Travel Get Area Class API](https://webservice.rakuten.co.jp/documentation/get-area-class/)
|
223
223
|
|
224
224
|
## Contributing
|
225
225
|
|
data/rakuten_web_service.gemspec
CHANGED
@@ -15,10 +15,14 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.files = `git ls-files`.split($/)
|
16
16
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
17
17
|
spec.require_paths = ['lib']
|
18
|
-
spec.required_ruby_version = '>=
|
18
|
+
spec.required_ruby_version = '>= 3.1.0'
|
19
19
|
|
20
|
+
spec.add_dependency 'base64', '~> 0.2'
|
21
|
+
spec.add_dependency 'bigdecimal', '~> 3.1'
|
20
22
|
spec.add_dependency 'json', '~> 2.3'
|
23
|
+
|
21
24
|
spec.add_development_dependency 'bundler'
|
25
|
+
spec.add_development_dependency 'debug'
|
22
26
|
spec.add_development_dependency 'rake', '~> 13.0'
|
23
27
|
spec.add_development_dependency 'rexml', '~> 3.2'
|
24
28
|
spec.add_development_dependency 'rspec', '~> 3.9'
|
@@ -122,7 +122,7 @@ describe RWS::Books::Genre do
|
|
122
122
|
let(:genre_id) { '001001' }
|
123
123
|
|
124
124
|
specify 'delegate Books::Book.search' do
|
125
|
-
expect(RWS::Books::Book).to receive(:search).with(booksGenreId: genre_id)
|
125
|
+
expect(RWS::Books::Book).to receive(:search).with({booksGenreId: genre_id})
|
126
126
|
|
127
127
|
@genre.search
|
128
128
|
end
|
@@ -132,7 +132,7 @@ describe RWS::Books::Genre do
|
|
132
132
|
let(:genre_id) { '002101' }
|
133
133
|
|
134
134
|
specify 'delegate Books::CD.search' do
|
135
|
-
expect(RWS::Books::CD).to receive(:search).with(booksGenreId: genre_id)
|
135
|
+
expect(RWS::Books::CD).to receive(:search).with({booksGenreId: genre_id})
|
136
136
|
|
137
137
|
@genre.search
|
138
138
|
end
|
@@ -142,7 +142,7 @@ describe RWS::Books::Genre do
|
|
142
142
|
let(:genre_id) { '003201' }
|
143
143
|
|
144
144
|
specify 'delegate Books::DVD.search' do
|
145
|
-
expect(RWS::Books::DVD).to receive(:search).with(booksGenreId: genre_id)
|
145
|
+
expect(RWS::Books::DVD).to receive(:search).with({booksGenreId: genre_id})
|
146
146
|
|
147
147
|
@genre.search
|
148
148
|
end
|
@@ -152,7 +152,7 @@ describe RWS::Books::Genre do
|
|
152
152
|
let(:genre_id) { '004301' }
|
153
153
|
|
154
154
|
specify 'delegate Books::Software.search' do
|
155
|
-
expect(RWS::Books::Software).to receive(:search).with(booksGenreId: genre_id)
|
155
|
+
expect(RWS::Books::Software).to receive(:search).with({booksGenreId: genre_id})
|
156
156
|
|
157
157
|
@genre.search
|
158
158
|
end
|
@@ -162,7 +162,7 @@ describe RWS::Books::Genre do
|
|
162
162
|
let(:genre_id) { '005401' }
|
163
163
|
|
164
164
|
specify 'delegate Books::ForeignBook.search' do
|
165
|
-
expect(RWS::Books::ForeignBook).to receive(:search).with(booksGenreId: genre_id)
|
165
|
+
expect(RWS::Books::ForeignBook).to receive(:search).with({booksGenreId: genre_id})
|
166
166
|
|
167
167
|
@genre.search
|
168
168
|
end
|
@@ -172,7 +172,7 @@ describe RWS::Books::Genre do
|
|
172
172
|
let(:genre_id) { '006501' }
|
173
173
|
|
174
174
|
specify 'delegate Books::Game.search' do
|
175
|
-
expect(RWS::Books::Game).to receive(:search).with(booksGenreId: genre_id)
|
175
|
+
expect(RWS::Books::Game).to receive(:search).with({booksGenreId: genre_id})
|
176
176
|
|
177
177
|
@genre.search
|
178
178
|
end
|
@@ -182,7 +182,7 @@ describe RWS::Books::Genre do
|
|
182
182
|
let(:genre_id) { '007601' }
|
183
183
|
|
184
184
|
specify 'delegate Books::Magazine.search' do
|
185
|
-
expect(RWS::Books::Magazine).to receive(:search).with(booksGenreId: genre_id)
|
185
|
+
expect(RWS::Books::Magazine).to receive(:search).with({booksGenreId: genre_id})
|
186
186
|
|
187
187
|
@genre.search
|
188
188
|
end
|
@@ -188,11 +188,11 @@ describe RakutenWebService::Ichiba::Genre do
|
|
188
188
|
end
|
189
189
|
|
190
190
|
specify "should call RankingItem's search with genre_id option" do
|
191
|
-
expect(RakutenWebService::Ichiba::RankingItem).to receive(:search).with(genre_id: genre_id)
|
191
|
+
expect(RakutenWebService::Ichiba::RankingItem).to receive(:search).with({genre_id: genre_id})
|
192
192
|
expect { genre.ranking }.to_not raise_error
|
193
193
|
end
|
194
194
|
specify "should call RankingItem's search with genre_id and given options" do
|
195
|
-
expect(RakutenWebService::Ichiba::RankingItem).to receive(:search).with(genre_id: genre_id, age: 10)
|
195
|
+
expect(RakutenWebService::Ichiba::RankingItem).to receive(:search).with({genre_id: genre_id, age: 10})
|
196
196
|
expect { genre.ranking(age: 10) }.to_not raise_error
|
197
197
|
end
|
198
198
|
end
|
@@ -206,7 +206,7 @@ describe RakutenWebService::Ichiba::Genre do
|
|
206
206
|
end
|
207
207
|
|
208
208
|
specify "should call Product search with genre_id option" do
|
209
|
-
expect(RakutenWebService::Ichiba::Product).to receive(:search).with(genre_id: genre_id)
|
209
|
+
expect(RakutenWebService::Ichiba::Product).to receive(:search).with({genre_id: genre_id})
|
210
210
|
expect { genre.products }.to_not raise_error
|
211
211
|
end
|
212
212
|
end
|
@@ -46,7 +46,7 @@ describe RWS::Kobo::Genre do
|
|
46
46
|
|
47
47
|
context 'Without arguments' do
|
48
48
|
specify 'should call RWS::Kobo::Ebook.search with specifying genre id' do
|
49
|
-
expect(RWS::Kobo::Ebook).to receive(:search).with(RWS::Kobo::Genre.genre_id_key => genre_id)
|
49
|
+
expect(RWS::Kobo::Ebook).to receive(:search).with({RWS::Kobo::Genre.genre_id_key => genre_id})
|
50
50
|
|
51
51
|
RWS::Kobo::Genre.root.search
|
52
52
|
end
|
@@ -54,7 +54,7 @@ describe RWS::Kobo::Genre do
|
|
54
54
|
context 'With arguments' do
|
55
55
|
specify 'should call RWS::Kobo::Ebook.search with given arguments and genre id' do
|
56
56
|
options = { title: 'Ruby' }
|
57
|
-
expect(RWS::Kobo::Ebook).to receive(:search).with(title: 'Ruby', RWS::Kobo::Genre.genre_id_key => genre_id)
|
57
|
+
expect(RWS::Kobo::Ebook).to receive(:search).with({title: 'Ruby', RWS::Kobo::Genre.genre_id_key => genre_id})
|
58
58
|
|
59
59
|
RWS::Kobo::Genre.root.search(options)
|
60
60
|
end
|
@@ -96,19 +96,19 @@ describe RakutenWebService::Travel::AreaClass do
|
|
96
96
|
let(:area_class) { RakutenWebService::Travel::AreaClass['sapporo'] }
|
97
97
|
|
98
98
|
specify 'pass area class codes to the simple hotel API' do
|
99
|
-
expect(RakutenWebService::Travel::Hotel).to receive(:search).with(
|
99
|
+
expect(RakutenWebService::Travel::Hotel).to receive(:search).with({
|
100
100
|
'largeClassCode' => 'japan', 'middleClassCode' => 'hokkaido', 'smallClassCode' => 'sapporo'
|
101
|
-
)
|
101
|
+
})
|
102
102
|
|
103
103
|
area_class.search()
|
104
104
|
end
|
105
105
|
|
106
106
|
context 'Giving params' do
|
107
107
|
specify 'pass area class codes with the given params to the simple hotel API' do
|
108
|
-
expect(RakutenWebService::Travel::Hotel).to receive(:search).with(
|
108
|
+
expect(RakutenWebService::Travel::Hotel).to receive(:search).with({
|
109
109
|
'largeClassCode' => 'japan', 'middleClassCode' => 'hokkaido', 'smallClassCode' => 'sapporo',
|
110
110
|
'responseType' => 'large'
|
111
|
-
)
|
111
|
+
})
|
112
112
|
|
113
113
|
area_class.search('responseType' => 'large')
|
114
114
|
end
|
@@ -57,7 +57,7 @@ describe RakutenWebService::Travel::SearchResult do
|
|
57
57
|
end
|
58
58
|
|
59
59
|
it 'shold call search to fetch next page results.' do
|
60
|
-
expect(search_result).to receive(:search).with('page' => 3)
|
60
|
+
expect(search_result).to receive(:search).with({'page' => 3})
|
61
61
|
|
62
62
|
search_result.next_page
|
63
63
|
end
|
metadata
CHANGED
@@ -1,15 +1,42 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rakuten_web_service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tatsuya Sato
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-04-17 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
12
|
+
- !ruby/object:Gem::Dependency
|
13
|
+
name: base64
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - "~>"
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '0.2'
|
19
|
+
type: :runtime
|
20
|
+
prerelease: false
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - "~>"
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: '0.2'
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: bigdecimal
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - "~>"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '3.1'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '3.1'
|
13
40
|
- !ruby/object:Gem::Dependency
|
14
41
|
name: json
|
15
42
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,6 +65,20 @@ dependencies:
|
|
38
65
|
- - ">="
|
39
66
|
- !ruby/object:Gem::Version
|
40
67
|
version: '0'
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: debug
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
type: :development
|
76
|
+
prerelease: false
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
41
82
|
- !ruby/object:Gem::Dependency
|
42
83
|
name: rake
|
43
84
|
requirement: !ruby/object:Gem::Requirement
|
@@ -133,6 +174,7 @@ files:
|
|
133
174
|
- ".github/FUNDING.yml"
|
134
175
|
- ".github/workflows/ci.yml"
|
135
176
|
- ".gitignore"
|
177
|
+
- ".vscode/extensions.json"
|
136
178
|
- ".vscode/launch.json"
|
137
179
|
- ".vscode/tasks.json"
|
138
180
|
- CHANGELOG.md
|
@@ -262,7 +304,6 @@ homepage: http://webservice.rakuten.co.jp/
|
|
262
304
|
licenses:
|
263
305
|
- MIT
|
264
306
|
metadata: {}
|
265
|
-
post_install_message:
|
266
307
|
rdoc_options: []
|
267
308
|
require_paths:
|
268
309
|
- lib
|
@@ -270,15 +311,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
270
311
|
requirements:
|
271
312
|
- - ">="
|
272
313
|
- !ruby/object:Gem::Version
|
273
|
-
version:
|
314
|
+
version: 3.1.0
|
274
315
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
275
316
|
requirements:
|
276
317
|
- - ">="
|
277
318
|
- !ruby/object:Gem::Version
|
278
319
|
version: '0'
|
279
320
|
requirements: []
|
280
|
-
rubygems_version: 3.
|
281
|
-
signing_key:
|
321
|
+
rubygems_version: 3.6.2
|
282
322
|
specification_version: 4
|
283
323
|
summary: Ruby Client for Rakuten Web Service
|
284
324
|
test_files:
|