twitchrb 1.6.0 → 1.7.0
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.lock +15 -15
- data/README.md +7 -0
- data/lib/twitch/objects/user_authorization.rb +4 -0
- data/lib/twitch/resources/users.rb +12 -0
- data/lib/twitch/version.rb +1 -1
- data/lib/twitch.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93a284aec069a77415cce52d24805ffc047595a7f71641cbeec979444fa12f31
|
4
|
+
data.tar.gz: efe09b14f083a1e67f8d8b616d4aa792f79861b409b965ceac87baf942b7f30c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6229b6097c07070413291d07c3cee543d48c765e1c801047cfd1c10abd2898b976d0d194c133aaddb58fe1d3aad40a4ce24f83674ef8fd7ca35a0cd64951dd0
|
7
|
+
data.tar.gz: 974fb68d3276cd8536d55a62666ae65957c0f67ab4b421085fd66fca36401e1c7fd659561263baf6d8b2827bb58db5855589b4b635e5ab1ef9a7dcea4ea8a530
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
twitchrb (1.
|
4
|
+
twitchrb (1.7.0)
|
5
5
|
faraday (~> 2.11)
|
6
6
|
ostruct (~> 0.6.0)
|
7
7
|
|
@@ -23,12 +23,12 @@ GEM
|
|
23
23
|
ast (2.4.3)
|
24
24
|
base64 (0.3.0)
|
25
25
|
benchmark (0.4.1)
|
26
|
-
bigdecimal (3.
|
26
|
+
bigdecimal (3.3.1)
|
27
27
|
concurrent-ruby (1.3.5)
|
28
28
|
connection_pool (2.5.4)
|
29
29
|
dotenv (3.1.8)
|
30
30
|
drb (2.2.3)
|
31
|
-
faraday (2.
|
31
|
+
faraday (2.14.0)
|
32
32
|
faraday-net_http (>= 2.0, < 3.5)
|
33
33
|
json
|
34
34
|
logger
|
@@ -36,11 +36,11 @@ GEM
|
|
36
36
|
net-http (>= 0.5.0)
|
37
37
|
i18n (1.14.7)
|
38
38
|
concurrent-ruby (~> 1.0)
|
39
|
-
json (2.
|
39
|
+
json (2.15.1)
|
40
40
|
language_server-protocol (3.17.0.5)
|
41
41
|
lint_roller (1.1.0)
|
42
42
|
logger (1.7.0)
|
43
|
-
minitest (5.
|
43
|
+
minitest (5.26.0)
|
44
44
|
net-http (0.6.0)
|
45
45
|
uri
|
46
46
|
ostruct (0.6.3)
|
@@ -48,13 +48,13 @@ GEM
|
|
48
48
|
parser (3.3.9.0)
|
49
49
|
ast (~> 2.4.1)
|
50
50
|
racc
|
51
|
-
prism (1.
|
51
|
+
prism (1.6.0)
|
52
52
|
racc (1.8.1)
|
53
|
-
rack (3.2.
|
53
|
+
rack (3.2.3)
|
54
54
|
rainbow (3.1.1)
|
55
55
|
rake (12.3.3)
|
56
|
-
regexp_parser (2.11.
|
57
|
-
rubocop (1.
|
56
|
+
regexp_parser (2.11.3)
|
57
|
+
rubocop (1.81.1)
|
58
58
|
json (~> 2.3)
|
59
59
|
language_server-protocol (~> 3.17.0.2)
|
60
60
|
lint_roller (~> 1.1.0)
|
@@ -62,17 +62,17 @@ GEM
|
|
62
62
|
parser (>= 3.3.0.2)
|
63
63
|
rainbow (>= 2.2.2, < 4.0)
|
64
64
|
regexp_parser (>= 2.9.3, < 3.0)
|
65
|
-
rubocop-ast (>= 1.
|
65
|
+
rubocop-ast (>= 1.47.1, < 2.0)
|
66
66
|
ruby-progressbar (~> 1.7)
|
67
67
|
unicode-display_width (>= 2.4.0, < 4.0)
|
68
|
-
rubocop-ast (1.
|
68
|
+
rubocop-ast (1.47.1)
|
69
69
|
parser (>= 3.3.7.2)
|
70
70
|
prism (~> 1.4)
|
71
|
-
rubocop-performance (1.26.
|
71
|
+
rubocop-performance (1.26.1)
|
72
72
|
lint_roller (~> 1.1)
|
73
73
|
rubocop (>= 1.75.0, < 2.0)
|
74
|
-
rubocop-ast (>= 1.
|
75
|
-
rubocop-rails (2.33.
|
74
|
+
rubocop-ast (>= 1.47.1, < 2.0)
|
75
|
+
rubocop-rails (2.33.4)
|
76
76
|
activesupport (>= 4.2.0)
|
77
77
|
lint_roller (~> 1.1)
|
78
78
|
rack (>= 1.1)
|
@@ -89,7 +89,7 @@ GEM
|
|
89
89
|
unicode-display_width (3.2.0)
|
90
90
|
unicode-emoji (~> 4.1)
|
91
91
|
unicode-emoji (4.1.0)
|
92
|
-
uri (1.0.
|
92
|
+
uri (1.0.4)
|
93
93
|
vcr (6.3.1)
|
94
94
|
base64
|
95
95
|
|
data/README.md
CHANGED
@@ -149,6 +149,13 @@ This library includes the ability to create, refresh and revoke OAuth tokens.
|
|
149
149
|
@client.users.emotes(user_id: 123)
|
150
150
|
@client.users.emotes(user_id: 123, broadcaster_id: 321)
|
151
151
|
@client.users.emotes(user_id: 123, after: "abc123")
|
152
|
+
|
153
|
+
# Gets the authorization scopes that the specified user(s) have granted the application. Takes a single User ID or multiple as an array.
|
154
|
+
# Requires an App Access Token
|
155
|
+
# Returns a collection of Twitch::UserAuthorization's
|
156
|
+
# #<Twitch::UserAuthorization user_id="72938118", user_name="deanpcmad", user_login="deanpcmad", scopes=["user:read:email"], has_authorized=true>
|
157
|
+
@client.users.authorization(id: 123)
|
158
|
+
@client.users.authorization(ids: [123, 321])
|
152
159
|
```
|
153
160
|
|
154
161
|
### Channels
|
@@ -93,5 +93,17 @@ module Twitch
|
|
93
93
|
response = get_request("chat/emotes/user", params: attrs.merge(params))
|
94
94
|
Collection.from_response(response, type: Emote)
|
95
95
|
end
|
96
|
+
|
97
|
+
def authorization(id: nil, ids: nil)
|
98
|
+
raise "Either id or ids is required" unless !id.nil? || !ids.nil?
|
99
|
+
|
100
|
+
if id
|
101
|
+
response = get_request("authorization/users", params: { user_id: id })
|
102
|
+
elsif ids
|
103
|
+
response = get_request("authorization/users", params: { user_id: ids })
|
104
|
+
end
|
105
|
+
|
106
|
+
Collection.from_response(response, type: UserAuthorization)
|
107
|
+
end
|
96
108
|
end
|
97
109
|
end
|
data/lib/twitch/version.rb
CHANGED
data/lib/twitch.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twitchrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dean Perry
|
@@ -101,6 +101,7 @@ files:
|
|
101
101
|
- lib/twitch/objects/tag.rb
|
102
102
|
- lib/twitch/objects/unban_request.rb
|
103
103
|
- lib/twitch/objects/user.rb
|
104
|
+
- lib/twitch/objects/user_authorization.rb
|
104
105
|
- lib/twitch/objects/user_color.rb
|
105
106
|
- lib/twitch/objects/video.rb
|
106
107
|
- lib/twitch/objects/vip.rb
|
@@ -167,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
168
|
- !ruby/object:Gem::Version
|
168
169
|
version: '0'
|
169
170
|
requirements: []
|
170
|
-
rubygems_version: 3.
|
171
|
+
rubygems_version: 3.7.2
|
171
172
|
specification_version: 4
|
172
173
|
summary: A Ruby library for interacting with the Twitch Helix API
|
173
174
|
test_files: []
|