me_api 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/me_api/client.rb +12 -1
- data/lib/me_api/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: 67c2a24b15eba71d0dfe8d4de7eb2d25c7aa146086a414144b93c6ec5d07116f
|
4
|
+
data.tar.gz: 03bf93a966a34eea59c5875f58b53035be188293a759cacbaa3c54fb36709398
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e9565f11abd57cbf516a4cf9c95faeb7eb7c9384cd1cdf62b6a6ca66626b42c469b19f4e36cb7d085da11284221482a1b9ed6ee36c8fb03d00bace41d0c1e95
|
7
|
+
data.tar.gz: 571e6becbe3e7b65dcfdd1f5b6d707d7e899c7242ccd230c278d5de7b78820f9711912281de5961deada347ec9998880bb7e4fe975bcda4d5d01ea00ca6b91ef
|
data/lib/me_api/client.rb
CHANGED
@@ -46,7 +46,7 @@ module MeApi
|
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
|
-
def refresh_token(client_id:, client_secret:, refresh_token:)
|
49
|
+
def self.refresh_token(client_id:, client_secret:, refresh_token:)
|
50
50
|
body = {
|
51
51
|
grant_type: "refresh_token",
|
52
52
|
client_id: client_id,
|
@@ -56,5 +56,16 @@ module MeApi
|
|
56
56
|
response = post "/oauth/token", body: JSON.dump(body), headers: { "Content-Type": "application/json" }
|
57
57
|
end
|
58
58
|
|
59
|
+
def self.authorize client_id:, client_secret:, code:, redirect_url:
|
60
|
+
body = {
|
61
|
+
grant_type: "authorization_code",
|
62
|
+
client_id: client_id,
|
63
|
+
client_secret: client_secret,
|
64
|
+
code: code,
|
65
|
+
redirect_uri: redirect_url
|
66
|
+
}
|
67
|
+
response = post "/oauth/token", body: JSON.dump(body), headers: { "Content-Type": "application/json" }
|
68
|
+
end
|
69
|
+
|
59
70
|
end
|
60
71
|
end
|
data/lib/me_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: me_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ulysses-bull
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ac
|