paapi_mini 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -2
- data/README.md +9 -1
- data/README_ja.md +71 -0
- data/lib/paapi_mini/version.rb +1 -1
- data/paapi_mini.gemspec +2 -4
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfa81bc3ad71a47ac87fda46f71976fe96b5173261653f54695721b225b8b704
|
4
|
+
data.tar.gz: 4a2d508ca72543ec3844f81f01d05e22eb766ead8b20dcdfbefab607fec98c11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b7b4708d4344cc21aa123a2c450a695f586e706db0efd27ab61e50cf8b82b03be4c0907e919c0dc11544369ea01da8551f476d4f4550fffbc6ac3ea109a6baf
|
7
|
+
data.tar.gz: 6dd0a0012b6bf9b59bddc702cf55f37c1d3012062e3fd24db7186c0a9a33d2a5b9d5c86b3d93ea70a945acefd1a4acf748b6af0e2b50a15c991544c048ad3f2a
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# PaapiMini
|
2
2
|
|
3
|
+
* For Japanese [README_ja.md](./README_ja.md)
|
3
4
|
* This is a Gem for easy Amazon product search.<br>
|
4
5
|
Before using it, you need to pass Amazon Associate review and get ACCESS_KEY etc. as preparation.
|
5
6
|
* [Amazon Product Advertising API 5.0](https://webservices.amazon.com/paapi5/documentation/) is supported.
|
@@ -60,4 +61,11 @@ Or install it yourself as:
|
|
60
61
|
|
61
62
|
## License
|
62
63
|
|
63
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
64
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
65
|
+
|
66
|
+
## If you like this Gem, I'd be happy to help.
|
67
|
+
|
68
|
+
* Development is currently suspended. This is because the API response results in an error if no Amazon Associate sales results are generated for 30 days.
|
69
|
+
* If you like this Gem, we would appreciate it if you could buy Amazon products from [this link](https://amzn.to/3Ta7pvV).
|
70
|
+
* It doesn't matter what the price is, it doesn't matter if it is another product that you followed from this link.
|
71
|
+
* Once we have achieved sales and the API restrictions are released, we would like to implement other API support such as get_items, etc.
|
data/README_ja.md
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
# PaapiMini
|
2
|
+
|
3
|
+
* 英語用READMEはこちら [README.md](./README.md)
|
4
|
+
* このGemhaAmazonの商品検索を行います。<br>
|
5
|
+
使用前にAmazonアソシエイト審査に合格し、アクセスキーなどの発行をしておく必要があります。
|
6
|
+
* [Amazon Product Advertising API 5.0](https://webservices.amazon.com/paapi5/documentation/)をサポートしています。
|
7
|
+
* このGemはRuby標準ライブラリのみで実装されています。このため他のGemに依存することなく利用することができます。
|
8
|
+
|
9
|
+
* rbenvを使って以下のRubyバージョンでテストを行いました。
|
10
|
+
```
|
11
|
+
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin20]
|
12
|
+
ruby 3.0.0rc1 (2020-12-20 master 8680ae9cbd) [x86_64-darwin20]
|
13
|
+
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin21]
|
14
|
+
```
|
15
|
+
* Windows環境ではテストできていません。<br>
|
16
|
+
また、筆者のAmazonアソシエイト審査はAmazon.co.jpで行われているため、この地域からのテストしかできません。<br>
|
17
|
+
そのため、APIのデフォルト動作はAmazon.co.jpになっています。引数で変更することは可能です。<br>
|
18
|
+
Windows版やAmazon.co.jp以外の地域で動作が確認できた場合は、フィードバックしていただけると幸いです。
|
19
|
+
|
20
|
+
## インストール
|
21
|
+
|
22
|
+
アプリケーションのGemfileに次の行を追加します。
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
gem 'paapi_mini'
|
26
|
+
```
|
27
|
+
|
28
|
+
And then execute:
|
29
|
+
|
30
|
+
$ bundle install
|
31
|
+
|
32
|
+
Or install it yourself as:
|
33
|
+
|
34
|
+
$ gem install paapi_mini
|
35
|
+
|
36
|
+
## 使い方
|
37
|
+
|
38
|
+
```ruby
|
39
|
+
require 'paapi_mini'
|
40
|
+
|
41
|
+
# search_items メソッドのキーワード引数で、条件を絞り込むことができる。
|
42
|
+
# search_itemsの詳細はAmazon公式サイトをご参照ください。
|
43
|
+
# 参考 https://webservices.amazon.com/paapi5/documentation/search-items.html
|
44
|
+
# 各引数のデフォルト値
|
45
|
+
# item_page: 1,
|
46
|
+
# min_price: 1,
|
47
|
+
# max_price: 100000,
|
48
|
+
# min_review_rating: 1,
|
49
|
+
# host: "webservices.amazon.co.jp",
|
50
|
+
# region: "us-west-2",
|
51
|
+
# market_place: "www.amazon.co.jp"
|
52
|
+
|
53
|
+
res = PaapiMini::search_items(ENV['ACCESS_KEY'], ENV['SECRET_KEY'], ENV['PARTNER_TAG'],
|
54
|
+
keywords: "Ruby", min_review_rating: 3)
|
55
|
+
|
56
|
+
# res は Net::HTTPResponse オブジェクトです。
|
57
|
+
# Net::HTTPResponseについては、Ruby公式リファレンスマニュアルを参照ください。 https://docs.ruby-lang.org/
|
58
|
+
puts res.code
|
59
|
+
puts res.body
|
60
|
+
```
|
61
|
+
|
62
|
+
## ライセンス
|
63
|
+
|
64
|
+
このGemのライセンスは [MIT License](https://opensource.org/licenses/MIT)となります。
|
65
|
+
|
66
|
+
## このGemが気に入ってくれたら、助けてくれると嬉しいです。
|
67
|
+
|
68
|
+
* 現在、開発が停止しています。 Amazonアソシエイトの販売実績が30日間発生しないと、APIの応答結果がエラーになってしまうためです。
|
69
|
+
* もしこのGemを気に入ってくれた方がいましたら、[こちらのリンク](https://amzn.to/3Ta7pvV)からAmazon商品を買っていただけると助かります。
|
70
|
+
* 値段は関係なく、このリンクから辿った別の商品でも問題ないです。
|
71
|
+
* 販売実績を達成しAPI制限が解放されたら、get_itemsなど他のAPIサポートなどの実装を行いたいと思います。
|
data/lib/paapi_mini/version.rb
CHANGED
data/paapi_mini.gemspec
CHANGED
@@ -9,16 +9,14 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.email = ["osio.toshimasa@gmail.com"]
|
10
10
|
|
11
11
|
spec.summary = "Amazon SearchItems By Amazon Advertising Product API."
|
12
|
-
spec.description = "paapi_mini is PA-API5.0 client.
|
12
|
+
spec.description = "paapi_mini is PA-API5.0 client. This Gem is implemented using only the Ruby standard library, so it does not depend on other Gems. supported by searchItems api only."
|
13
13
|
spec.homepage = "https://github.com/osio-toshimasa/paapi_mini"
|
14
14
|
spec.license = "MIT"
|
15
15
|
spec.required_ruby_version = ">= 2.7.0"
|
16
16
|
|
17
|
-
# spec.metadata["allowed_push_host"] = ""
|
18
|
-
|
19
17
|
spec.metadata["homepage_uri"] = spec.homepage
|
20
18
|
spec.metadata["source_code_uri"] = "https://github.com/osio-toshimasa/paapi_mini"
|
21
|
-
spec.metadata["changelog_uri"] = "https://github.com/osio-toshimasa/paapi_mini/CHANGELOG.md"
|
19
|
+
spec.metadata["changelog_uri"] = "https://github.com/osio-toshimasa/paapi_mini/blob/master/CHANGELOG.md"
|
22
20
|
|
23
21
|
# Specify which files should be added to the gem when it is released.
|
24
22
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
metadata
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paapi_mini
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tossi-punch
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description: paapi_mini is PA-API5.0 client.
|
14
|
-
|
15
|
-
|
13
|
+
description: paapi_mini is PA-API5.0 client. This Gem is implemented using only the
|
14
|
+
Ruby standard library, so it does not depend on other Gems. supported by searchItems
|
15
|
+
api only.
|
16
16
|
email:
|
17
17
|
- osio.toshimasa@gmail.com
|
18
18
|
executables: []
|
@@ -26,6 +26,7 @@ files:
|
|
26
26
|
- Gemfile
|
27
27
|
- LICENSE.txt
|
28
28
|
- README.md
|
29
|
+
- README_ja.md
|
29
30
|
- Rakefile
|
30
31
|
- lib/aws_v4_auth.rb
|
31
32
|
- lib/http_client.rb
|
@@ -39,7 +40,7 @@ licenses:
|
|
39
40
|
metadata:
|
40
41
|
homepage_uri: https://github.com/osio-toshimasa/paapi_mini
|
41
42
|
source_code_uri: https://github.com/osio-toshimasa/paapi_mini
|
42
|
-
changelog_uri: https://github.com/osio-toshimasa/paapi_mini/CHANGELOG.md
|
43
|
+
changelog_uri: https://github.com/osio-toshimasa/paapi_mini/blob/master/CHANGELOG.md
|
43
44
|
post_install_message:
|
44
45
|
rdoc_options: []
|
45
46
|
require_paths:
|