twitchrb 1.2.5 → 1.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +1 -0
- data/README.md +2 -1
- data/lib/twitch/oauth.rb +2 -0
- data/lib/twitch/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60980d8bf5b14573901d2e1f804a1b84f7b0cea44a9c973af72ce2de2f0e6297
|
4
|
+
data.tar.gz: 0bd059ad24e3a80481d85e674a5566010bbd6a4921e1d2d79ecd7704dc8f93aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 930c750a7dcaee2e7c2d59af797ec97c4b11fafcf91b299a2992f57e48982520437e86260b4713aaf3b3eb4e07366807c38401242973bde28024911db761fdc3
|
7
|
+
data.tar.gz: 4a143222b85001d94bc213c492c189b80e3f3b69cbc8a3d74984231469a4b5174bb57e67c1730f739d213f6959b82bf39ffb1db126a5e7826303bed4df108f6c
|
data/.github/FUNDING.yml
CHANGED
data/README.md
CHANGED
@@ -44,7 +44,8 @@ This library includes the ability to create, refresh and revoke OAuth tokens.
|
|
44
44
|
@oauth.device(scopes: "bits:read channel:read:subscriptions")
|
45
45
|
|
46
46
|
# Validate an Access Token
|
47
|
-
|
47
|
+
# Returns false if the token is invalid
|
48
|
+
@oauth.validate(token: "")
|
48
49
|
|
49
50
|
# Revoke a Token
|
50
51
|
@oauth.revoke(token: "")
|
data/lib/twitch/oauth.rb
CHANGED
@@ -33,6 +33,8 @@ module Twitch
|
|
33
33
|
def validate(token:)
|
34
34
|
response = Faraday.get("https://id.twitch.tv/oauth2/validate", nil, {"Authorization" => "OAuth #{token}"})
|
35
35
|
|
36
|
+
return false if response.status != 200
|
37
|
+
|
36
38
|
JSON.parse(response.body, object_class: OpenStruct)
|
37
39
|
end
|
38
40
|
|
data/lib/twitch/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twitchrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dean Perry
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.0'
|
27
|
-
description:
|
27
|
+
description:
|
28
28
|
email:
|
29
29
|
- dean@deanpcmad.com
|
30
30
|
executables: []
|
@@ -136,7 +136,7 @@ licenses:
|
|
136
136
|
metadata:
|
137
137
|
homepage_uri: https://deanpcmad.com
|
138
138
|
source_code_uri: https://github.com/deanpcmad/twitchrb
|
139
|
-
post_install_message:
|
139
|
+
post_install_message:
|
140
140
|
rdoc_options: []
|
141
141
|
require_paths:
|
142
142
|
- lib
|
@@ -151,8 +151,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
requirements: []
|
154
|
-
rubygems_version: 3.
|
155
|
-
signing_key:
|
154
|
+
rubygems_version: 3.5.9
|
155
|
+
signing_key:
|
156
156
|
specification_version: 4
|
157
157
|
summary: A Ruby library for interacting with the Twitch Helix API
|
158
158
|
test_files: []
|