tanita-api-client 0.2.1 → 0.2.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 +9 -1
- data/Gemfile.lock +1 -1
- data/lib/tanita/api/client.rb +2 -2
- data/lib/tanita/api/client/helpers.rb +7 -0
- data/lib/tanita/api/client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7abd65d845038f6e657b6e8346fe9839f9e8d148162d60683187a4346f7e5694
|
4
|
+
data.tar.gz: b45424da19973f3b269ce3a3a2999f6ec66eda06e67a9891d52fbbbfeb83fec3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f10078889601e85d091d6c9248e8a0f8eeb4135695430f9eb3d92103188bb114a19f322767086088a4485dd72f2098884750c2e6fccfab76294238b496d8befe
|
7
|
+
data.tar.gz: 61c0b620234eb935ffae62fe91445be0f13c40a5c961b90fce6048058457233c787cb7f55956b47681fc9a0b472d8d6ddb1965c1b7f7b359eeff67ea9629c2df
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,15 @@
|
|
1
|
+
# 0.2.2
|
2
|
+
|
3
|
+
* define constants
|
4
|
+
* `Tanita::Api::Client::AUTH_URL`
|
5
|
+
* `Tanita::Api::Client::AUTH_URL_PATH`
|
6
|
+
* `Tanita::Api::Client::TOKEN_URL`
|
7
|
+
* `Tanita::Api::Client::TOKEN_URL_PATH`
|
8
|
+
|
1
9
|
|
2
10
|
# 0.2.1
|
3
11
|
|
4
|
-
* rename constant
|
12
|
+
* rename constant
|
5
13
|
* from `Tanita::Api::Client::HttpHelper::BASE_URL` to `Tanita::Api::Client::BASE_URL`
|
6
14
|
|
7
15
|
# 0.2.0
|
data/Gemfile.lock
CHANGED
data/lib/tanita/api/client.rb
CHANGED
@@ -37,7 +37,7 @@ module Tanita
|
|
37
37
|
:scope => @scopes.join(','),
|
38
38
|
:response_type => 'code'
|
39
39
|
}
|
40
|
-
generate_uri(
|
40
|
+
generate_uri(AUTH_URL_PATH, params)
|
41
41
|
end
|
42
42
|
|
43
43
|
def exchange_token(auth_code:)
|
@@ -48,7 +48,7 @@ module Tanita
|
|
48
48
|
:code => auth_code,
|
49
49
|
:grant_type => 'authorization_code'
|
50
50
|
}
|
51
|
-
res = request(
|
51
|
+
res = request(TOKEN_URL_PATH, params)
|
52
52
|
token = parse_json(res.body)
|
53
53
|
|
54
54
|
raise Error.new("#{self.class}.#{__method__}: #{token[:error]}") if token.key? :error
|
@@ -7,6 +7,13 @@ module Tanita
|
|
7
7
|
module Api
|
8
8
|
module Client
|
9
9
|
BASE_URL = 'https://www.healthplanet.jp'
|
10
|
+
|
11
|
+
AUTH_URL_PATH = '/oauth/auth'
|
12
|
+
AUTH_URL = "#{BASE_URL}#{AUTH_URL_PATH}"
|
13
|
+
|
14
|
+
TOKEN_URL_PATH = '/oauth/token'
|
15
|
+
TOKEN_URL = "#{BASE_URL}#{TOKEN_URL_PATH}"
|
16
|
+
|
10
17
|
DEFAULT_REDIRECT_URI = "#{BASE_URL}/success.html"
|
11
18
|
|
12
19
|
module HttpHelper
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tanita-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenji Koshikawa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|