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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b1b5b00194116bc482bebd6b536a95906bd7f0bda470ab0518fbf6c0818b0ff
4
- data.tar.gz: 584c1cf4d98be59ea654d2bed1e142d6fc6a9c7de476c3fe0cd260818aa5be6a
3
+ metadata.gz: 60980d8bf5b14573901d2e1f804a1b84f7b0cea44a9c973af72ce2de2f0e6297
4
+ data.tar.gz: 0bd059ad24e3a80481d85e674a5566010bbd6a4921e1d2d79ecd7704dc8f93aa
5
5
  SHA512:
6
- metadata.gz: 6a4065eac3b0e609537672668ecf33d48ca9d045ccb7cfceaad614a52637e7bad133234a55a1fe5011063751297ca500e74bb97c827c48023ba62bf573fbc568
7
- data.tar.gz: 43f822492d36433f9cd3854c8cbf63bd7aa6607bd27a75363ff4dc73b7a041e26302d485422cd9aa543dc7cf46af38ca9c4fe9de1995d9998ed68e8b02a861bf
6
+ metadata.gz: 930c750a7dcaee2e7c2d59af797ec97c4b11fafcf91b299a2992f57e48982520437e86260b4713aaf3b3eb4e07366807c38401242973bde28024911db761fdc3
7
+ data.tar.gz: 4a143222b85001d94bc213c492c189b80e3f3b69cbc8a3d74984231469a4b5174bb57e67c1730f739d213f6959b82bf39ffb1db126a5e7826303bed4df108f6c
data/.github/FUNDING.yml CHANGED
@@ -1,4 +1,5 @@
1
1
  # These are supported funding model platforms
2
2
 
3
3
  github: deanpcmad
4
+ buy_me_a_coffee: deanpcmad
4
5
  ko_fi: deanpcmad
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
- @oauth.validate(access_token: "")
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
 
@@ -1,3 +1,3 @@
1
1
  module Twitch
2
- VERSION = "1.2.5"
2
+ VERSION = "1.2.6"
3
3
  end
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.5
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-03-17 00:00:00.000000000 Z
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.4.22
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: []