yahoo_store_api 0.2.4 → 0.2.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8e3c77f0e324cdb0b2e40164a7bd6e8173e5be00b083710474fffe37c736cf7
4
- data.tar.gz: d75bb97d0ebae53b3cc82ebdc84e580475c0a17c24fbb5efafbef9d7632b42c6
3
+ metadata.gz: cc0e2477c4f680e362595d10e094e2ad91fd0ac6cd41a89fbbe08728d1937007
4
+ data.tar.gz: 6be1e3443b3e400ffc3e575dea1861a5d91a105d656eccbdc8821583e6779239
5
5
  SHA512:
6
- metadata.gz: c892e7ab6e1e8427b4c6ed6c901bb2fc4ec43b20b55e469722c17970846fa809f4a471085f5357ada5b1b479bb54b24c93d46ebe3a3591ce5de6b70cd4290976
7
- data.tar.gz: dd6560d0130e2f092ca8ae804bbf41a6cbc50ab8e417de514ad98ee4875882d11ca0a5b20c78082bc31c0131fbe18065d29ead07c10cf02a3a77fb87894abc1c
6
+ metadata.gz: 561646417f09b28521617c48ed33e1afb6d3f32011bcb52c16ad50a4f3e41f6c2db8b9d4cb704a15a98b74ab733033043c6a87bd5cb5fa6235715fda18064cd4
7
+ data.tar.gz: 98df0a5737ceae790cd59598d4e45980072c7bc3f8dcb5eda621d949312eb516d4f369afbd0caf03103f98292c770056de6de68b9e99fa04ffd915b9612004f3
data/.gitignore CHANGED
@@ -12,4 +12,5 @@
12
12
  .rbenv-gemsets
13
13
  .DS_Store
14
14
  *.csv
15
- sample.rb
15
+ sample.rb
16
+ .idea
data/README.md CHANGED
@@ -1,13 +1,20 @@
1
1
  # YahooStoreApi
2
2
 
3
+ **⚠️Deprecated⚠️**
4
+
5
+ YahooのAPI認証がv1からv2に移行しており、自分自身EC関連の業務から離れているため、メンテナンスができません。
6
+
7
+ > 2021年8月3日をもちましてYahoo! ID連携 v1の新規の登録を終了いたしました。
8
+ > 2022年4月27日にYahoo! ID連携 v1の利用を終了いたしますのでv2への移行が必要です。
9
+
10
+ ---
11
+
3
12
  [![Gem Version](https://badge.fury.io/rb/yahoo_store_api.svg)](https://badge.fury.io/rb/yahoo_store_api)
4
13
  [![Ruby](https://github.com/t4traw/yahoo_store_api/actions/workflows/main.yml/badge.svg)](https://github.com/t4traw/yahoo_store_api/actions/workflows/main.yml)
5
14
  [![Code Climate](https://codeclimate.com/github/t4traw/yahoo_store_api/badges/gpa.svg)](https://codeclimate.com/github/t4traw/yahoo_store_api)
6
15
 
7
16
  Yahoo!ショッピング プロフェッショナル出店ストア向けAPIを簡単に叩けるrubyラッパーです。
8
17
 
9
- 現在開発中です🐛 まだ商品情報のCRUDと在庫情報の取得・更新、反映予約しかできません。順次機能追加をしていきたいと思います。
10
-
11
18
  ## できること
12
19
 
13
20
  * 商品に関連するAPI
@@ -4,9 +4,7 @@ module YahooStoreApi
4
4
 
5
5
  def connection(method, with_seller_id: false)
6
6
  url = ENDPOINT + method
7
- if with_seller_id
8
- url += "?seller_id=#{@seller_id}" if with_seller_id
9
- end
7
+ url += "?seller_id=#{@seller_id}" if with_seller_id
10
8
 
11
9
  Faraday.new(url: url) do |c|
12
10
  c.request :multipart
@@ -1,3 +1,3 @@
1
1
  module YahooStoreApi
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
@@ -27,12 +27,12 @@ module YahooStoreApi
27
27
  @application_id = application_id
28
28
  @application_secret = application_secret
29
29
  @redirect_uri = redirect_uri ? "&redirect_uri=" + CGI.escape(redirect_uri) : nil
30
- @access_token = reflesh_access_token(refresh_token) || get_access_token(authorization_code)
30
+ @access_token = refresh_access_token(refresh_token) || get_access_token(authorization_code)
31
31
  end
32
32
 
33
33
  private
34
34
 
35
- ACCESS_TOKEN_ENDPOINT = "https://auth.login.yahoo.co.jp/yconnect/v1/token".freeze
35
+ ACCESS_TOKEN_ENDPOINT = "https://auth.login.yahoo.co.jp/yconnect/v2/token".freeze
36
36
 
37
37
  def access_token_connection
38
38
  Faraday.new(url: ACCESS_TOKEN_ENDPOINT) do |c|
@@ -50,7 +50,7 @@ module YahooStoreApi
50
50
  result[:access_token]
51
51
  end
52
52
 
53
- def reflesh_access_token(refresh_token)
53
+ def refresh_access_token(refresh_token)
54
54
  param = "grant_type=refresh_token&refresh_token=#{refresh_token}"
55
55
  obj = access_token_connection.post { |r| r.body = param }
56
56
  result = hash_converter(obj)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yahoo_store_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - t4traw
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-18 00:00:00.000000000 Z
11
+ date: 2022-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
239
  - !ruby/object:Gem::Version
240
240
  version: '0'
241
241
  requirements: []
242
- rubygems_version: 3.2.32
242
+ rubygems_version: 3.2.3
243
243
  signing_key:
244
244
  specification_version: 4
245
245
  summary: Yahoo!ショッピング プロフェッショナル出店ストア向けAPIを簡単に叩けるrubyラッパー