line-social 0.1.1 → 0.1.2
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/Gemfile +2 -0
- data/Gemfile.lock +19 -1
- data/lib/line/social/client.rb +4 -4
- data/lib/line/social/request/base.rb +1 -1
- data/lib/line/social/request/friendship.rb +0 -6
- data/lib/line/social/request/oauth.rb +1 -7
- data/lib/line/social/request/profile.rb +1 -7
- data/lib/line/social/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: ad1f3541e668c583eb447ab3fdf3987f86bf224cbcd5cc4d1164eb505cbf86eb
|
|
4
|
+
data.tar.gz: 36dcc8cb36d86f41afd09e223546e7ba5e60500013d1b7be68466b77abbec33d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 27179ef7fa87232c710388e71db66006b3fb72f4fb9c5179a419bb186a8cb1c44838301d6afb19886d5519ad415238af66f14ba683fa6ab5bdd7ea1d35697549
|
|
7
|
+
data.tar.gz: 0c66c13dbd87da9348f9f90e4cf04f20c61e6dd071783a26286f2c07159ef8554950a7121ae6a2fb5078fb25ebdb9672d2276ff5390820e1dd46b2cc32687a8f
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
GIT
|
|
2
|
+
remote: https://github.com/camelmasa/webmock.git
|
|
3
|
+
revision: 2596cb49c95ed84de6bd55d4f20eb8036ff4b325
|
|
4
|
+
branch: allow-hash
|
|
5
|
+
specs:
|
|
6
|
+
webmock (3.5.1)
|
|
7
|
+
addressable (>= 2.3.6)
|
|
8
|
+
crack (>= 0.3.2)
|
|
9
|
+
hashdiff
|
|
10
|
+
|
|
1
11
|
PATH
|
|
2
12
|
remote: .
|
|
3
13
|
specs:
|
|
4
|
-
line-social (0.1.
|
|
14
|
+
line-social (0.1.1)
|
|
5
15
|
faraday (~> 0.15)
|
|
6
16
|
faraday_middleware (~> 0.13)
|
|
7
17
|
virtus (~> 1.0)
|
|
@@ -9,12 +19,16 @@ PATH
|
|
|
9
19
|
GEM
|
|
10
20
|
remote: https://rubygems.org/
|
|
11
21
|
specs:
|
|
22
|
+
addressable (2.6.0)
|
|
23
|
+
public_suffix (>= 2.0.2, < 4.0)
|
|
12
24
|
axiom-types (0.1.1)
|
|
13
25
|
descendants_tracker (~> 0.0.4)
|
|
14
26
|
ice_nine (~> 0.11.0)
|
|
15
27
|
thread_safe (~> 0.3, >= 0.3.1)
|
|
16
28
|
coercible (1.0.0)
|
|
17
29
|
descendants_tracker (~> 0.0.1)
|
|
30
|
+
crack (0.4.3)
|
|
31
|
+
safe_yaml (~> 1.0.0)
|
|
18
32
|
descendants_tracker (0.0.4)
|
|
19
33
|
thread_safe (~> 0.3, >= 0.3.1)
|
|
20
34
|
diff-lcs (1.3)
|
|
@@ -23,8 +37,10 @@ GEM
|
|
|
23
37
|
multipart-post (>= 1.2, < 3)
|
|
24
38
|
faraday_middleware (0.13.1)
|
|
25
39
|
faraday (>= 0.7.4, < 1.0)
|
|
40
|
+
hashdiff (0.3.8)
|
|
26
41
|
ice_nine (0.11.2)
|
|
27
42
|
multipart-post (2.0.0)
|
|
43
|
+
public_suffix (3.0.3)
|
|
28
44
|
rake (10.5.0)
|
|
29
45
|
rspec (3.8.0)
|
|
30
46
|
rspec-core (~> 3.8.0)
|
|
@@ -39,6 +55,7 @@ GEM
|
|
|
39
55
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
40
56
|
rspec-support (~> 3.8.0)
|
|
41
57
|
rspec-support (3.8.0)
|
|
58
|
+
safe_yaml (1.0.5)
|
|
42
59
|
thread_safe (0.3.6)
|
|
43
60
|
virtus (1.0.5)
|
|
44
61
|
axiom-types (~> 0.1)
|
|
@@ -54,6 +71,7 @@ DEPENDENCIES
|
|
|
54
71
|
line-social!
|
|
55
72
|
rake (~> 10.0)
|
|
56
73
|
rspec (~> 3.0)
|
|
74
|
+
webmock!
|
|
57
75
|
|
|
58
76
|
BUNDLED WITH
|
|
59
77
|
2.0.1
|
data/lib/line/social/client.rb
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
module Line
|
|
2
2
|
module Social
|
|
3
3
|
class Client
|
|
4
|
-
API_URI = URI.parse("https://api.line.me/oauth2/v2.1")
|
|
5
|
-
|
|
6
|
-
attr_reader :access_token
|
|
7
|
-
|
|
8
4
|
def initialize(access_token)
|
|
9
5
|
@access_token = access_token
|
|
10
6
|
end
|
|
11
7
|
|
|
8
|
+
def friendship
|
|
9
|
+
Request::Friendship.new(@access_token)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
12
|
def oauth
|
|
13
13
|
Request::Oauth.new(@access_token)
|
|
14
14
|
end
|
|
@@ -13,7 +13,7 @@ module Line
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def verify
|
|
16
|
-
response = request.get("#{API_URI
|
|
16
|
+
response = request.get("#{API_URI}/verify", access_token: @access_token)
|
|
17
17
|
|
|
18
18
|
if response.body["error"]
|
|
19
19
|
raise Line::Social::Error.new(response.body["error_description"])
|
|
@@ -29,12 +29,6 @@ module Line
|
|
|
29
29
|
def revoke
|
|
30
30
|
raise Line::Social::NotImplementedError
|
|
31
31
|
end
|
|
32
|
-
|
|
33
|
-
private
|
|
34
|
-
|
|
35
|
-
def url
|
|
36
|
-
"#{API_URI.scheme}://#{API_URI.host}"
|
|
37
|
-
end
|
|
38
32
|
end
|
|
39
33
|
end
|
|
40
34
|
end
|
|
@@ -10,7 +10,7 @@ module Line
|
|
|
10
10
|
|
|
11
11
|
def get
|
|
12
12
|
response = request.get do |request|
|
|
13
|
-
request.url "#{API_URI
|
|
13
|
+
request.url "#{API_URI}/profile"
|
|
14
14
|
request.headers["Authorization"] = "Bearer #{@access_token}"
|
|
15
15
|
end
|
|
16
16
|
|
|
@@ -20,12 +20,6 @@ module Line
|
|
|
20
20
|
Line::Social::Profile.new(response.body)
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
|
-
|
|
24
|
-
private
|
|
25
|
-
|
|
26
|
-
def url
|
|
27
|
-
"#{API_URI.scheme}://#{API_URI.host}"
|
|
28
|
-
end
|
|
29
23
|
end
|
|
30
24
|
end
|
|
31
25
|
end
|
data/lib/line/social/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: line-social
|
|
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
|
- camelmasa
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-04-
|
|
11
|
+
date: 2019-04-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|